From 118b636ff6b0553dd49485484b2e54103b6548c1 Mon Sep 17 00:00:00 2001 From: Pavel Nakonechnyi Date: Mon, 29 Jul 2024 10:06:50 +0200 Subject: [PATCH] introduce constraints.txt to workaround https://github.com/pypa/setuptools/issues/4519 --- Dockerfile.django-debian | 3 ++- Dockerfile.nginx-debian | 3 ++- constraints.txt | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 constraints.txt diff --git a/Dockerfile.django-debian b/Dockerfile.django-debian index c9bccc459de..5efe05defae 100644 --- a/Dockerfile.django-debian +++ b/Dockerfile.django-debian @@ -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 diff --git a/Dockerfile.nginx-debian b/Dockerfile.nginx-debian index 9f6f3ece9fb..580772c7f8f 100644 --- a/Dockerfile.nginx-debian +++ b/Dockerfile.nginx-debian @@ -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 diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 00000000000..764a11f56c0 --- /dev/null +++ b/constraints.txt @@ -0,0 +1 @@ +setuptools<72