Skip to content

feat: try riscv64 #1743

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ jobs:
import json
reduced = [
("x86_64", "ubuntu-24.04", ("manylinux2014", "manylinux_2_28", "manylinux_2_34", "musllinux_1_2")),
("aarch64", "ubuntu-24.04-arm", ("manylinux2014", "manylinux_2_28", "manylinux_2_34", "musllinux_1_2")),
("aarch64", "ubuntu-24.04-arm", ("manylinux2014", "manylinux_2_28", "manylinux_2_34", "manylinux_2_39", "musllinux_1_2")),
("i686", "ubuntu-24.04", ("manylinux2014", "manylinux_2_28", "manylinux_2_34", "musllinux_1_2")),
("armv7l", "ubuntu-24.04-arm", ("manylinux_2_31", "musllinux_1_2")),
("riscv64", "ubuntu-24.04", ("manylinux_2_39", "musllinux_1_2")),
("s390x", "ubuntu-24.04", ("musllinux_1_2",)),
]
expanded = [{"policy": policy, "platform": platform, "runner": runner} for platform, runner, policies in reduced for policy in policies]
Expand Down Expand Up @@ -79,7 +80,7 @@ jobs:
fetch-depth: 50

- name: Set up QEMU
if: matrix.platform == 's390x'
if: matrix.platform == 's390x' || matrix.platform == 'riscv64'
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
Expand Down
20 changes: 19 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ The manylinux project supports:

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

- ``manylinux_2_39`` images for ``aarch64`` and ``riscv64``.

- ``musllinux_1_2`` images for ``x86_64``, ``i686``, ``aarch64``, ``ppc64le``, ``s390x`` and ``armv7l``.


Expand Down Expand Up @@ -93,6 +95,23 @@ 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_39 (AlmaLinux/RockyLinux 10 based) - ALPHA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Toolchain: GCC 14

- aarch64 image: ``quay.io/pypa/manylinux_2_39_aarch64``
- riscv64 image: ``quay.io/pypa/manylinux_2_39_riscv64``

Built wheels are also expected to be compatible with other
distros using glibc 2.39 or later, including:

- Debian 13+
- Ubuntu 24.04+
- Fedora 40+
- CentOS/RHEL 10+


manylinux_2_34 (AlmaLinux 9 based) - ALPHA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -121,7 +140,6 @@ distros using glibc 2.34 or later, including:
- CentOS/RHEL 9+



manylinux_2_31 (Ubuntu 20.04 based) - armv7l only - BETA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
12 changes: 12 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ elif [ "${POLICY}" == "manylinux_2_35" ]; then
DEVTOOLSET_ROOTPATH=
PREPEND_PATH=
LD_LIBRARY_PATH_ARG=
elif [ "${POLICY}" == "manylinux_2_39" ]; then
BASEIMAGE="quay.io/almalinuxorg/almalinux:10"
case "${PLATFORM}" in
x86_64) GOARCH="amd64/v2";;
riscv64) BASEIMAGE="rockylinux/rockylinux:10";;
esac
# DEVTOOLSET_ROOTPATH="/opt/rh/gcc-toolset-15/root"
# PREPEND_PATH="/usr/local/bin:${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"
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] There are commented-out toolchain configuration lines for gcc-toolset-15. Consider removing these commented lines or adding a TODO comment explaining why they're preserved for future reference.

Suggested change
# LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst"
# LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst"
# TODO: These lines are placeholders for potential future support for gcc-toolset-15.
# If gcc-toolset-15 becomes relevant, uncomment and update these lines accordingly.

Copilot uses AI. Check for mistakes.

DEVTOOLSET_ROOTPATH=
PREPEND_PATH=
LD_LIBRARY_PATH_ARG=
elif [ "${POLICY}" == "musllinux_1_2" ]; then
BASEIMAGE="alpine:3.22"
DEVTOOLSET_ROOTPATH=
Expand Down
5 changes: 3 additions & 2 deletions deploy_multiarch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

IMAGES=(manylinux2014 manylinux_2_28 manylinux_2_31 manylinux_2_34 musllinux_1_2)
IMAGES=(manylinux2014 manylinux_2_28 manylinux_2_31 manylinux_2_34 manylinux_2_39 musllinux_1_2)

