Conversation
pymongo ships per-interpreter compiled wheels (bson._cbson, pymongo._cmessage) for every arch but riscv64. Build-from-checkout with cibuildwheel, inheriting upstream's [tool.cibuildwheel] config. PYMONGO_C_EXT_MUST_BUILD=1 keeps _setup.py's optional-extension fallback from silently shipping a pure-Python wheel. Tests run upstream's fail_if_no_c.py plus the server-free subset of the suite that exercises the C extension, staged via test-sources so the installed wheel is imported instead of the checkout. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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-pymongo.yml, building riscv64 wheels forpymongo 4.17.0 and publishing them to
pypi.riseproject.dev.pymongo ships per-interpreter compiled wheels (
bson._cbson,pymongo._cmessage) for every architecture on PyPI except riscv64, so thematrix is
cp312/cp313/cp314/cp314t(not abi3).Shape: build-from-checkout of the upstream
4.17.0tag,pypa/cibuildwheelwith
only: <tag>-manylinux_riscv64, inheriting upstream's[tool.cibuildwheel](build-frontend = "build",skip = "pp* *-musllinux*")from
pyproject.toml— same as upstream's owndist.yml.Two riscv-relevant details:
PYMONGO_C_EXT_MUST_BUILD=1—_setup.py'scustom_build_extswallowscompile failures and ships a pure-Python wheel that still carries the
manylinux_riscv64tag (CLAUDE.md gotcha 20). This makes a failure fatal.test-sourcesstagestest/,tools/andpyproject.tomlintocibuildwheel's empty test cwd. Run from the checkout instead, pytest would
put the repo root on
sys.pathand import the pure-Pythonbson/sourcerather than the installed wheel — verified locally,
bson.has_c()wasFalsethat way.Testing mirrors upstream's wheel test (
tools/fail_if_no_c.py) and adds thesubset of the suite that exercises the C extension without a running mongod —
including the BSON spec corpus. Locally (x86-independent check on macOS/arm64):
266 passed, 45 skipped, 33 subtests passed, with
bson.has_c()true.