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 Aug 23, 2024
1 parent 9df1a07 commit fd6ccaf
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 @@ -31,9 +31,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 @@ -30,9 +30,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 fd6ccaf

Please sign in to comment.