Skip to content

fix(python-plugin): add UV_PROJECT_ENVIRONMENT env variable #2659

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

apgrucza
Copy link
Contributor

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Custom Python VENV_DIR ignored by uv
1 participant