Skip to content

healpy: Add version 1.20.0 - #2430

Merged
luhenry merged 4 commits into
mainfrom
healpy
Sep 28, 2026
Merged

luhenry merged 4 commits into
mainfrom
healpy

Conversation

@luhenry

@luhenry luhenry commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Builds cfitsio, HEALPix C++ (with libsharp) and the Cython extensions healpy wraps them with; libsharp's SIMD paths already fall back to portable scalar code off x86. Upstream publishes no riscv64 wheel.

Mirrors upstream's cibuildwheel.yml.

Differs from upstream

  • No musllinux - numpy/astropy have no riscv64 musllinux wheel on our registry yet

Matrix: cp312/cp313/cp314 - upstream builds no cp314t either, and astropy (a hard runtime dependency) has no wheel for it anywhere

Testing

  • same as upstream

License: Wheel bundles cfitsio (NASA, permissive) and HEALPix C++/libsharp (GPL-2.0) plus libsharp's bundled pocketfft (BSD-3-Clause); upstream ships no licence text for any of them, so the build adds it.

Patches

  • 0001-Ship-the-licences-of-the-vendored-cfitsio-HEALPix-C.patch - Upstream-Status: To upstream. Adds LICENSE. files at the project root for setuptools' default glob to pick up. Reproduces on any architecture, not riscv64-only.

Build riscv64 wheels for healpy, the Cython wrapper around the
bundled/vendored cfitsio and HEALPix C++ (incl. libsharp) libraries.
Upstream publishes no riscv64 wheel anywhere.

Mirrors upstream's cibuildwheel.yml, narrowed to Linux/riscv64.
luhenry added a commit that referenced this pull request Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-28 23:02 UTC

The cp314 leg of PR #2430 (run 36393265628, job 108833715006)
segfaulted inside libgomp during test_sphtfunc.py::test_map2alm_pol
("Fatal Python error: Segmentation fault", exit 139), with the C
stack trace going healpy._sphtools -> libgomp -> libsharp -> libgomp
-> libc. cp313 on the same commit built and tested clean.

That signature matches gotcha 166 (riscv64 runners' libgomp faulting
on dynamic/guided OpenMP schedules) exactly. cextern/healpix vendors
libsharp, whose SHT execution path (sharp.c's map2phase/phase2map/
sharp_execute_job) and Gauss-Legendre root finder
(sharp_legendre_roots.c) all use schedule(dynamic,*); sharp_mpi.c's
own instance is dead code here (behind #ifdef USE_MPI, never defined
by this build). Patch 0002 moves those four loops to schedule(static),
mirroring the existing lightgbm/4.7.0/0002 patch for the same defect,
tagged Upstream-Status: Inappropriate with the tracking issue
(#617).
CI's cp313 leg segfaulted in test_dist2holes_no_hole_filter (PR #2430,
run 36412601673) on hp.dist2holes(mask), a different crash than the
one 0002 already fixes. The C++ dist2holes() (mask_tools.cc) and the
swap_scheme() it calls on RING masks (healpix_map.h) each contain
OpenMP loops using dynamic scheduling, matching gotcha 166's libgomp
signature again, this time in HEALPix C++ rather than libsharp.
The OpenMP fix patches are applied with a plain `git apply`, which
leaves the checkout dirty at the 1.20.0 tag. setuptools_scm then
reports the dirty tree as a post-release dev version
(1.20.1.dev0+g<sha>.d<date>) instead of 1.20.0, which the publish
step correctly rejects since it doesn't match docs/packages/healpy.yaml.

Set SETUPTOOLS_SCM_PRETEND_VERSION_FOR_HEALPY in CIBW_ENVIRONMENT,
matching the established pattern used by every other package in this
repo that patches a setuptools_scm checkout (gotcha 31).
@luhenry
luhenry marked this pull request as ready for review September 28, 2026 21:59
luhenry added a commit that referenced this pull request Sep 28, 2026
@luhenry
luhenry merged commit bc41423 into main Sep 28, 2026
12 checks passed
@luhenry
luhenry deleted the healpy branch September 28, 2026 22:59
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