diff --git a/.ci/requirements-cibw.txt b/.ci/requirements-cibw.txt index fd4183aff35..c824c10bce7 100644 --- a/.ci/requirements-cibw.txt +++ b/.ci/requirements-cibw.txt @@ -1 +1 @@ -cibuildwheel==3.4.0 +cibuildwheel==3.4.1 diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index 7750a2e07b5..771671e82c0 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -204,6 +204,12 @@ function build_libavif { -DAVIF_CODEC_DAV1D=LOCAL ) fi + # libaom's riscv64 RVV code calls functions without declarations, which + # GCC 14 (manylinux_2_39) treats as errors. Disable arch-specific AOM + # optimizations for riscv64; QEMU-based builds don't benefit from them. + if [[ "$(uname -m)" == "riscv64" ]]; then + libavif_cmake_flags+=(-DAOM_TARGET_CPU=generic) + fi local out_dir=$(fetch_unpack https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$LIBAVIF_VERSION.tar.gz libavif-$LIBAVIF_VERSION.tar.gz) @@ -267,6 +273,13 @@ function build { fi build_simple libxcb $LIBXCB_VERSION https://www.x.org/releases/individual/lib + # libjpeg-turbo 3.1.4.1 simdcoverage.c references riscv64 RVV SIMD + # functions that are only in upstream main and not yet released. Disable + # SIMD for riscv64 to avoid the build error; there is no production + # riscv64 SIMD support in this version anyway. + if [[ "$(uname -m)" == "riscv64" ]]; then + HOST_CMAKE_FLAGS="${HOST_CMAKE_FLAGS} -DWITH_SIMD=FALSE" + fi build_libjpeg_turbo if [[ -n "$IS_MACOS" ]]; then # Custom tiff build to include jpeg; by default, configure won't include diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index d16c80323cd..7ce72286553 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -39,7 +39,7 @@ concurrency: cancel-in-progress: true env: - EXPECTED_DISTS: 66 + EXPECTED_DISTS: 68 FORCE_COLOR: 1 jobs: @@ -94,6 +94,12 @@ jobs: os: ubuntu-24.04-arm cibw_arch: aarch64 build: "*musllinux*" + - name: "manylinux_2_39 riscv64" + platform: linux + os: ubuntu-latest + cibw_arch: riscv64 + build: "cp3{12,13}-manylinux*" + manylinux: "manylinux_2_39" - name: "iOS arm64 device" platform: ios os: macos-latest @@ -116,6 +122,12 @@ jobs: with: python-version: "3.x" + - name: Set up QEMU + if: matrix.cibw_arch == 'riscv64' + uses: docker/setup-qemu-action@v4 + with: + platforms: riscv64 + - name: Install cibuildwheel run: | python3 -m pip install -r .ci/requirements-cibw.txt @@ -128,6 +140,7 @@ jobs: CIBW_ARCHS: ${{ matrix.cibw_arch }} CIBW_BUILD: ${{ matrix.build }} CIBW_ENABLE: cpython-prerelease pypy + CIBW_MANYLINUX_RISCV64_IMAGE: ${{ matrix.manylinux }} MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }} - uses: actions/upload-artifact@v7