Skip to content

openbabel-wheel: Add version 3.1.1.23 - #3061

Draft
luhenry wants to merge 5 commits into
mainfrom
openbabel-wheel
Draft

luhenry wants to merge 5 commits into
mainfrom
openbabel-wheel

Conversation

@luhenry

@luhenry luhenry commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Compiles Open Babel (CMake/SWIG, scikit-build-core) via a third-party wheel-packaging wrapper around the upstream cheminformatics toolkit. Upstream publishes no riscv64 wheel.

Mirrors upstream's own [tool.cibuildwheel], which is used as-is (build matrix, cmake defines, test-command); only the Linux native deps are overridden.

Differs from upstream

  • dnf install cairo-devel instead of building cairo 1.15.14 from source - manylinux2014's CentOS cairo-devel is broken for this; Rocky 10 (this image) ships a current one

Testing: same as upstream.

License: GPL-2.0 (Open Babel's own licence); no other library is vendored into the wheel.

CI pending.

Open Babel's own CMake/C++ source has no x86-specific code (checked
src/, src/formats/libinchi/ and the build scripts); upstream's
pyproject.toml already builds linux_aarch64 wheels with the same
cibuildwheel recipe, and swig/cmeel-eigen (the two build-time deps)
both ship riscv64-portable wheels on PyPI already. Only the Linux
before-all is overridden, installing cairo-devel from the (modern)
Rocky 10 image instead of building cairo 1.15.14 from source the way
upstream does to work around manylinux2014's broken CentOS cairo-devel.
@luhenry
luhenry marked this pull request as draft October 14, 2026 11:34
All four riscv64 build legs fail in ~1 minute with cibuildwheel:
'Failed to parse enable group. Unknown enable group: cpython-freethreading.'
pyproject.toml's [tool.cibuildwheel] table sets
enable = ["cpython-freethreading"], which was cibuildwheel's opt-in for
free-threaded wheels; the value was deprecated in cibuildwheel 3.4.1 and
removed outright in 4.0.0 (CPython 3.14+ free-threaded builds no longer
need an enable flag). This repo pins cibuildwheel 4.2.0, which parses the
whole [tool.cibuildwheel] table up front and rejects it before selecting
any interpreter or starting a container, so every matrix leg fails
identically and fast. Upstream's own release workflow still pins
cibuildwheel v3.3, where the option remains valid, so their tag isn't
broken for them.

Carry a one-line patch dropping the enable entry (porting-playbook
gotcha 184), tagged Upstream-Status: To upstream since no later upstream
release has fixed this yet.

luhenry commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

All four riscv64 legs (cp312/cp313/cp314/cp314t) were failing in the same ~50-55s, before any container/compiler step ran.

Root cause: upstream's pyproject.toml sets [tool.cibuildwheel] enable = ["cpython-freethreading"]. That enable value was deprecated in cibuildwheel 3.4.1 and removed outright in 4.0.0 (free-threaded CPython 3.14+ wheels build without any enable flag now). This repo pins cibuildwheel v4.2.0 for riscv64, which parses the whole [tool.cibuildwheel] table up front and rejects it as soon as it sees the unknown group:

cibuildwheel: Failed to parse enable group. Unknown enable group: cpython-freethreading. Valid group names are: cpython-prerelease, graalpy, pypy, pypy-eol, pyodide-eol, pyodide-prerelease

Because the whole table is rejected before cibuildwheel selects anything, every interpreter in the matrix fails the same way, equally fast — which matches the pre-screened timings. Upstream's own release workflow still pins cibuildwheel v3.3, where the option remains valid, so their tag isn't broken for them; no later upstream release has dropped the line either (checked upstream's tip, no diff on pyproject.toml since this tag).

Fix: added a one-line patch dropping the enable = ["cpython-freethreading"] entry (patches/openbabel-wheel/3.1.1.23/0001-pyproject-drop-the-removed-cpython-freethreading-enable-group.patch, tagged Upstream-Status: To upstream), applied via a new "Patch openbabel-wheel source" step before the build, plus patched: true in docs/packages/openbabel-wheel.yaml and the new patch path in the workflow's trigger filters. This matches the precedent in patches/pi-heif/1.4.0/ for the same upstream cibuildwheel-version-drift issue.

Pushed to openbabel-wheel as d8e6b85437f.

The pinned OpenBabel commit's include/openbabel/obutil.h uses clock()
and CLOCKS_PER_SEC but only includes <sys/time.h> on Linux, relying on
<string> to pull in <time.h> transitively. GCC 14's libstdc++ (in the
manylinux_2_39 image) no longer does, so asciipainter.cpp fails with
"'clock' was not declared in this scope". OpenBabel master fixed this
by including <ctime> directly; since the source is fetched at build
time, pass -include ctime through CXXFLAGS instead.
Rocky 10 packages no RapidJSON, so OpenBabel's CMake falls back to
downloading the 1.1.0 release, whose GenericStringRef::operator=
assigns to its const length member, a hard error under GCC 14.
Install the headers of the same master revision build-cadquery-ocp-novtk
uses into /usr/include in before-all, which OpenBabel's
find_package(RapidJSON) then picks up instead of downloading 1.1.0.
Applying the patch leaves the checkout dirty, so setuptools_scm reported
3.1.1.24.dev0+gc6b2731db.d20261022 instead of 3.1.1.23 and the publish
step rejected the undeclared version.

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