Skip to content

Commit

Permalink
introduce constraints.txt to workaround pypa/setuptools#4519
Browse files Browse the repository at this point in the history
  • Loading branch information
pna-nca committed Jul 29, 2024
1 parent d73ff16 commit 3b0d8a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile.django-debian
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ RUN \
rm -rf /var/lib/apt/lists && \
true
COPY requirements.txt ./
COPY constraints.txt ./
# CPUCOUNT=1 is needed, otherwise the wheel for uwsgi won't always be build succesfully
# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
RUN CPUCOUNT=1 PIP_CONSTRAINT=/app/constraints.txt pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt

FROM base as django
WORKDIR /app
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.nginx-debian
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ RUN \
rm -rf /var/lib/apt/lists && \
true
COPY requirements.txt ./
COPY constraints.txt ./
# CPUCOUNT=1 is needed, otherwise the wheel for uwsgi won't always be build succesfully
# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
RUN CPUCOUNT=1 PIP_CONSTRAINT=/app/constraints.txt pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt


FROM build AS collectstatic
Expand Down
1 change: 1 addition & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setuptools<72

0 comments on commit 3b0d8a5

Please sign in to comment.