Skip to content

Commit

Permalink
feat: add manylinux_2_31_armv7l image
Browse files Browse the repository at this point in the history
This reverts commit e09f5845680c23699efbb240d8e466efe2de11ed.
  • Loading branch information
mayeut committed Nov 4, 2024
1 parent d88418f commit 6514b95
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
env: POLICY="manylinux_2_28" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="manylinux_2_28" PLATFORM="ppc64le"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="manylinux_2_31" PLATFORM="armv7l"
- arch: arm64-graviton2
virt: vm
group: edge
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ elif [ "${POLICY}" == "manylinux_2_28" ]; then
DEVTOOLSET_ROOTPATH="/opt/rh/gcc-toolset-13/root"
PREPEND_PATH="${DEVTOOLSET_ROOTPATH}/usr/bin:"
LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst"
elif [ "${POLICY}" == "manylinux_2_31" ]; then
BASEIMAGE="ubuntu:20.04"
DEVTOOLSET_ROOTPATH=
PREPEND_PATH=
LD_LIBRARY_PATH_ARG=
elif [ "${POLICY}" == "manylinux_2_34" ]; then
BASEIMAGE="almalinux:9"
DEVTOOLSET_ROOTPATH="/opt/rh/gcc-toolset-13/root"
Expand Down
4 changes: 3 additions & 1 deletion docker/build_scripts/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] ; then
export TCLTK_LIBS="-ltk8.6 -ltcl8.6"
fi

if [ "${BASE_POLICY}_${AUDITWHEEL_ARCH}" == "musllinux_armv7l" ]; then
if [ "${BASE_POLICY}_${AUDITWHEEL_ARCH}" == "manylinux_armv7l" ]; then
CONFIGURE_ARGS="${CONFIGURE_ARGS} --build=armv7l-unknown-linux-gnueabihf"
elif [ "${BASE_POLICY}_${AUDITWHEEL_ARCH}" == "musllinux_armv7l" ]; then
CONFIGURE_ARGS="${CONFIGURE_ARGS} --build=arm-linux-musleabihf"
fi

