Skip to content

Commit

Permalink
misc: use activated venv dir if any, and add back project venv export (
Browse files Browse the repository at this point in the history
…#3630)

This change lets us use the activated venv, if any, for all our make
commands. In order to make it work, I had to add back the export,
because otherwise the inner uv commands would complain about the fact
that the current venv is not the same as the project venv, which is
.venv if not overridden.
  • Loading branch information
superlopuh authored Dec 16, 2024
1 parent fd6296d commit 91c2790
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ COVERAGE_FILE ?= .coverage

# allow overriding the name of the venv directory
VENV_DIR ?= .venv
UV_PROJECT_ENVIRONMENT=${VENV_DIR}

# use activated venv if any
export UV_PROJECT_ENVIRONMENT=$(if $(VIRTUAL_ENV),$(VIRTUAL_ENV),$(VENV_DIR))

# allow overriding which extras are installed
VENV_EXTRAS ?= --extra gui --extra dev --extra jax --extra riscv
Expand Down

0 comments on commit 91c2790

Please sign in to comment.