Skip to content

Commit 43835e9

Browse files
skilledwolfclaude
andcommitted
fix(ci): restore [tool.cibuildwheel] wheel provisioning dropped in reorg
fb81931 ("reorganize native extension package") deleted the [tool.cibuildwheel] block from pyproject, orphaning the ci/before-all FFTW build scripts (and wheels.yml). With nothing to wire before-all, tag-triggered wheel builds fail at CMake's FFTW check ("FFTW (double precision) not found") and the PyPI publish job is skipped — which is exactly what happened on v1.0.4. Restore the block from the last good release (v1.0.3): before-all builds FFTW from source in the manylinux container (and on macOS arm64), the linux environment block points pkg-config/CMake at it, and auditwheel/delocate bundle the shared lib into the wheel. wheels.yml and ci/*.sh are byte-identical to v1.0.3, so this alone re-arms the pipeline. Deltas vs v1.0.3: - test-command -> `python -c "import cpp_hf"` (old ci/smoke_test.py called the since-renamed hartreefock_iteration_cpp API; import still validates the native ext + FFTW bundling). - license-files/sdist blocks not restored (THIRD_PARTY_NOTICES.md was also removed in the reorg); LICENSE still ships. - build set adds cp313 (was cp311-312). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent cfb55f5 commit 43835e9

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,44 @@ CMAKE_OSX_DEPLOYMENT_TARGET = { env = "MACOSX_DEPLOYMENT_TARGET", default = "11.
5555

5656
[tool.pytest.ini_options]
5757
testpaths = ["tests"]
58+
59+
# ---------------------------------------------------------------------------
60+
# cibuildwheel: cross-platform wheel provisioning. Restored after fb81931
61+
# ("reorganize native extension package") dropped this block — manylinux ships
62+
# no FFTW, so before-all builds it from source into .cache/fftw-3.3.10-<arch>,
63+
# the environment block points CMake's pkg-config finder at it, and repair
64+
# bundles the shared lib into the wheel. wheels.yml and ci/*.sh are unchanged
65+
# from the last good release (v1.0.3).
66+
# ---------------------------------------------------------------------------
67+
[tool.cibuildwheel]
68+
build = "cp311-* cp312-* cp313-*"
69+
skip = "pp* *-musllinux_*"
70+
# API-agnostic load test: confirms the native extension (FFTW/OpenMP linked)
71+
# imports from the repaired wheel. (The old ci/smoke_test.py used a since-
72+
# renamed API.)
73+
test-command = 'python -c "import cpp_hf"'
74+
75+
[tool.cibuildwheel.linux]
76+
before-all = "bash ci/linux_before_all.sh"
77+
manylinux-x86_64-image = "manylinux_2_28"
78+
manylinux-aarch64-image = "manylinux_2_28"
79+
repair-wheel-command = """
80+
LD_LIBRARY_PATH=/project/.cache/fftw-3.3.10-$(uname -m)/lib:$LD_LIBRARY_PATH \
81+
auditwheel repair -w {dest_dir} {wheel}
82+
"""
83+
84+
[tool.cibuildwheel.macos]
85+
archs = ["native"]
86+
# One script handles both archs: arm64 builds FFTW from source, x86_64 uses brew.
87+
before-all = "bash ci/macos_arm_fftw.sh"
88+
repair-wheel-command = """
89+
delocate-wheel -L cpp_hf/.dylibs --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
90+
"""
91+
92+
# Teach CMake/pkg-config where the cached FFTW (and vendored Boost headers) live.
93+
[tool.cibuildwheel.linux.environment]
94+
PKG_CONFIG_PATH = "/project/.cache/fftw-3.3.10-x86_64/lib/pkgconfig:/project/.cache/fftw-3.3.10-aarch64/lib/pkgconfig:$PKG_CONFIG_PATH"
95+
CMAKE_PREFIX_PATH = "/project/.cache/fftw-3.3.10-x86_64:/project/.cache/fftw-3.3.10-aarch64:$CMAKE_PREFIX_PATH"
96+
LIBRARY_PATH = "/project/.cache/fftw-3.3.10-x86_64/lib:/project/.cache/fftw-3.3.10-aarch64/lib:$LIBRARY_PATH"
97+
CPATH = "/project/.cache/fftw-3.3.10-x86_64/include:/project/.cache/fftw-3.3.10-aarch64/include:$CPATH"
98+
BOOST_INCLUDEDIR = "/project/.cache/boost-1.89.0/include"

0 commit comments

Comments
 (0)