Repository navigation
Quote SKBUILD_CMAKE_DEFINE so cibuildwheel can parse it - #192
Merged
Merged
Conversation
build_pypi_dist has been unable to build a wheel on any platform since 65681cd. cibuildwheel does not hand CIBW_ENVIRONMENT to a shell: it splits it into KEY=VALUE assignments itself and evaluates each VALUE with bashlex, its vendored mini-bash. The value ENABLE_XHOST=OFF is itself a syntactically valid bash assignment, and bashlex_eval.evaluate_node has no handler for that node kind, so every build died before before_all with ValueError: Unsupported bash construct: 'assignment' Reproduced in isolation against cibuildwheel 2.22.0's own parser: parse_environment('SKBUILD_CMAKE_DEFINE=ENABLE_XHOST=OFF').as_dictionary({}) -> ValueError: Unsupported bash construct: 'assignment' parse_environment('SKBUILD_CMAKE_DEFINE="ENABLE_XHOST=OFF"').as_dictionary({}) -> {'SKBUILD_CMAKE_DEFINE': 'ENABLE_XHOST=OFF'} Quoting makes the value a plain word; bashlex strips the quotes during evaluation, so CMake still sees ENABLE_XHOST=OFF. This was latent rather than observed: the line landed 2026-09-10 and no repo in the ecosystem has merged to master since, so no release leg had run with it. It was found by the first dry run of SCF's macOS wheel, but it is not macOS-specific -- env_linux carried the identical defect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
🚀 [bumpr] Bumped! |
This was referenced Sep 14, 2026
ryanmrichard
added a commit
that referenced
this pull request
Sep 14, 2026
The Linux leg's import check has never been able to pass for an MPI-linked wheel: ImportError: libmpi.so.40: cannot open shared object file By design the Linux wheel does not vendor MPI -- CIBW_REPAIR_WHEEL_COMMAND_LINUX excludes libmpi/libopen-rte/libopen-pal so it links against the runtime system's OpenMPI, because vendoring is a dead end (auditwheel bundles shared libraries but never the bin/orted that OpenMPI's singleton startup needs). The other half of that contract is that something must supply MPI wherever the wheel is imported, and nothing did: CIBW_BEFORE_ALL_LINUX builds OpenMPI into /usr/local/openmpi inside the manylinux *container*, while "Verify Wheel Installs" runs on the runner host. Installing libopenmpi-dev/openmpi-bin there makes the host resemble the end user's machine the wheel already documents as a requirement. Same packages setup_nwx_dev_env uses, so the ABI matches what CIBW_BEFORE_ALL_LINUX compiled against. macOS is unaffected -- delocate vendors MPI into the wheel there -- which is why the ParallelZone release that surfaced this passed on macos-14 and failed only on Linux. This was masked rather than new: import_check.py arrived in 65681cd, the same commit that introduced the SKBUILD_CMAKE_DEFINE quoting defect fixed in #192. Every build died before reaching verification, so the check had never actually run on Linux. Found by NWChemEx/ParallelZone#161. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
Summary
build_pypi_disthas been unable to build a wheel on any platform, in any repo since 65681cd. This restores it.cibuildwheel does not hand
CIBW_ENVIRONMENTto a shell. It splits it intoKEY=VALUEassignments itself and evaluates each value withbashlex, its vendored mini-bash. The valueENABLE_XHOST=OFFis itself a syntactically valid bash assignment, andbashlex_eval.evaluate_nodehas no handler for that node kind, so every build died beforebefore_alleven ran:Reproduction
Against cibuildwheel 2.22.0's own parser, in isolation:
SKBUILD_CMAKE_DEFINE=ENABLE_XHOST=OFFValueError: Unsupported bash construct: 'assignment'SKBUILD_CMAKE_DEFINE="ENABLE_XHOST=OFF"{'SKBUILD_CMAKE_DEFINE': 'ENABLE_XHOST=OFF'}Quoting makes the value a plain word; bashlex strips the quotes during evaluation, so CMake still sees
ENABLE_XHOST=OFF.Scope
env_linuxcarried the identical defect — this is not macOS-specific.It was latent rather than observed. The line landed 2026-09-10, and the most recent merge-to-master across all ten sibling repos is SimDE on 2026-09-08, so no release leg had ever run with it. The next merge to master in any of the ~11 repos would have failed its wheel build, and on a merge that also skips
deploy_to_pypi— taking the Linux release down with it.I audited every other
env_*entry in the action:SKBUILD_CMAKE_DEFINEwas the only value containing an unquoted=. Lines 297 and 310 were already quoted for a closely related reason.Verification
Found by the first dry run of SCF's macOS wheel (34641892205, failed in 18s). With this fix, SCF's macOS leg builds, repairs, and verifies end to end (34644965231):
🤖 Generated with Claude Code