Expand Down
2 changes: 2 additions & 0 deletions docker/build_scripts/build-openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ fi
if [ "${OS_ID_LIKE}" = "rhel" ];then
manylinux_pkg_remove openssl-devel
elif [ "${OS_ID_LIKE}" = "debian" ];then
manylinux_pkg_remove libssl-dev
elif [ "${OS_ID_LIKE}" = "alpine" ]; then
manylinux_pkg_remove openssl-dev
fi
Expand Down
11 changes: 11 additions & 0 deletions docker/build_scripts/build_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ else
PACKAGE_MANAGER=dnf
elif command -v yum >/dev/null 2>&1; then
PACKAGE_MANAGER=yum
elif command -v apt-get >/dev/null 2>&1; then
PACKAGE_MANAGER=apt
else
echo "unsupported image"
exit 1
Expand All @@ -28,6 +30,7 @@ fi
OS_ID_LIKE=$(. /etc/os-release; echo "${ID} ${ID_LIKE:-}")
case "${OS_ID_LIKE}" in
*rhel*) OS_ID_LIKE=rhel;;
*debian) OS_ID_LIKE=debian;;
*alpine*) OS_ID_LIKE=alpine;;
*) echo "unsupported image"; exit 1;;
esac
Expand Down Expand Up @@ -88,6 +91,9 @@ function manylinux_pkg_install {
yum -y install "$@"
elif [ "${PACKAGE_MANAGER}" = "dnf" ]; then
dnf -y install --allowerasing "$@"
elif [ "${PACKAGE_MANAGER}" = "apt" ]; then
DEBIAN_FRONTEND=noninteractive apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends "$@"
elif [ "${PACKAGE_MANAGER}" = "apk" ]; then
apk add --no-cache "$@"
else
Expand All @@ -100,6 +106,8 @@ function manylinux_pkg_remove {
yum erase -y "$@"
elif [ "${PACKAGE_MANAGER}" = "dnf" ];then
dnf erase -y "$@"
elif [ "${PACKAGE_MANAGER}" = "apt" ];then
DEBIAN_FRONTEND=noninteractive apt-get remove -y "$@"
elif [ "${PACKAGE_MANAGER}" = "apk" ]; then
apk del "$@"
else
Expand All @@ -114,6 +122,9 @@ function manylinux_pkg_clean {
elif [ "${PACKAGE_MANAGER}" = "dnf" ]; then
dnf clean all
rm -rf /var/cache/dnf
elif [ "${PACKAGE_MANAGER}" = "apt" ]; then
DEBIAN_FRONTEND=noninteractive apt-get clean -qq
rm -rf /var/lib/apt/lists/*
elif [ "${PACKAGE_MANAGER}" = "apk" ]; then
:
else
Expand Down
1 change: 1 addition & 0 deletions docker/build_scripts/finalize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ pipx upgrade-shared --pip-args="--no-index --find-links=/tmp/pinned-wheels"
for TOOL_PATH in $(find ${MY_DIR}/requirements-tools -type f); do
TOOL=$(basename ${TOOL_PATH})
case ${AUDITWHEEL_PLAT}-${TOOL} in
manylinux*_armv7l-swig|manylinux*_armv7l-cmake) apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y ${TOOL};;
musllinux*_s390x-uv) continue;; # uv doesn't provide musl s390x wheels due to Rust issues
*) pipx install --pip-args="--require-hashes -r ${TOOL_PATH} --only-binary" ${TOOL};;
esac
Expand Down
2 changes: 2 additions & 0 deletions docker/build_scripts/install-build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ if [ "${OS_ID_LIKE}" = "rhel" ]; then
else
COMPILE_DEPS="${COMPILE_DEPS} libidn2-devel tk-devel"
fi
elif [ "${OS_ID_LIKE}" == "debian" ]; then
COMPILE_DEPS="libbz2-dev libncurses-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev liblzma-dev openssl libssl-dev libkeyutils-dev libkrb5-dev comerr-dev libidn2-0-dev libcurl4-openssl-dev uuid-dev libffi-dev linux-headers-generic"
elif [ "${OS_ID_LIKE}" == "alpine" ]; then
COMPILE_DEPS="bzip2-dev ncurses-dev readline-dev tk-dev gdbm-dev libpcap-dev xz-dev openssl openssl-dev keyutils-dev krb5-dev libcom_err libidn-dev curl-dev util-linux-dev libffi-dev linux-headers"
else
Expand Down
12 changes: 12 additions & 0 deletions docker/build_scripts/install-runtime-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ source $MY_DIR/build_utils.sh
# MANYLINUX_DEPS: Install development packages (except for libgcc which is provided by gcc install)
if [ "${OS_ID_LIKE}" == "rhel" ]; then
MANYLINUX_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel zlib-devel expat-devel"
elif [ "${OS_ID_LIKE}" == "debian" ]; then
MANYLINUX_DEPS="libc6-dev libglib2.0-dev libx11-dev libxext-dev libxrender-dev libgl1-mesa-dev libice-dev libsm-dev zlib1g-dev libexpat1-dev libssl-dev"
elif [ "${OS_ID_LIKE}" == "alpine" ]; then
MANYLINUX_DEPS="musl-dev libstdc++ glib-dev libx11-dev libxext-dev libxrender-dev mesa-dev libice-dev libsm-dev zlib-dev expat-dev"
else
Expand All @@ -53,6 +55,13 @@ if [ "${OS_ID_LIKE}" == "rhel" ]; then
# for graalpy
RUNTIME_DEPS="${RUNTIME_DEPS} libxcrypt-compat"
fi
elif [ "${OS_ID_LIKE}" == "debian" ]; then
RUNTIME_DEPS="zlib1g libbz2-1.0 libexpat1 libncurses6 libreadline8 tk libgdbm6 libdb5.3 libpcap0.8 liblzma5 libkeyutils1 libkrb5-3 libcom-err2 libidn2-0 libcurl4 uuid"
if [ "${AUDITWHEEL_POLICY}" == "manylinux_2_31" ]; then
RUNTIME_DEPS="${RUNTIME_DEPS} libffi7 libssl1.1"
else
RUNTIME_DEPS="${RUNTIME_DEPS} libffi8 libssl3"
fi
elif [ "${OS_ID_LIKE}" == "alpine" ]; then
RUNTIME_DEPS="zlib bzip2 expat ncurses-libs readline tk gdbm db xz openssl keyutils-libs krb5-libs libcom_err libidn2 libcurl libuuid libffi"
else
Expand Down Expand Up @@ -119,6 +128,9 @@ elif [ "${OS_ID_LIKE}" == "rhel" ]; then
if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then
TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} yasm"
fi
elif [ "${OS_ID_LIKE}" == "debian" ]; then
TOOLCHAIN_DEPS="binutils gcc g++ gfortran"
BASETOOLS="${BASETOOLS} gpg gpg-agent hardlink hostname locales xz-utils"
elif [ "${OS_ID_LIKE}" == "alpine" ]; then
TOOLCHAIN_DEPS="binutils gcc g++ gfortran"
BASETOOLS="${BASETOOLS} gnupg util-linux shadow tar"
Expand Down
21 changes: 14 additions & 7 deletions docker/build_scripts/update-system-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ if [ "${PACKAGE_MANAGER}" == "yum" ]; then
fi
elif [ "${PACKAGE_MANAGER}" == "dnf" ]; then
dnf -y upgrade
elif [ "${PACKAGE_MANAGER}" == "apt" ]; then
DEBIAN_FRONTEND=noninteractive apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get upgrade -qq -y
elif [ "${PACKAGE_MANAGER}" == "apk" ]; then
apk upgrade --no-cache
else
Expand All @@ -30,20 +33,24 @@ manylinux_pkg_clean
fixup-mirrors

# do we want to update locales ?
if [ "${OS_ID_LIKE}" == "rhel" ]; then
if [ "${OS_ID_LIKE}" == "rhel" ] || [ "${OS_ID_LIKE}" == "debian" ]; then
LOCALE_ARCHIVE=/usr/lib/locale/locale-archive
TIMESTAMP_FILE=${LOCALE_ARCHIVE}.ml.timestamp
if [ ! -f ${TIMESTAMP_FILE} ] || [ ${LOCALE_ARCHIVE} -nt ${TIMESTAMP_FILE} ]; then
# upgrading glibc-common can end with removal on en_US.UTF-8 locale
localedef -i en_US -f UTF-8 en_US.UTF-8

# if we updated glibc, we need to strip locales again...
if localedef --list-archive | grep -sq -v -i ^en_US.utf8; then
localedef --list-archive | grep -v -i ^en_US.utf8 | xargs localedef --delete-from-archive
fi
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
mv -f ${LOCALE_ARCHIVE} ${LOCALE_ARCHIVE}.tmpl
build-locale-archive --install-langs="en_US.utf8"
if [ "${OS_ID_LIKE}" == "rhel" ]; then
if localedef --list-archive | grep -sq -v -i ^en_US.utf8; then
localedef --list-archive | grep -v -i ^en_US.utf8 | xargs localedef --delete-from-archive
fi
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
mv -f ${LOCALE_ARCHIVE} ${LOCALE_ARCHIVE}.tmpl
build-locale-archive --install-langs="en_US.utf8"
fi
elif [ "${OS_ID_LIKE}" == "debian" ]; then
update-locale LANG=en_US.UTF-8
fi
touch ${TIMESTAMP_FILE}
fi
Expand Down

0 comments on commit 6514b95

Please sign in to comment.