Skip to content

Rework venv activation #351

Closed
Closed
@eifinger

Description

@eifinger

Problem

If python-version is defined, setup-uv currently auto-activates a venv under .venv in the repository/workspace root.

Problems with this behavior:

Other considerations:

Solutions

Solution 1

  • a new boolean input activate-environment
  • a new input working-directory which defaults to ${{ github.workspace }}. This adds --directory to uv commands inside setup-uv. If activate-environment: true it will activate the venv in this place
  • this will replace the inputs uv-file and pyproject-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

No one assigned

    Labels

    venv-activationTemporay label to track issues with first venv activation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions