Skip to content

Path as target#10

Merged
amol- merged 4 commits into
mainfrom
path-as-target
Jun 1, 2026
Merged

Path as target#10
amol- merged 4 commits into
mainfrom
path-as-target

Conversation

@amol-

@amol- amol- commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Support for scanning a --target directory instead of a virtual environment

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

Adds support for scanning a flat “target” directory (e.g., pip install --target <dir>) directly, instead of requiring a full virtual environment layout, by introducing a path_as_target flag on get_packages_from_env.

Changes:

  • Extend get_packages_from_env with path_as_target to scan the provided directory directly (skipping venv layout, .pth, system, and PYTHONPATH discovery).
  • Add unit tests covering target-directory scanning behavior and ensuring .pth/PYTHONPATH are ignored in this mode.
  • Document the new target-directory scanning mode in the README.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/picopip.py Adds path_as_target option to scan venv_path as a direct package directory.
tests/test_packages_discovery.py Adds tests validating target-directory scanning and its isolation from .pth/PYTHONPATH.
README.md Documents path_as_target=True usage for pip install --target directories.

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

Comment thread src/picopip.py

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

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

Comment thread src/picopip.py
Comment thread tests/test_packages_discovery.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@amol- amol- force-pushed the path-as-target branch from 331b413 to 5685851 Compare June 1, 2026 13:52
@amol- amol- merged commit 1724803 into main Jun 1, 2026
8 checks passed
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