-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect python version from python project by default in
uv venv
(#5592
) <!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> `uv venv` should support adopting python version specified in `requires-python` from `pyproject.toml`. This allows customization on the venv setup when syncing from python project. Closes #5552. It also serves as a workaround to close #5258. ## Test Plan <!-- How was it tested? --> 1. Run `uv venv` in folder with `pyroject.toml` specifying `requries-python = "<3.10"`. Python 3.9 is selected for venv. 2. Change to `requries-python = "<3.11"` and run `uv venv` again. Python 3.10 is selected now. 3. Switch to a folder without `pyproject.toml` then run `uv venv`. Python 3.12 is selected now. --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com> Co-authored-by: Zanie Blue <contact@zanie.dev>
- Loading branch information
1 parent
fbff1ba
commit 0dcec9e
Showing
2 changed files
with
211 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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