Skip to content

matscipy: Add version 1.2.0 - #2538

Draft
luhenry wants to merge 6 commits into
mainfrom
matscipy
Draft

luhenry wants to merge 6 commits into
mainfrom
matscipy

Conversation

@luhenry

@luhenry luhenry commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Compiles the _matscipy C/C++ numpy extension with meson-python. Upstream publishes no riscv64 wheel.

Mirrors upstream's wheels.yml.

Differs from upstream

  • musllinux dropped - no musllinux_riscv64 numpy/scipy wheels exist
  • PIP_ONLY_BINARY for numpy and the scipy/matplotlib stack - resolve our registry wheels, never sdists

Matrix: cp312/cp313/cp314 - no cp314t: the extension uses single-phase init without Py_mod_gil, and upstream ships no free-threaded wheel.

Testing

  • upstream's wheel job only imports the extension; runs the tests.yml pytest suite instead
  • [dislocation] extras (ovito, atomman, nglview) and pytest-split omitted - no riscv64 wheels; those tests self-skip

License: OK

luhenry added a commit that referenced this pull request Sep 30, 2026
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://riseproject-dev.github.io/python-wheels/pr-preview/pr-2538/

Built to branch gh-pages at 2026-10-01 00:43 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

29 tests failed and 12 modules errored on riscv64 with
AttributeError: module 'ase.constraints' has no attribute
'UnitCellFilter' and 'Log' object has no attribute 'close', plus
ImportErrors in test_crack.py, test_dislocation.py and others.

Not a riscv64 bug: ase 3.28.0 removed the whole ase.constraints module
(confirmed by downloading the ase 3.25.0-3.29.0 wheels and diffing
their contents -- 3.25.0-3.27.0 still ship ase/constraints.py,
3.28.0/3.29.0 don't). matscipy v1.2.0's own tests/ still import from
the old location; its pyproject.toml floor of ase>=3.26.0 doesn't
prevent pip from picking today's 3.29.0, which no longer has it.

Pin the *test* dependency only -- matscipy's own install_requires is
left untouched, since widening it is upstream's call, not this
port's.

Signed-off-by: Ludovic Henry <git@ludovic.dev>
…d nothing

The rerun on the previous fix (b743b4a) failed identically: 29 failed,
12 errors, same AttributeErrors on ase.constraints.UnitCellFilter and
Log.close(). The quoted token "ase<3.28" inside the space-separated
CIBW_TEST_REQUIRES string is a YAML plain scalar, so the quote
characters are literal, not stripped -- pip (or cibuildwheel's
splitting of the value) never saw a valid `ase<3.28` requirement.

Switch to PIP_CONSTRAINT via CIBW_TEST_ENVIRONMENT instead: a
constraints file written on the host, referenced by an env var pip
honors on every invocation in the test phase regardless of install
order or how the requirement string gets tokenized.

Signed-off-by: Ludovic Henry <git@ludovic.dev>
…hub.workspace

The rerun failed immediately with:
  ERROR: Could not open constraint file: [Errno 2] No such file or
  directory: '/home/runner/work/python-wheels/python-wheels/ase-constraint.txt'

cibuildwheel's manylinux test phase runs pip inside the same docker
container as the build; github.workspace's host path isn't reliably
what's mounted there on this self-hosted riscv64 runner. build-kivy.yml
already proved runner.temp *is* visible in that same test-phase
environment (its own PIP_CONSTRAINT fix changed kivy's failure mode
exactly as expected once switched to it). Use the same path here.

Signed-off-by: Ludovic Henry <git@ludovic.dev>
CIBW_TEST_COMMAND runs matscipy's whole build+test lifecycle inside the
manylinux Docker container; neither github.workspace nor runner.temp is a
path that container ever sees; a host-side step writing to either one is
invisible to it, which is why both prior attempts hit the same "Could not
open constraint file" error. before-build/build/repair/test all run in
that same container instance per identifier, so writing the constraint
file from CIBW_BEFORE_BUILD instead puts it on a path the container
actually has.
…AINT

The PIP_CONSTRAINT file (written from CIBW_BEFORE_BUILD into /tmp) didn't
error this run, but it also didn't take: the test venv still picked an
ase recent enough to hit NumPy 2.5 deprecation warnings inside ase/atoms.py
itself, well past 3.28, and all 29 failures are still the removed
ase.constraints.UnitCellFilter/ExpCellFilter. Dropping the constraint
file entirely and adding `ase<3.28` as its own space-separated token in
CIBW_TEST_REQUIRES - a plain version spec, no quote characters anywhere
in the YAML scalar to be literal or stripped - puts the pin in the same
`pip install` invocation that installs the wheel, resolved together with
matscipy's own `ase>=3.26.0` floor.

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