Commit b96b071
authored
fix(python-plugin): add UV_PROJECT_ENVIRONMENT env variable (#2659)
## Summary
Fixes #2658 (i.e. errors such as the below):
_warning: VIRTUAL_ENV=src/uvtest/.venv does not match the project
environment path .venv and will be ignored; use --active to target the
active environment instead_
I have also updated the outdated docs which still contained the old
default virtual environment path of `.devbox/virtenv/python`.
## How was it tested?
Using the steps from #2658:
```
devbox create uvtest --template python-pip
cd uvtest
devbox add uv@latest
mkdir -p src/uvtest
echo -e "[project]\nname = \"uvtest\"\nversion = \"1.0.0\"\nrequires-python = \">=3.12\"" > pyproject.toml
devbox shell --env VENV_DIR="./src/uvtest/.venv"
uv run main.py
```
With this fix, the last command now runs successfully.
## Community Contribution License
All community contributions in this pull request are licensed to the
project
maintainers under the terms of the
[Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0).
By creating this pull request, I represent that I have the right to
license the
contributions to the project maintainers under the Apache 2 License as
stated in
the
[Community Contribution
License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).1 parent e3b73ba commit b96b071
File tree
3 files changed
+7
-4
lines changed- docs/app/docs/devbox_examples/languages
- examples/development/python/pip
- plugins
3 files changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
0 commit comments