Skip to content

Commit 0b41356

Browse files
Merge pull request #949 from cyqsimon/python-pip-override
Allow overriding `python3` & `pip3` binary in Makefile
2 parents b650447 + 0928d99 commit 0b41356

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
MAKEFLAGS := --jobs=1
2+
PYTHON := python3
3+
PIP := pip3
24
VERSION := $(shell git describe --tag)
35
COMMIT := $(shell git rev-parse --short HEAD)
46

@@ -115,16 +117,16 @@ build-deps-ubuntu:
115117
docs: docs-deps docs-build
116118

117119
docs-venv: .PHONY
118-
python3 -m venv ./venv
120+
$(PYTHON) -m venv ./venv
119121

120122
docs-build: docs-venv
121-
(. venv/bin/activate && mkdocs build)
123+
(. venv/bin/activate && $(PYTHON) -m mkdocs build)
122124

123125
docs-deps: docs-venv
124-
(. venv/bin/activate && pip3 install -r requirements.txt)
126+
(. venv/bin/activate && $(PIP) install -r requirements.txt)
125127

126128
docs-deps-update: .PHONY
127-
(. venv/bin/activate && pip3 install -r requirements.txt --upgrade)
129+
(. venv/bin/activate && $(PIP) install -r requirements.txt --upgrade)
128130

129131

130132
# Web app

0 commit comments

Comments
 (0)