Skip to content

passagemath-graphs: Add version 10.8.13 - #4906

Open
luhenry wants to merge 5 commits into
mainfrom
passagemath-graphs
Open

luhenry wants to merge 5 commits into
mainfrom
passagemath-graphs

Conversation

@luhenry

@luhenry luhenry commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Cython/C++ bindings (sage/graphs/**, 48 .pyx modules) over the Boost Graph Library for graph theory, posets, designs and related combinatorics. Upstream publishes no riscv64 wheel.

Mirrors build-passagemath-categories.yml's sdist-then-bdist shape.

Differs from upstream

  • Builds against a system Boost (dnf boost-devel) instead of build/pkgs/boost_cropped's from-source cmake build - spkg-configure.m4's own AX_BOOST_BASE([1.83.0]) accepts a system Boost, and the manylinux_riscv64 image's Rocky 10 repos already carry boost-devel 1.83.0 (same package build-ompl.yml/build-cgal.yml dnf-install). This also lets sage_setup()'s make("boost_cropped-ensure graphs-ensure") (run through passagemath-conf, a build-system requirement here) skip the from-source Boost build. The default repair_wheel.py step is otherwise left untouched - build-passagemath-cddlib.yml already proved that passagemath-conf/repair_wheel.py pipeline green on riscv64 for the same package shape.

Testing

  • sagemath-repl/-graphs extras unported; exercises the Boost-backed eccentricity algorithm directly through a minimal duck-typed graph, same shape as the bliss/mcqd/cliquer sibling ports.

License: Wheel bundles no third-party binary (Boost headers only, nothing linked in); upstream ships no licence text for the package itself, so the build adds it.

Patches

  • 0001-add-the-package-s-own-licence-file.patch - To upstream. passagemath-graphs declares GPL-2.0-or-later but ships no LICENSE file.

Built on cp311/cp312/cp313/cp314/cp314t manylinux+musllinux; CI running.

Split out of passagemath/passagemath at pkgs/sagemath-graphs. Mirrors
build-passagemath-categories.yml's sdist-then-bdist shape. Builds against
a system Boost (dnf boost-devel, matching spkg-configure.m4's own
AX_BOOST_BASE([1.83.0]) system-detection path; already proven on riscv64
by build-ompl.yml/build-cgal.yml) rather than build/pkgs/boost_cropped's
from-source cmake build, since sage/graphs/base/boost_interface.cpp only
needs Boost Graph Library headers.

Drops the upstream repair_wheel.py step (patch 0002): it needs
passagemath-conf/SAGE_LOCAL to bundle sage_wheels/share/graphs, a
build-time mechanism no build-passagemath-*.yml in this repo has ever
exercised (see .queue.yml's buckygen/benzene/plantri entries, parked for
the same reason). Dropping it only loses a few graph-database lookup
helpers; the Boost-backed Cython extensions this port exists for are
unaffected.
Drop the patch that removed repair_wheel.py from repair-wheel-command.
build-passagemath-cddlib.yml already proved the passagemath-conf +
sage_setup make(spkg-ensure) + repair_wheel.py pipeline green on both
manylinux and musllinux riscv64 (PR #4760's per-target build jobs all
succeeded) for the same shape (sage_conf is a build-system requirement
here too), so dropping it was an unnecessary divergence from upstream
based on a stale assumption from before that PR landed. dnf-installing
boost-devel still matters on its own: it is what lets passagemath-conf's
own AX_BOOST_BASE([1.83.0]) probe find a system Boost and skip
build/pkgs/boost_cropped's from-source cmake build during
make("boost_cropped-ensure").
luhenry added a commit that referenced this pull request Nov 16, 2026
Real riscv64 CI (this PR's run, cp312-manylinux job) proves the prior
commit's premise wrong: the wheel itself built fine, but repair_wheel.py
failed outright - 'tar: share/graphs: Cannot stat: No such file or
directory'. build-passagemath-cddlib.yml's own green pipeline evidently
populates a different share/ subdirectory (or reaches it through a path
this port's own make("boost_cropped-ensure graphs-ensure") doesn't
actually cover); either way, SAGE_LOCAL/share/graphs is not actually
present when repair_wheel.py runs here, so the assumption that cddlib's
precedent carries over to graphs is not supported by this package's own
CI.

Restores the original, already-validated approach (first commit's own
build run passed; it was only interrupted by a concurrency replace when
the now-reverted follow-up landed, not a real failure).

This reverts commit f75eeb2.
Real riscv64 CI (6 of 10 manylinux legs, e.g. job 133772234165) failed
identically: ImportError: cannot import name 'eccentricity' from
sage.graphs.base.boost_graph - Did you mean: 'eccentricity_DHV'? Confirmed
against the real upstream source (src/sage/graphs/base/boost_graph.pyx at
the pinned passagemath-10.8.13 tag): there is no plain eccentricity
function, only eccentricity_DHV(g, vertex_list=None,
weight_function=None, check_weight=True) - no algorithm= parameter either,
so the test's algorithm='Dijkstra_Boost' kwarg would have failed too even
with the right name. Both are test-command bugs, not build bugs: the
wheel itself built and installed fine every time, confirmed from the same
logs.

eccentricity_DHV computes the same thing (vector of per-vertex
eccentricities) via a different algorithm (Dragan et al.'s DHV bounds
iteration vs the module's own Dijkstra/Johnson Boost-graph calls used
internally by the higher-level sage.graphs.generic_graph API); for the
5-cycle this test already constructs, every vertex has eccentricity 2,
matching the existing assertion unchanged.

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