guix_mirror_bot pushed a commit to branch astro-update
in repository guix.
commit 5b42f6ba59df8598aa5c8c8c23f6427be2d62e56
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Tue Feb 17 09:29:53 2026 +0000
gnu: python-hierarc: Use Astropy 7.
* gnu/packages/astronomy.scm (python-hierarc):
[source] <patch>: Apply patch provigin fixture for Astropy7 and relax
requirements on NumPy < 2.
[propagated-inputs]: Remove python-astropy-6; add python-astropy.
[native-inputs]: Remove python-wheel.
* gnu/packages/patches/python-hierarc-numpy2-astropy7-compatibilities.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register patch
Change-Id: Ice6d50650bc539dbd57f57e5b45d5816e7b743e3
Co-authored-by: Hugo Buddelmeijer <[email protected]>
---
gnu/local.mk | 1 +
gnu/packages/astronomy.scm | 13 ++--
...n-hierarc-numpy2-astropy7-compatibilities.patch | 81 ++++++++++++++++++++++
3 files changed, 90 insertions(+), 5 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index ea3a288815..79e45b75f8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2092,6 +2092,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-docrepr-fix-tests.patch \
%D%/packages/patches/python-gpg-setup-72.patch \
%D%/packages/patches/python-hdmedians-replace-nose.patch \
+ %D%/packages/patches/python-hierarc-numpy2-astropy7-compatibilities.patch
\
%D%/packages/patches/python-louvain-fix-test.patch \
%D%/packages/patches/python-mohawk-pytest.patch \
%D%/packages/patches/python-msal-requests.patch \
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 9730889578..0bcbe3bd12 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -5841,13 +5841,17 @@ scheme and builds with the HEALPix C++ library.")
(version "1.2.0")
(source
(origin
- (method git-fetch) ;no tests data in the PyPI archive
+ (method git-fetch)
(uri (git-reference
(url "https://github.com/sibirrer/hierArc")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "02078a745hrb3m8fj739rwzk4wwxrfk40sr4yvs722aj5xk8j00w"))))
+ (base32 "02078a745hrb3m8fj739rwzk4wwxrfk40sr4yvs722aj5xk8j00w"))
+ (patches
+ ;; Patch providing NumPy2 and Astropy 7 compatibilities, see:
+ ;; <https://codeberg.org/guix/guix/issues/6371#issuecomment-10564136>.
+ (search-patches
"python-hierarc-numpy2-astropy7-compatibilities.patch"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -5873,10 +5877,9 @@ scheme and builds with the HEALPix C++ library.")
(setenv "NUMBA_CACHE_DIR" "/tmp"))))))
(native-inputs
(list python-pytest
- python-setuptools
- python-wheel))
+ python-setuptools))
(propagated-inputs
- (list python-astropy-6
+ (list python-astropy
python-emcee
python-h5py
python-lenstronomy
diff --git
a/gnu/packages/patches/python-hierarc-numpy2-astropy7-compatibilities.patch
b/gnu/packages/patches/python-hierarc-numpy2-astropy7-compatibilities.patch
new file mode 100644
index 0000000000..c5006acfc5
--- /dev/null
+++ b/gnu/packages/patches/python-hierarc-numpy2-astropy7-compatibilities.patch
@@ -0,0 +1,81 @@
+From 41ca385fcfd347d5833039444dc4f8bd5ec0f4d7 Mon Sep 17 00:00:00 2001
+From: Hugo Buddelmeijer <[email protected]>
+Date: Tue, 17 Feb 2026 06:15:19 +0100
+Subject: [PATCH 1/3] Add support for AstroPy 7
+
+---
+ hierarc/Sampling/ParamManager/cosmo_model.py | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/hierarc/Sampling/ParamManager/cosmo_model.py
b/hierarc/Sampling/ParamManager/cosmo_model.py
+index cefe8788..3f9974ca 100644
+--- a/hierarc/Sampling/ParamManager/cosmo_model.py
++++ b/hierarc/Sampling/ParamManager/cosmo_model.py
+@@ -3,8 +3,12 @@
+ from scipy.special import exp1
+ from astropy.cosmology.core import dataclass_decorator
+ from astropy.cosmology.parameter import Parameter
+-from astropy.cosmology._utils import aszarr
+-
++try:
++ # AstroPy 7
++ from astropy.cosmology._src.utils import aszarr
++except:
++ # AstroPy 6
++ from astropy.cosmology._utils import aszarr
+
+ @dataclass_decorator
+ class wPhiCDM(FlatFLRWMixin, FLRW):
+
+From 09f3163da9a1965359a388365f06709199d4bb6c Mon Sep 17 00:00:00 2001
+From: Hugo Buddelmeijer <[email protected]>
+Date: Tue, 17 Feb 2026 06:16:18 +0100
+Subject: [PATCH 2/3] Relax requirements
+
+---
+ requirements.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/requirements.txt b/requirements.txt
+index 1df53b2c..8a6474c5 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,5 +1,5 @@
+-numpy<2
+-astropy<7
++numpy
++astropy
+
+ scipy<1.14
+ emcee
+
+From 19c8e334a75da78006eb3664eb783f8151a271bb Mon Sep 17 00:00:00 2001
+From: "pre-commit-ci[bot]"
+ <66853113+pre-commit-ci[bot]@users.noreply.github.com>
+Date: Tue, 17 Feb 2026 05:22:00 +0000
+Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks
+
+---
+ hierarc/Sampling/ParamManager/cosmo_model.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/hierarc/Sampling/ParamManager/cosmo_model.py
b/hierarc/Sampling/ParamManager/cosmo_model.py
+index 3f9974ca..9fc394eb 100644
+--- a/hierarc/Sampling/ParamManager/cosmo_model.py
++++ b/hierarc/Sampling/ParamManager/cosmo_model.py
+@@ -3,6 +3,7 @@
+ from scipy.special import exp1
+ from astropy.cosmology.core import dataclass_decorator
+ from astropy.cosmology.parameter import Parameter
++
+ try:
+ # AstroPy 7
+ from astropy.cosmology._src.utils import aszarr
+@@ -10,6 +11,7 @@
+ # AstroPy 6
+ from astropy.cosmology._utils import aszarr
+
++
+ @dataclass_decorator
+ class wPhiCDM(FlatFLRWMixin, FLRW):
+ """