forked from mirrors/ntfy
1
0
Fork 0

*: python pip in debian bookworm/testing needs venv

When testing this build using the upcoming debian bookworm/testing, the
python pip v3.11 fails to install requirements that may clobber the host
install packages. It prints out that venv must be used.

This change works fine on the current debian bullseye, and will continue
to work once folks switch to the upcoming debian bookworm release.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-06-03 15:29:51 -04:00
parent f58c1e4c84
commit 77f5dd705c
Signed by: vbatts
GPG Key ID: E30EFAA812C6E5ED
2 changed files with 12 additions and 5 deletions

View File

@ -8,7 +8,8 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash
RUN apt-get install -y \ RUN apt-get install -y \
build-essential \ build-essential \
nodejs \ nodejs \
python3-pip python3-pip \
python3-venv
WORKDIR /app WORKDIR /app
ADD Makefile . ADD Makefile .

View File

@ -110,8 +110,9 @@ build-deps-ubuntu:
docs: docs-deps docs-build docs: docs-deps docs-build
docs-build: .PHONY docs-build: venv .PHONY
@if ! /bin/echo -e "import sys\nif sys.version_info < (3,8):\n exit(1)" | python3; then \ @. venv/bin/activate && \
if ! /bin/echo -e "import sys\nif sys.version_info < (3,8):\n exit(1)" | python3; then \
if which python3.8; then \ if which python3.8; then \
echo "python3.8 $(shell which mkdocs) build"; \ echo "python3.8 $(shell which mkdocs) build"; \
python3.8 $(shell which mkdocs) build; \ python3.8 $(shell which mkdocs) build; \
@ -124,10 +125,15 @@ docs-build: .PHONY
mkdocs build; \ mkdocs build; \
fi fi
docs-deps: .PHONY venv:
python3 -m venv ./venv
docs-deps: venv .PHONY
. venv/bin/activate && \
pip3 install -r requirements.txt pip3 install -r requirements.txt
docs-deps-update: .PHONY docs-deps-update: venv .PHONY
. venv/bin/activate && \
pip3 install -r requirements.txt --upgrade pip3 install -r requirements.txt --upgrade