podman login -u "${QUAY_USERNAME}" -p "${QUAY_PASSWORD}" quay.io

Expand Down Expand Up @@ -32,7 +32,8 @@ for IMAGE in "${IMAGES[@]}"; do

case ${IMAGE} in
manylinux_2_31) ARCHS=("armv7l");;
musllinux_1_2) ARCHS=("x86_64" "i686" "aarch64" "armv7l" "ppc64le" "s390x");;
manylinux_2_39) ARCHS=("aarch64" "riscv64");;
musllinux_1_2) ARCHS=("x86_64" "i686" "aarch64" "armv7l" "ppc64le" "s390x" "riscv64");;
*) ARCHS=("x86_64" "i686" "aarch64" "ppc64le" "s390x");;
esac

Expand Down
6 changes: 6 additions & 0 deletions docker/build_scripts/finalize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ for TOOL_PATH in "${MY_DIR}/requirements-tools/"*; do
case ${AUDITWHEEL_PLAT}-${TOOL} in
musllinux*_ppc64le-uv) continue;; # uv doesn't provide musl ppc64le wheels due to Rust issues
musllinux*_s390x-uv) continue;; # uv doesn't provide musl s390x wheels due to Rust issues
*_riscv64-uv) continue;; # no uv for riscv64
*_riscv64-cmake|*_riscv64-swig) manylinux_pkg_install "${TOOL}";;
*_riscv64-patchelf)
manylinux_pkg_install cmake
pipx install patchelf==0.17.2.2
;;
*) pipx install --pip-args="--require-hashes -r ${TOOL_PATH} --only-binary" "${TOOL}";;
esac
done
Expand Down
9 changes: 7 additions & 2 deletions docker/build_scripts/install-runtime-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ elif [ "${OS_ID_LIKE}" == "rhel" ]; then
echo "tsflags=nodocs" >> /etc/dnf/dnf.conf
dnf -y upgrade
EPEL=epel-release
if [ "${AUDITWHEEL_ARCH}" == "i686" ]; then
if [ "${AUDITWHEEL_ARCH}" == "i686" ] || [ "${AUDITWHEEL_ARCH}" == "riscv64" ]; then
EPEL=
fi
dnf -y install dnf-plugins-core ${EPEL}
Expand All @@ -130,7 +130,12 @@ elif [ "${OS_ID_LIKE}" == "rhel" ]; then
else
dnf config-manager --set-enabled crb
fi
TOOLCHAIN_DEPS=(gcc-toolset-14-binutils gcc-toolset-14-gcc gcc-toolset-14-gcc-c++ gcc-toolset-14-gcc-gfortran gcc-toolset-14-libatomic-devel)
if [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_34" ]; then
TOOLCHAIN_DEPS=(gcc-toolset-14-binutils gcc-toolset-14-gcc gcc-toolset-14-gcc-c++ gcc-toolset-14-gcc-gfortran gcc-toolset-14-libatomic-devel)
else
# TOOLCHAIN_DEPS=(gcc-toolset-15-binutils gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ gcc-toolset-15-gcc-gfortran gcc-toolset-15-libatomic-devel)
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Similar to the build.sh file, there's a commented-out gcc-toolset-15 configuration. Consider removing this commented line or adding documentation explaining its purpose.

Suggested change
# TOOLCHAIN_DEPS=(gcc-toolset-15-binutils gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ gcc-toolset-15-gcc-gfortran gcc-toolset-15-libatomic-devel)
# TOOLCHAIN_DEPS=(gcc-toolset-15-binutils gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ gcc-toolset-15-gcc-gfortran gcc-toolset-15-libatomic-devel)
# The above configuration is commented out because gcc-toolset-15 is not currently supported or required for the current setup.

Copilot uses AI. Check for mistakes.

TOOLCHAIN_DEPS=(binutils gcc gcc-c++ gcc-gfortran libatomic)
fi
if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then
TOOLCHAIN_DEPS+=(yasm)
fi
Expand Down
2 changes: 1 addition & 1 deletion docker/tests/ctest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 4.0)
cmake_minimum_required(VERSION 3.30)
project(manylinux_ctest)
include(CTest)

Expand Down