Conversation
luhenry
commented
Aug 25, 2026
Comment on lines
+64
to
+72
| CIBW_BEFORE_ALL_LINUX: >- | ||
| cd /tmp && | ||
| curl -OL --retry 5 https://download.osgeo.org/geos/geos-$GEOS_VERSION.tar.bz2 && | ||
| tar xfj geos-$GEOS_VERSION.tar.bz2 && | ||
| cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF | ||
| -S geos-$GEOS_VERSION -B geos-build && | ||
| cmake --build geos-build -j "$(nproc)" && | ||
| cmake --install geos-build && | ||
| ldconfig |
Member
Author
There was a problem hiding this comment.
Build the docker image just like upstream https://github.com/shapely/shapely/blob/5fb639d1056888d135fe56bfaf750c9648addeec/.github/workflows/release.yml#L93-L131
Member
Author
There was a problem hiding this comment.
Done in c0a8c71 — the GEOS build now goes through ci/Dockerfile with docker/setup-buildx-action + docker/build-push-action (platforms: linux/riscv64, load: true, type=gha cache), and CIBW_MANYLINUX_RISCV64_IMAGE points at the resulting manylinux_2_39_riscv64_geos:3.13.1 tag, mirroring upstream's release.yml. CIBW_BEFORE_ALL_LINUX is gone.
Two riscv64-specific notes:
BASETAGis2026.08.24-1rather than upstream's2025.08.02-1; themanylinux_2_39_riscv64image family only starts at2025.11.01-4, so upstream's exact base tag does not exist for this arch.- buildx (
buildx-v0.36.1.linux-riscv64),moby/buildkit:buildx-stable-1and the manylinux image all publish riscv64, so the image builds natively on the runner with no emulation.
Mirrors shapely's release.yml Linux job, narrowed to riscv64. Upstream bakes GEOS 3.13.1 into a derived manylinux image (ci/Dockerfile); we build the same GEOS from source in CIBW_BEFORE_ALL instead, so no riscv64 base image has to be built. Test command, test requirements and skips come from upstream's [tool.cibuildwheel] table unchanged. Validated in quay.io/pypa/manylinux_2_39_aarch64: the wheel carries the three extension modules, the vendored libgeos/libgeos_c and LICENSE_GEOS, and 'pytest --pyargs shapely.tests' reports 6260 passed, 100 skipped, 3 xfailed.
unzip is not guaranteed on the self-hosted riscv64 runner.
cibuildwheel 4 removed the cpython-freethreading enable group that shapely 2.1.2's pyproject.toml declares, and CIBW_ENABLE appends to the pyproject list instead of replacing it, so the run fails before any build starts.
Replaces the CIBW_BEFORE_ALL_LINUX GEOS build with upstream's own recipe: docker/setup-buildx-action + docker/build-push-action over the checkout's ci/Dockerfile, with CIBW_MANYLINUX_RISCV64_IMAGE pointing at the result. The base image is quay.io/pypa/manylinux_2_39_riscv64 pinned to a dated tag, the riscv64 analogue of upstream's `basetag`; buildx, buildkit and the manylinux image all publish riscv64 builds, so the image builds natively on the runner. No ldconfig is needed after `cmake --install`: auditwheel resolves /usr/local/lib from /etc/ld.so.conf.d rather than the ld cache (load_ld_paths(Libc.GLIBC) reports it), which is why upstream's Dockerfile does without one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.github/workflows/build-shapely.yml, building shapely 2.1.2 riscv64 wheels for cp312/cp313/cp314/cp314t.Based on shapely's
release.yml, narrowed to riscv64:docker/setup-buildx-action+docker/build-push-actionover the checkout's ownci/Dockerfile, withCIBW_MANYLINUX_RISCV64_IMAGEpointing at the result.BASEIMAGEisquay.io/pypa/manylinux_2_39_riscv64pinned to a dated tag, the riscv64 analogue of upstream'sbasetag. buildx, buildkit and the manylinux image all publish riscv64 builds, so the image builds natively on the runner and thetype=ghacache arguments are kept.cp ci/wheelbuilder/LICENSE_GEOS .is upstream's own step, and it is what puts the GEOS licence into the wheel next to shapely's own — the wheel vendorslibgeos/libgeos_c.--no-build-isolation+CIBW_BEFORE_BUILDshape is kept, minus its--pre cythonspecial case for free-threaded builds: that is labelled TEMP upstream and Cython has shipped official free-threading support since 3.1.cpython-freethreadingenable group shapely 2.1.2'spyproject.tomlstill asks for, andCIBW_ENABLEappends to that list rather than replacing it.test-requires,test-command(pytest --pyargs shapely.tests) andskipare inherited from upstream's[tool.cibuildwheel]table unchanged.PIP_EXTRA_INDEX_URLresolves numpy from pypi.riseproject.dev for both the build and the test phase.Local validation in
quay.io/pypa/manylinux_2_39_aarch64(same image family, arch-independent parts): GEOS builds andgeos-configis found,auditwheel repairvendorslibgeos-*.so.3.13.1andlibgeos_c-*.so.1.19.2, the wheel containsshapely/{lib,_geos,_geometry_helpers}.cpython-312-*.soplusLICENSE.txtandLICENSE_GEOS, andpytest --pyargs shapely.testsgives 6260 passed, 100 skipped, 3 xfailed.Trigger: shapely:2.1.2