From e724aace4991b730d99828c1191950689ce32fd4 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:03:23 +0800 Subject: [PATCH 1/2] Allow overriding `python3` & `pip3` binary in Makefile --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a29fb4f5..64a95e94 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ MAKEFLAGS := --jobs=1 +PYTHON := python3 +PIP := pip3 VERSION := $(shell git describe --tag) COMMIT := $(shell git rev-parse --short HEAD) @@ -115,16 +117,16 @@ build-deps-ubuntu: docs: docs-deps docs-build docs-venv: .PHONY - python3 -m venv ./venv + $(PYTHON) -m venv ./venv docs-build: docs-venv - (. venv/bin/activate && mkdocs build) + (. venv/bin/activate && $(PYTHON) mkdocs build) docs-deps: docs-venv - (. venv/bin/activate && pip3 install -r requirements.txt) + (. venv/bin/activate && $(PIP) install -r requirements.txt) docs-deps-update: .PHONY - (. venv/bin/activate && pip3 install -r requirements.txt --upgrade) + (. venv/bin/activate && $(PIP) install -r requirements.txt --upgrade) # Web app From 0928d99813a2e5ea59d1e992794fc1f934f16191 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:39:13 +0800 Subject: [PATCH 2/2] Fix mkdocs call --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 64a95e94..4355423e 100644 --- a/Makefile +++ b/Makefile @@ -120,7 +120,7 @@ docs-venv: .PHONY $(PYTHON) -m venv ./venv docs-build: docs-venv - (. venv/bin/activate && $(PYTHON) mkdocs build) + (. venv/bin/activate && $(PYTHON) -m mkdocs build) docs-deps: docs-venv (. venv/bin/activate && $(PIP) install -r requirements.txt)