Skip to content

fix: use cibuildwheel for building PyPI wheel - #126

Draft
SYMSCAE wants to merge 5 commits into
diffpy:nanobind_migration_testfrom
SYMSCAE:cibuildwheel
Draft

SYMSCAE wants to merge 5 commits into
diffpy:nanobind_migration_testfrom
SYMSCAE:cibuildwheel

Conversation

@SYMSCAE

@SYMSCAE SYMSCAE commented Nov 8, 2026

Copy link
Copy Markdown

This PR makes pyobjcryst use the shared wheel-building workflow. Resolves #125.

  • TODO: switch link back to the upstream repo once merged

SYMSCAE and others added 4 commits November 3, 2026 10:13
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The published wheels needed libObjCryst/libboost_python (Linux, macOS,
Windows) from a conda environment: the old shared wheel workflow ran
auditwheel and then removed the bundled libraries and pointed RPATH at the
conda prefix. The nanobind build links ObjCryst++, cctbx and newmat
statically and Boost is header-only, so build the wheels with cibuildwheel:

- add [tool.cibuildwheel] (cp312-cp315; manylinux x86_64, macOS native,
  Windows AMD64; tests run on every wheel)
- use the cibuildwheel shared workflow from SYMSCAE/release-scripts until
  it is released in scikit-package/release-scripts@v0
- derive the version from git tags with setuptools-scm instead of the
  static 2026.2.0rc0 placeholder
- declare packaging as a runtime dependency (used by powderpattern)
- trim unused ObjCryst++ submodule parts from the sdist
- guard the GCC-only -O0 flag and add MSVC settings in CMakeLists.txt
- ship the licenses of the statically linked code in the wheel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SYMSCAE

SYMSCAE commented Nov 8, 2026 •

Copy link
Copy Markdown
Author

@vincefn Please see if this looks good, I'll change the link and mark it ready once latest v0 is available. For your reference the generated wheels and test results (3.15) are here https://github.com/SYMSCAE/pyobjcryst/actions/runs/42438327523.

@vincefn

vincefn commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

LGTM - I did not have the time to test the wheels (leaving for a worshop in Beijing later today), though.

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.

2 participants