Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect --project during uv python find (#11990) #12049

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thejchap
Copy link
Contributor

@thejchap thejchap commented Mar 7, 2025

Summary

Resolves #11990

  • Updates a couple discovery-related functions to accept a directory argument, used as the root directory when searching for a virtual environment
  • Updates uv python find to pass the --project flag through to start the search for a python executable from that project, regardless of current directory

Test Plan

  • Snapshot tests
  • E2E (below)

Before

$ cargo run python find --directory ~/src --project example
/Users/justinchapman/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/bin/python3.13

After

$ cargo run python find --directory ~/src --project example
/Users/justinchapman/src/example/.venv/bin/python3

@thejchap thejchap changed the title respect --project during uv python find (#11990) [WIP] Respect --project during uv python find (#11990) Mar 7, 2025
@thejchap thejchap force-pushed the bug/python-find-project branch 12 times, most recently from eae8bb5 to 5c64c53 Compare March 13, 2025 04:38
@thejchap thejchap changed the title [WIP] Respect --project during uv python find (#11990) Respect --project during uv python find (#11990) Mar 13, 2025
@thejchap thejchap marked this pull request as ready for review March 13, 2025 04:39
@thejchap thejchap force-pushed the bug/python-find-project branch from 5c64c53 to 5f3da2d Compare March 13, 2025 04:54
## Summary

this pr updates a couple discovery-related functions to accept a directory argument, used as the root directory when searching for a virtual environment

## Test Plan

todo
@thejchap thejchap force-pushed the bug/python-find-project branch from 5f3da2d to 6490c09 Compare March 13, 2025 04:56
@konstin konstin requested a review from zanieb March 14, 2025 20:42
@zanieb zanieb self-assigned this Mar 18, 2025
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.

uv python find does not respect --project
2 participants