Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: manylinux_2_34 based on AlmaLinux 9 #1575

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
include:
- policy: "manylinux_2_28"
platform: "x86_64"
- policy: "manylinux_2_34"
platform: "x86_64"

env:
POLICY: ${{ matrix.policy }}
Expand Down
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ 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_34" PLATFORM="aarch64"
- arch: s390x
env: POLICY="manylinux_2_34" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="manylinux_2_34" PLATFORM="ppc64le"
- arch: arm64-graviton2
virt: vm
group: edge
Expand Down
12 changes: 12 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ The manylinux project supports:

- ``manylinux_2_28`` images for ``x86_64``, ``aarch64``, ``ppc64le`` and ``s390x``.

- ``manylinux_2_34`` images for ``x86_64``, ``aarch64``, ``ppc64le`` and ``s390x``.


Wheel packages compliant with those tags can be uploaded to
`PyPI <https://pypi.python.org>`_ (for instance with `twine
Expand Down Expand Up @@ -98,6 +100,16 @@ etc., we provide `Docker <https://docker.com/>`_ images where we've
done the work for you. The images are uploaded to `quay.io`_ and are tagged
for repeatable builds.

manylinux_2_34 (AlmaLinux 9 based)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Toolchain: GCC 12

- x86_64 image: ``quay.io/pypa/manylinux_2_34_x86_64``
- aarch64 image: ``quay.io/pypa/manylinux_2_34_aarch64``
- ppc64le image: ``quay.io/pypa/manylinux_2_34_ppc64le``
- s390x image: ``quay.io/pypa/manylinux_2_34_s390x``


manylinux_2_28 (AlmaLinux 8 based)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ if [ "${POLICY}" == "manylinux2014" ]; then
else
LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib64"
fi
elif [ "${POLICY}" == "manylinux_2_34" ]; then
BASEIMAGE="${MULTIARCH_PREFIX}almalinux:9"
DEVTOOLSET_ROOTPATH="/opt/rh/gcc-toolset-12/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_28" ]; then
BASEIMAGE="${MULTIARCH_PREFIX}almalinux:8"
DEVTOOLSET_ROOTPATH="/opt/rh/gcc-toolset-12/root"
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# default to latest supported policy, x86_64
ARG BASEIMAGE=amd64/almalinux:8
ARG POLICY=manylinux_2_28
ARG BASEIMAGE=amd64/almalinux:9
mayeut marked this conversation as resolved.
Show resolved Hide resolved
ARG POLICY=manylinux_2_34
ARG PLATFORM=x86_64
ARG DEVTOOLSET_ROOTPATH=/opt/rh/gcc-toolset-12/root
ARG LD_LIBRARY_PATH_ARG=${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst
Expand Down
3 changes: 3 additions & 0 deletions docker/build_scripts/install-libxcrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ if [ "$BASE_POLICY" == "musllinux" ]; then
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
echo "Skip libxcrypt installation on manylinux_2_28"
exit 0
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; then
echo "Skip libxcrypt installation on manylinux_2_34"
exit 0
fi

# We need perl 5.14+
Expand Down
14 changes: 9 additions & 5 deletions docker/build_scripts/install-runtime-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ source $MY_DIR/build_utils.sh


# MANYLINUX_DEPS: Install development packages (except for libgcc which is provided by gcc install)
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; 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"
mayeut marked this conversation as resolved.
Show resolved Hide resolved
elif [ "${BASE_POLICY}" == "musllinux" ]; then
MANYLINUX_DEPS="musl-dev libstdc++ glib-dev libx11-dev libxext-dev libxrender-dev mesa-dev libice-dev libsm-dev zlib-dev expat-dev"
Expand All @@ -42,11 +42,11 @@ else
fi

# RUNTIME_DEPS: Runtime dependencies. c.f. install-build-packages.sh
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; then
RUNTIME_DEPS="zlib bzip2 expat ncurses readline gdbm libpcap xz openssl keyutils-libs libkadm5 libcom_err libidn libcurl uuid libffi libdb"
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
RUNTIME_DEPS="${RUNTIME_DEPS} libXft"
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; then
RUNTIME_DEPS="${RUNTIME_DEPS} tk"
fi
elif [ "${BASE_POLICY}" == "musllinux" ]; then
Expand Down Expand Up @@ -86,7 +86,7 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
# Install mayeut/devtoolset-10 repo to get devtoolset-10
curl -fsSLo /etc/yum.repos.d/mayeut-devtoolset-10.repo https://copr.fedorainfracloud.org/coprs/mayeut/devtoolset-10/repo/custom-1/mayeut-devtoolset-10-custom-1.repo
fi
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; then
PACKAGE_MANAGER=dnf
BASETOOLS="${BASETOOLS} curl glibc-locale-source glibc-langpack-en hardlink hostname libcurl libnsl libxcrypt which"
# See https://unix.stackexchange.com/questions/41784/can-yum-express-a-preference-for-x86-64-over-i386-packages
Expand All @@ -97,7 +97,11 @@ elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
sed -i '/^override_install_langs=/d' /etc/yum.conf
dnf -y upgrade
dnf -y install dnf-plugins-core
dnf config-manager --set-enabled powertools # for yasm
if [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; then
dnf config-manager --set-enabled crb
else
dnf config-manager --set-enabled powertools # for yasm
fi
mayeut marked this conversation as resolved.
Show resolved Hide resolved
TOOLCHAIN_DEPS="gcc-toolset-12-binutils gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-gcc-gfortran"
if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then
TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} yasm"
Expand Down
2 changes: 1 addition & 1 deletion docker/build_scripts/update-system-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
fi
yum clean all
rm -rf /var/cache/yum
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; then
dnf -y upgrade
dnf clean all
rm -rf /var/cache/yum
mayeut marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 1 addition & 1 deletion tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
PACKAGE_MANAGER=yum
elif [ "${AUDITWHEEL_POLICY:0:10}" == "musllinux_" ]; then
PACKAGE_MANAGER=apk
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; then
PACKAGE_MANAGER=dnf
else
echo "Unsupported policy: '${AUDITWHEEL_POLICY}'"
Expand Down