diff --git a/Dockerfile b/Dockerfile index 9fc60faa..188e006c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,7 +58,8 @@ ARG SKYLINE_CONSOLE_REF=master # Virtualenv arguments ARG PIP_VERSION_CONSTRAINT="" -ARG SETUPTOOL_CONSTRAINT="" +# As of setuptools 82.0.0 (released 2026-02-08), pkg_resources was removed from setuptools. +ARG SETUPTOOL_CONSTRAINT="<81" ARG WHEEL_CONSTRAINT="" # End virtualenv argumens diff --git a/Dockerfile.runtime b/Dockerfile.runtime index c140d997..19c8eede 100644 --- a/Dockerfile.runtime +++ b/Dockerfile.runtime @@ -36,7 +36,8 @@ ARG PROJECT_PIP_EXTRAS # These are needed when virtualenv is created. ARG PIP_VERSION_CONSTRAINT="" -ARG SETUPTOOL_CONSTRAINT="" +# As of setuptools 82.0.0 (released 2026-02-08), pkg_resources was removed from setuptools. +ARG SETUPTOOL_CONSTRAINT="<81" ARG WHEEL_CONSTRAINT="" COPY scripts /opt/loci/scripts diff --git a/Dockerfile.venv_builder b/Dockerfile.venv_builder index 1ae10035..5cc1a4b5 100644 --- a/Dockerfile.venv_builder +++ b/Dockerfile.venv_builder @@ -18,7 +18,8 @@ ARG SOURCES_DIR="/tmp" # Optional constraints for pip, setuptools, and wheel ARG PIP_VERSION_CONSTRAINT="" -ARG SETUPTOOL_CONSTRAINT="" +# As of setuptools 82.0.0 (released 2026-02-08), pkg_resources was removed from setuptools. +ARG SETUPTOOL_CONSTRAINT="<81" ARG WHEEL_CONSTRAINT="" COPY scripts /opt/loci/scripts diff --git a/playbooks/uv_vars.yaml b/playbooks/uv_vars.yaml index f3f005cb..aead052e 100644 --- a/playbooks/uv_vars.yaml +++ b/playbooks/uv_vars.yaml @@ -524,6 +524,8 @@ swift_image: - "PROJECT='swift'" - "PROJECT_REF={{ openstack_release }}" - "APT_MIRROR_HOST='{{ apt_mirror_host }}'" + - "PIP_PACKAGES='keystonemiddleware'" + - "DIST_PACKAGES='rsync'" tacker_image: context: "." diff --git a/playbooks/vars.yaml b/playbooks/vars.yaml index c8d650af..6e893358 100644 --- a/playbooks/vars.yaml +++ b/playbooks/vars.yaml @@ -515,6 +515,8 @@ swift_image: - "WHEELS='{{ image_registry.host }}/{{ image_registry.org }}/requirements:{{ image_tag }}'" - "KEEP_ALL_WHEELS=False" - "APT_MIRROR='{{ apt_mirror }}'" + - "PIP_PACKAGES='keystonemiddleware'" + - "DIST_PACKAGES='rsync'" tacker_image: context: "." diff --git a/scripts/requirements.sh b/scripts/requirements.sh index b112b2c8..7d974487 100755 --- a/scripts/requirements.sh +++ b/scripts/requirements.sh @@ -18,6 +18,10 @@ mv ${SOURCES_DIR}/requirements/{global-requirements.txt,upper-constraints.txt} / # Setuptools from constraints is not compatible with other constrainted packages [[ "${PROJECT_REF}" == "master" ]] && sed -i '/setuptools/d' /upper-constraints.txt +# As of setuptools 82.0.0 (released 2026-02-08), pkg_resources was removed from setuptools. +# The issue is with this package XStatic-Angular-Schema-Form +echo "setuptools<81" >> /upper-constraints.txt + # NOTE(mnaser): confluent-kafka fails to build under aarch64 because the version # of libfdkafka-dev in the distributions is too old (x86_64 relies # on the wheel inside PyPI). @@ -85,14 +89,14 @@ cat ${UPPER_CONSTRAINTS} # constrained on the version and we are building with --no-deps echo uwsgi enum-compat ${PIP_PACKAGES} | xargs -n1 | split -l1 -a3 if [[ "$KEEP_ALL_WHEELS" == "False" ]]; then - ls -1 | xargs -n1 -P20 -t bash -c 'set -x; pip wheel ${PIP_WHEEL_ARGS} --find-links /source-wheels --find-links / --no-deps --wheel-dir / -c /global-requirements.txt -c ${UPPER_CONSTRAINTS_BUILD} -r $1 || cat $1 >> /failure' _ | tee /tmp/wheels.txt + ls -1 | xargs -n1 -P20 -t bash -c 'set -x; pip wheel ${PIP_WHEEL_ARGS} --find-links /source-wheels --find-links / --no-deps --wheel-dir / --build-constraint ${UPPER_CONSTRAINTS_BUILD} -c /global-requirements.txt -c ${UPPER_CONSTRAINTS_BUILD} -r $1 || cat $1 >> /failure' _ | tee /tmp/wheels.txt # Remove native-binary wheels, we only want to keep wheels that we # compiled ourselves. awk -F'[ ,]+' '/^Skipping/ {gsub("-","_");print $2}' /tmp/wheels.txt | xargs -r -n1 bash -c 'ls /$1-*' _ | sort -u | xargs -t -r rm # Wheels built from unnamed constraints were removed with previous command. Move them back after deletion. [ ! -z "$(ls -A /source-wheels)" ] && mv /source-wheels/*.whl / else - ls -1 | xargs -n1 -P20 -t bash -c 'set -x; mkdir $1-wheels; pip wheel ${PIP_WHEEL_ARGS} --find-links /source-wheels --find-links / --wheel-dir /$(pwd)/$1-wheels -c /global-requirements.txt -c ${UPPER_CONSTRAINTS_BUILD} -r $1 || cat $1 >> /failure' _ + ls -1 | xargs -n1 -P20 -t bash -c 'set -x; mkdir $1-wheels; pip wheel ${PIP_WHEEL_ARGS} --find-links /source-wheels --find-links / --wheel-dir /$(pwd)/$1-wheels --build-constraint ${UPPER_CONSTRAINTS_BUILD} -c /global-requirements.txt -c ${UPPER_CONSTRAINTS_BUILD} -r $1 || cat $1 >> /failure' _ for dir in *-wheels/; do [ ! -z "$(ls -A ${dir})" ] && mv ${dir}*.whl /; done fi diff --git a/scripts/uv_build_venv.sh b/scripts/uv_build_venv.sh index 3e190a69..b0f4da89 100755 --- a/scripts/uv_build_venv.sh +++ b/scripts/uv_build_venv.sh @@ -34,7 +34,11 @@ fi # This line ensures that such constraint is absent. sed -i "/^${PROJECT}===/d" /upper-constraints.txt -uv pip install -c /global-requirements.txt -c /upper-constraints.txt \ +# As of setuptools 82.0.0 (released 2026-02-08), pkg_resources was removed from setuptools. +# The issue is with this package XStatic-Angular-Schema-Form +echo "setuptools<81" >> /upper-constraints.txt + +uv pip install --build-constraint /upper-constraints.txt -c /global-requirements.txt -c /upper-constraints.txt \ ${UV_PIP_ARGS} \ ${project_cmd} ${extra_projects_path} ${PIP_PACKAGES}