Skip to content

Use uv pip install for runtime venvs without pip#97

Merged
mkultraWasHere merged 1 commit into
mainfrom
nops/uv-pip-fix
Jul 15, 2026
Merged

Use uv pip install for runtime venvs without pip#97
mkultraWasHere merged 1 commit into
mainfrom
nops/uv-pip-fix

Conversation

@mkultraWasHere

Copy link
Copy Markdown
Contributor

The runtime Python is a uv-managed venv with include-system-site-packages = false and no pip module. _ensure_impacket_installed() tried sys.executable -m pip install which always failed silently.

Fixed

  • _ensure_impacket_installed() now tries uv pip install --python <sys.executable> first, which works in uv venvs that lack pip, then falls back to sys.executable -m pip for standard venvs
  • Removed misleading impacket readiness check from capability.yaml — it tested system python3 (3.13) not the runtime Python (3.12), always passing even when broken

Notes

  • Bug 1 from the report (dreadnode/capabilities/install.py not passing --python to uv pip install) is a platform-side issue, not fixable here

The runtime Python is a uv-managed venv that intentionally excludes
pip. _ensure_impacket_installed tried sys.executable -m pip which
always fails silently. Now tries uv pip install --python first (which
works in uv venvs), then falls back to pip.

Also removes the impacket readiness check from capability.yaml — it
tested system python3 (3.13) not the runtime Python (3.12), so it
always passed even when broken. _ensure_impacket_installed handles
this at import time instead.

Bump to 2.1.5.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes impacket auto-installation for uv-managed runtime virtual environments that do not include the pip module, and removes a misleading capability readiness check that was validating the wrong Python interpreter.

Changes:

  • Updated _ensure_impacket_installed() to try uv pip install --python <sys.executable> first, then fall back to sys.executable -m pip (with an additional --break-system-packages fallback).
  • Removed the impacket check from capability.yaml because it was validating python3 (system) rather than the runtime Python used by the capability.
  • Bumped network-ops capability version from 2.1.4 to 2.1.5.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
capabilities/network-ops/tools/impacket.py Adds a uv-first installation path so impacket can be installed into uv venv runtimes that lack pip.
capabilities/network-ops/capability.yaml Removes an interpreter-mismatched impacket readiness check and bumps patch version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkultraWasHere mkultraWasHere merged commit 3759afe into main Jul 15, 2026
6 checks passed
@mkultraWasHere mkultraWasHere deleted the nops/uv-pip-fix branch July 15, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants