Use uv pip install for runtime venvs without pip#97
Merged
Conversation
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>
There was a problem hiding this comment.
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 tryuv pip install --python <sys.executable>first, then fall back tosys.executable -m pip(with an additional--break-system-packagesfallback). - Removed the
impacketcheck fromcapability.yamlbecause it was validatingpython3(system) rather than the runtime Python used by the capability. - Bumped
network-opscapability version from2.1.4to2.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The runtime Python is a uv-managed venv with
include-system-site-packages = falseand no pip module._ensure_impacket_installed()triedsys.executable -m pip installwhich always failed silently.Fixed
_ensure_impacket_installed()now triesuv pip install --python <sys.executable>first, which works in uv venvs that lack pip, then falls back tosys.executable -m pipfor standard venvscapability.yaml— it tested systempython3(3.13) not the runtime Python (3.12), always passing even when brokenNotes
dreadnode/capabilities/install.pynot passing--pythontouv pip install) is a platform-side issue, not fixable here