Skip to content

Commit

Permalink
Add --no-user
Browse files Browse the repository at this point in the history
For those people who have user=true in their pip.conf or PIP_USER=true
in their environment.

Credit to @larseggert for finding this one.
  • Loading branch information
martinthomson committed Sep 17, 2024
1 parent 9413281 commit 4140039
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions venv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,14 @@ endif

$(VENV):
$(PY) -m venv $(VENVDIR)
"$(VENV)/python" -m pip install $(no-cache-dir) --upgrade pip setuptools wheel
"$(VENV)/python" -m pip install --no-user $(no-cache-dir) --upgrade pip setuptools wheel

$(VENV)/$(MARKER): $(VENVDEPENDS) | $(VENV)
ifneq ($(strip $(REQUIREMENTS_TXT)),)
"$(VENV)/pip" install $(no-cache-dir) $(foreach path,$(REQUIREMENTS_TXT),-r $(path))
"$(VENV)/python" -m pip install --no-user $(no-cache-dir) $(foreach path,$(REQUIREMENTS_TXT),-r $(path))
endif
ifneq ($(strip $(SETUP_PY)),)
"$(VENV)/pip" install $(no-cache-dir) $(foreach path,$(SETUP_PY),-e $(dir $(path)))
"$(VENV)/python" -m pip install --no-user $(no-cache-dir) $(foreach path,$(SETUP_PY),-e $(dir $(path)))
endif
$(call touch,$(VENV)/$(MARKER))

Expand Down Expand Up @@ -270,5 +270,5 @@ $(VENV)/%: $(VENV)/%$(EXE) ;
endif

$(VENV)/%$(EXE): $(VENV)/$(MARKER)
"$(VENV)/pip" install $(no-cache-dir) --upgrade $*
"$(VENV)/python" -m pip install --no-user $(no-cache-dir) --upgrade $*
$(call touch,$@)

0 comments on commit 4140039

Please sign in to comment.