Skip to content

passagemath-objects: Add version 10.8.13 - #3274

Draft
luhenry wants to merge 3 commits into
mainfrom
port/passagemath-objects
Draft

luhenry wants to merge 3 commits into
mainfrom
port/passagemath-objects

Conversation

@luhenry

@luhenry luhenry commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Compiles Sage's core structure/coercion/category engine - 62 Cython modules under sage/structure, sage/cpython, sage/categories, sage/misc, sage/libs/gmp. Upstream publishes no riscv64 wheel.

Mirrors upstream's own sdist release recipe (build/pkgs/sagemath_objects/spkg-src).

Differs from upstream

  • Builds the sdist via a sparse monorepo checkout + ./bootstrap, not the full ./configure && make python_build chain - that bootstraps the whole Sage distribution, unneeded for this split package's own sdist
  • Adds dnf install gmp-devel mpfr-devel libmpc-devel - system packages satisfy Sage's own minimum-version checks, no from-source build needed
  • Drops musllinux - gmpy2, a hard runtime dependency, has no musllinux riscv64 wheel

Testing: same as upstream (none - this split package carries no doctest step)

License: Adds the package's own LICENSE (GPL-2.0-or-later); upstream's sdist/wheel ship the licence expression but no licence text at all.

Patches

  • 0001-add-the-package-s-own-licence-file.patch - To upstream (not yet submitted). Without it the wheel carries a licence expression with no accompanying text. Reproduces off riscv64 too.

Verified the sdist step locally against the real upstream checkout: produces a 693 KB sdist, matching upstream's released size.

Split out of the passagemath/passagemath monorepo (a SageMath fork) at
pkgs/sagemath-objects, tagged passagemath-<version>. Compiled scope is
small (62 .pyx across sage/structure, sage/cpython, sage/categories,
sage/misc, sage/libs/gmp) with no ISA/SIMD-specific code; external deps
(gmp, mpfr, mpc) satisfy Sage's own minimum-version checks via Rocky
10's system -devel packages, so no from-source toolchain build is
needed, unlike gmpy2. gmpy2 has no musllinux riscv64 wheel, so musllinux
is dropped; cp311 is dropped since gmpy2/cysignals both require >=3.12.

The sdist is built by replaying build/pkgs/sagemath_objects/spkg-src
(./bootstrap renders pyproject.toml.m4, then python -m build --sdist
--no-isolation --skip-dependency-check against the real upstream
checkout) rather than upstream's full ./configure && make python_build
chain, which bootstraps the whole Sage distribution and is unneeded for
this split package's own sdist.

luhenry commented Oct 15, 2026 •

Copy link
Copy Markdown
Member Author

check_commit_messages (job 116266216435) failed on the initial pull_request: opened snapshot of this PR's body, which still had the auto-injected "Generated by Claude Code" footer at the moment that webhook fired. The footer was stripped via update_pull_request immediately after creation (confirmed removed in the current PR body above). The edited-triggered re-run of pr-checks.yml picks up the corrected body and should resolve this on its own — not a real failure, no action needed.

@luhenry
luhenry marked this pull request as draft October 15, 2026 12:13
The python_sdist job's sparse checkout of passagemath/passagemath listed
only subdirectories, so the root-level ./bootstrap script was never
materialised and "Render pyproject.toml" failed with exit 127.

bootstrap also needs the root pyproject.toml: sage-get-system-packages
install-requires-toml reads build-system/dependency constraints from it
first, and without it falls back to the bare package names in
build/pkgs/*/version_requirements.txt, rendering pyproject.toml with
unconstrained cython/gmpy2/cysignals. With both paths added the rendered
pyproject.toml matches the one in the PyPI passagemath-objects 10.8.13
sdist.

luhenry commented Oct 15, 2026 •

Copy link
Copy Markdown
Member Author

python_sdist (10.8.13) failure: fixed in 1c84989

What failed: job 116282397236, step "Render pyproject.toml": ./bootstrap: No such file or directory (exit 127).

Root cause: the non-cone sparse-checkout: list of passagemath/passagemath@passagemath-10.8.13 only named subdirectories (build, m4, pkgs/sagemath-objects, src/sage/...), so the root-level bootstrap script was never checked out. I reproduced this locally with the same tag and the same pattern list.

Once bootstrap was present it ran, but it also needs the root pyproject.toml. Its SPKG_INSTALL_REQUIRES_* macros come from build/bin/sage-get-system-packages install-requires-toml, which reads constraints from $SAGE_ROOT/pyproject.toml first. Without that file it silently falls back to build/pkgs/<pkg>/version_requirements.txt, which holds only bare names. The result was a pkgs/sagemath-objects/pyproject.toml with unconstrained 'cython', 'gmpy2', 'cysignals', where upstream has 'cython >=3.1.0,<3.4.0', 'gmpy2 ~=2.1.b999' and so on.

Fix: added /bootstrap and /pyproject.toml (both anchored to the repo root) to the sparse list, and corrected the step comment that explains why. No other changes.

Local validation (same tag, the exact pattern list extracted from the updated workflow, patch applied, then ./bootstrap):

  • ./bootstrap exits 0 and renders pkgs/sagemath-objects/pyproject.toml.
  • The rendered pyproject.toml matches the one in the PyPI passagemath_objects-10.8.13.tar.gz sdist exactly (ignoring trailing whitespace).
  • One expected, non-fatal error remains in the log: aclocal: error: 'configure.ac' is required / bootstrapping sage_conf failed. A no-argument ./bootstrap runs every spkg's hook, and sage_conf's hook runs autoconf for the full Sage distribution, which this split build doesn't need. That failure only skips the rest of its own 8-package sage-package bootstrap batch (sage_docbuild, sage_setup, sagelib, ...). sagemath_objects is in a different batch, and the script's exit status is unaffected.

I did not run the later "build sdist" step locally, so the next CI run is the first real test of it.

…uild

build --no-isolation uses the current environment as-is instead of
creating one from build-system.requires, so setuptools (the rendered
pyproject.toml's build backend) must already be installed. The sdist
step only installed build, passagemath-setup, and
passagemath-environment, so the backend import failed:
"ModuleNotFoundError: No module named 'setuptools'". Not riscv64-specific
- reproduces on any platform.

luhenry commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

The python_sdist failure (ModuleNotFoundError: No module named 'setuptools') isn't riscv64-specific — it'd fail identically on any platform.

python -m build --sdist --no-isolation uses the current environment as-is instead of creating one from build-system.requires, so the build backend (setuptools.build_meta, per the rendered pyproject.toml) must already be installed. The uv pip install step only installed build, passagemath-setup, and passagemath-environment, so importing the backend failed.

Fixed by adding setuptools to that install line.


Generated by Claude Code

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