-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
venv-activationTemporay label to track issues with first venv activationTemporay label to track issues with first venv activation
Description
Problem
If python-version is defined, setup-uv currently auto-activates a venv under .venv in the repository/workspace root.
Problems with this behavior:
- Does not support repos with multiple possible venvs: Support
working-directoryin action configuration #271
Other considerations:
- Interaction with the
pyproject-fileinput?VIRTUAL_ENVis set to wrong directory when usingpyproject-fileconfig #251 - Interaction with
.python-versionfile: Support .python-version files as input towith python-version#211 - Support
--system-site-packages: Flag for--system-site-packageswhen initializing venv #260 - Should the correct python version be always installed? Python version part of the cache key is undefined if the required python version is not yet installed #283
Solutions
Solution 1
- a new boolean input
activate-environment - a new input
working-directorywhich defaults to ${{ github.workspace }}. This adds--directoryto uv commands inside setup-uv.Ifactivate-environment: trueit will activate the venv in this place - this will replace the inputs
uv-fileandpyproject-file
Optional: We always install the target python version (determined by python-version, pyproject.toml or .python-version).
Open question: What to do about --system-site-packages?
Metadata
Metadata
Assignees
Labels
venv-activationTemporay label to track issues with first venv activationTemporay label to track issues with first venv activation