Conversation
lib3mf publishes one Linux wheel, py3-none-manylinux2014_x86_64. The tag has no ABI half because the package ships no extension module: the whole API is the ACT-generated ctypes wrapper Lib3MF.py driving lib3mf.so, a 5.3 MB C++ shared library. The platform half is load-bearing all the same, so riscv64 needs a real build rather than a retag. The distribution is cut from 3MFConsortium/lib3mf_python, a packaging repo the source tree never references; the workflow mirrors its python-package.yml. That repo commits lib3mf.so as an x86_64 binary, lifted by prepare_pypi_release.py out of the lib3mf_sdk_v<version>.zip release asset, and the SDK is published for x86_64 Linux only. The library is BSD-3-Clause C++ with a plain CMake build and no architecture gates, so the job builds it from 3MFConsortium/lib3mf at the matching tag with upstream's own cmake/GenerateMake.sh, drops the result over the committed binary and then runs upstream's build_wheels.py unchanged. The patch adds riscv64 to the two hardcoded x86_64 tables that stop that working: setup.py's SUPPORTED_PLATFORMS gate, and get_platform_tag(), which returns the glibc 2.17 manylinux2014 baseline for every Linux host where riscv64's oldest profile is glibc 2.39. zlib, libzip and cpp-base64 are compiled into lib3mf.so and fast_float is inlined into it, so their licences are staged at the project root for setuptools' default glob to ship - upstream's own wheels carry only the binding's BSD licence. Nothing GPL is vendored: the library links libstdc++, libgcc_s, libm and libc and nothing else, exactly as the released x86_64 binary does. Tests are the packaging repo's own: the import and wrapper handshake its CI runs, plus its create_cube example (a full mesh build and 3MF write) and its interpreter-shutdown regression test.
luhenry
added a commit
that referenced
this pull request
Sep 21, 2026
cmake --build's default target also builds the C++ test suite, which links the vendored libressl in Libraries/ - several thousand extra translation units that never reach the wheel. LIB3MF_TESTS=OFF is the project's own switch for that and leaves lib3mf.so byte-for-byte the library the wheel needs. Cover what the C++ suite would have covered on the reader side by reading the example's cube.3mf back and checking its geometry, instead of only writing it.
Contributor
|
luhenry
added a commit
that referenced
this pull request
Sep 21, 2026
luhenry
marked this pull request as ready for review
September 21, 2026 14:29
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.
lib3mf2.5.0Compiles lib3mf, the 3MF Consortium's C++ implementation of the 3D Manufacturing Format, and ships it beside the ACT-generated ctypes wrapper. Upstream publishes no riscv64 wheel.
Mirrors upstream's
python-package.yml.Differs from upstream
lib3mf.sofrom 3MFConsortium/lib3mf at the matching tag - the packaging repo commits an x86_64 binary taken from the SDK release asset, which exists for x86_64 only.ubuntu-latest.LIB3MF_TESTS=OFF- the default target also builds the C++ suite and the libressl it links, neither of which reaches the wheel.Matrix: one
py3-nonewheel, as upstream - the package ships no extension module.Testing
create_cubeexample, a read-back of the 3MF it writes, and its interpreter-shutdown regression test to upstream's import check.License: Wheel bundles zlib, libzip, cpp-base64 and fast_float (all permissive); upstream ships no licence text for them, so the build adds it.
Patches
0001-Support-building-the-wheel-on-linux-riscv64.patch-Upstream-Status: To upstream. Without itsetup.pyrefuses to run off x86_64 and the wheel is taggedmanylinux2014_x86_64. Reproduces on any non-x86_64 host.Built on cp312; 4 tests passed.