Skip to content

Commit

Permalink
uv does work only in VIRTUAL_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Mar 1, 2024
1 parent 9e1d1fe commit 27026fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ ifeq ($(shell [[ "$(VENV_ENABLED)" == "true" && "$(VENV_FOLDER)" == "" ]] && ech
$(error "VENV_FOLDER must be configured if VENV_ENABLED is true")
endif

# Check if global python is used with uv (this is not supported by uv)
ifeq ("$(VENV_ENABLED)$(PYTHON_PACKAGE_INSTALLER)","falseuv")
$(error "Package installer uv does not work with a global Python interpreter.")
endif

# Determine the executable path
ifeq ("$(VENV_ENABLED)", "true")
export PATH:=$(abspath $(VENV_FOLDER))/bin:$(PATH)
Expand Down
5 changes: 5 additions & 0 deletions src/mxmake/tests/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,11 @@ def test_Makefile(self, tempdir):
$(error "VENV_FOLDER must be configured if VENV_ENABLED is true")
endif
# Check if global python is used with uv (this is not supported by uv)
ifeq ("$(VENV_ENABLED)$(PYTHON_PACKAGE_INSTALLER)","falseuv")
$(error "Package installer uv does not work with a global Python interpreter.")
endif
# Determine the executable path
ifeq ("$(VENV_ENABLED)", "true")
export PATH:=$(abspath $(VENV_FOLDER))/bin:$(PATH)
Expand Down
5 changes: 5 additions & 0 deletions src/mxmake/topics/core/mxenv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ ifeq ($(shell [[ "$(VENV_ENABLED)" == "true" && "$(VENV_FOLDER)" == "" ]] && ech
$(error "VENV_FOLDER must be configured if VENV_ENABLED is true")
endif

# Check if global python is used with uv (this is not supported by uv)
ifeq ("$(VENV_ENABLED)$(PYTHON_PACKAGE_INSTALLER)","falseuv")
$(error "Package installer uv does not work with a global Python interpreter.")
endif

# Determine the executable path
ifeq ("$(VENV_ENABLED)", "true")
export PATH:=$(abspath $(VENV_FOLDER))/bin:$(PATH)
Expand Down

0 comments on commit 27026fe

Please sign in to comment.