Skip to content

tenseal: Add version 0.3.18 - #3127

Draft
luhenry wants to merge 3 commits into
mainfrom
tenseal
Draft

luhenry wants to merge 3 commits into
mainfrom
tenseal

Conversation

@luhenry

@luhenry luhenry commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Compiles pybind11 bindings over Microsoft SEAL, protobuf and xtensor, all fetched and built from source by CMake. Upstream publishes no riscv64 wheel.

Mirrors upstream's publish_wheels.yml and tests.yml.

Differs from upstream

  • musllinux dropped - the registry has no musllinux numpy, which tenseal imports at load.
  • MAKEFLAGS=-j$(nproc) - bounds the otherwise unbounded make -j on the riscv64 runner.

Matrix: cp312/cp313/cp314; no cp314t, as upstream (pybind11 2.12 has no free-threaded support).

Testing

  • Python suites run on every interpreter, not only the newest; C++ suite on cp314 as upstream.
  • tests and pytest.ini staged so the suites import the installed wheel, not the checkout.

License: Wheel statically links SEAL, GSL, nlohmann/json (MIT), protobuf, pybind11, xtensor, xtl, xsimd, zstd (BSD-3-Clause) and zlib (Zlib); upstream ships no licence text for them, so the build adds it.

Patches

  • 0001-ship-the-licences-of-the-FetchContent-d-C-dependencies.patch - To upstream [not yet submitted]. Without it the wheel carries only TenSEAL's own licence. Reproduces on x86.

riscv64 CI pending.

luhenry added a commit that referenced this pull request Oct 13, 2026
xsimd 7.4.10 has no RISC-V backend, so XSIMD_DEFAULT_ALIGNMENT is 0
there and xsimd::aligned_allocator throws std::bad_alloc on every
xtensor allocation: every PlainTensor/CKKSTensor/BFVTensor failed to
construct in the Python test suite. Build without XTENSOR_USE_XSIMD on
riscv64, and rerun the workflow when patches/tenseal/ changes.
scikit-image's pillow>=10.1 and the bare numpy dep both resolve to
newer, riscv64-wheel-less PyPI sdist releases without this (gotcha
291): pillow's sdist build then fails outright with
RequiredDependencyException: jpeg (no libjpeg headers in the
manylinux image), and numpy burns ~20 minutes compiling from source
before even getting there. PIP_ONLY_BINARY=numpy,pillow makes pip
pick our registry's riscv64 wheels for both across every interpreter
in the matrix.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant