Skip to content

Commit

Permalink
always call pip through python -m pip
Browse files Browse the repository at this point in the history
It was done in one place, but I though it would be better to apply it consistently.  It supports python installs that don't have a pip binary.
  • Loading branch information
belm0 authored Sep 6, 2024
1 parent 6268cf2 commit 9cf15f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile.venv
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ clean-venv:
.PHONY: show-venv
show-venv: venv
@$(VENV)/python -c "import sys; print('Python ' + sys.version.replace('\n',''))"
@$(VENV)/pip --version
@$(VENV)/python -m pip --version
@echo venv: $(VENVDIR)

.PHONY: debug-venv
Expand Down Expand Up @@ -228,10 +228,10 @@ $(VENV):

$(VENV)/$(MARKER): $(VENVDEPENDS) | $(VENV)
ifneq ($(strip $(REQUIREMENTS_TXT)),)
$(VENV)/pip install $(foreach path,$(REQUIREMENTS_TXT),-r $(path))
$(VENV)/python -m install $(foreach path,$(REQUIREMENTS_TXT),-r $(path))
endif
ifneq ($(strip $(VENV_LOCAL_PACKAGE)),)
$(VENV)/pip install $(foreach path,$(sort $(VENV_LOCAL_PACKAGE)),-e $(dir $(path)))
$(VENV)/python -m pip install $(foreach path,$(sort $(VENV_LOCAL_PACKAGE)),-e $(dir $(path)))
endif
$(call touch,$(VENV)/$(MARKER))

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

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

0 comments on commit 9cf15f1

Please sign in to comment.