Add necessary packages to Swift image
Signed-off-by: Vladimir Kozhukalov <kozhukalov@gmail.com> Change-Id: Ic50a6740671f19346f74d5e2cd70ef544e65af27
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: "."
|
||||
|
||||
@@ -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: "."
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user