pymongocrypt: add build-pymongocrypt.yml for riscv64 wheels - #1693
Merged
Conversation
Builds libmongocrypt from source with CMake (DISABLE_NATIVE_CRYPTO, matching upstream's own "-nocrypto" distribution, since pymongocrypt always supplies its own crypto hooks via the cryptography package) and packages it with pymongocrypt's own hatchling build hook, mirroring release.sh's build_manylinux_wheel + auditwheel repair. No riscv64 libmongocrypt binary is published upstream, so this is the only build shape that works here.
luhenry
added a commit
that referenced
this pull request
Sep 10, 2026
…ntainer Without an explicit BUILD_VERSION, libmongocrypt's CMakeLists.txt falls back to etc/calc_release_version.py, which runs git rev-parse inside /workspace and fails with "detected dubious ownership" since the actions/checkout user differs from the manylinux container's build user. Passing -DBUILD_VERSION explicitly (from the same libmongocrypt-version.txt the wheel already reads) skips that code path entirely, matching CMakeLists.txt's own `if (BUILD_VERSION STREQUAL "0.0.0")` guard. Also restores the upstream binding/crypto unit test step and asserts the built .so reports the pinned version.
…he wheel The host runner's apt packages don't include libffi-dev, so pip's default attempt to build cffi from source (public PyPI has no riscv64 wheel for it) fails with "ffi.h: No such file or directory". Both cffi and cryptography already have riscv64 wheels on pypi.riseproject.dev; point pip there and require binaries for the two of them.
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.
pymongocrypt1.19.0Compiles libmongocrypt, MongoDB's client-side field-level encryption library, and packages it as the native payload of pymongocrypt's cffi bindings. Upstream publishes no riscv64 wheel, and no riscv64 libmongocrypt binary exists on the release page either.
Mirrors upstream's
release.sh(build_manylinux_wheel+auditwheel repair).Differs from upstream
-DDISABLE_NATIVE_CRYPTO=ON, matching the "-nocrypto" tarball upstream already downloads for every other platform.Testing
test_binding.py/test_crypto.pyagainst it;test_mongocrypt.pyis skipped - needspymongo-auth-aws, not yet on the registry.License: OK
Built on riscv64; wheel install, bindings import, crypto-hooks check, and 7 pytest tests all pass.