Skip to content

Commit 970b2ca

Browse files
committed
introduce constraints.txt to workaround pypa/setuptools#4519
1 parent dfaa2b9 commit 970b2ca

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Dockerfile.django-debian

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ RUN \
3131
rm -rf /var/lib/apt/lists && \
3232
true
3333
COPY requirements.txt ./
34+
COPY constraints.txt ./
3435
# CPUCOUNT=1 is needed, otherwise the wheel for uwsgi won't always be build succesfully
3536
# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
36-
RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
37+
RUN CPUCOUNT=1 PIP_CONSTRAINT=/app/constraints.txt pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
3738

3839
FROM base AS django
3940
WORKDIR /app

Dockerfile.nginx-debian

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ RUN \
3030
rm -rf /var/lib/apt/lists && \
3131
true
3232
COPY requirements.txt ./
33+
COPY constraints.txt ./
3334
# CPUCOUNT=1 is needed, otherwise the wheel for uwsgi won't always be build succesfully
3435
# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
35-
RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
36+
RUN CPUCOUNT=1 PIP_CONSTRAINT=/app/constraints.txt pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
3637

3738

3839
FROM build AS collectstatic

constraints.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
setuptools<72

0 commit comments

Comments
 (0)