Subject: [bug#70858] [PATCH v4 41/52] gnu: python-pixell: Update to 0.28.1.

From: Nicolas Graves <[email-masked]>
Date: Wed, 26 Feb 2025 04:10:49 +0100

See https://github.com/simonsobs/pixell/issues/291 for the reasons
behind the patch.

* gnu/packages/astronomy.scm (python-pixell): Update to 0.28.1.
[source]: Switch to git-fetch. Add patch.
[propagated-inputs]: Remove python-cython, python-coveralls.
* gnu/packages/patches/python-pixell-avoid-dependency-propagation.patch
New file.
* gnu/local.mk: Add patch.
---
 gnu/local.mk                                    |  1 +
 gnu/packages/astronomy.scm                      | 15 +++++++++------
 ...on-pixell-avoid-dependency-propagation.patch | 17 +++++++++++++++++
 3 files changed, 27 insertions(+), 6 deletions(-)
 create mode 100644 gnu/packages/patches/python-pixell-avoid-dependency-propagation.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index fba21df72e..78792312d2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2003,6 +2003,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-matplotlib-fix-legend-loc-best-test.patch	\
   %D%/packages/patches/python-random2-getrandbits-test.patch		\
   %D%/packages/patches/python-pillow-use-zlib-1.3.patch	\
+  %D%/packages/patches/python-pixell-avoid-dependency-propagation.patch	\
   %D%/packages/patches/python-pydocstyle-add-support-for-pep701.patch	\
   %D%/packages/patches/python-pyreadstat-link-libiconv.patch	\
   %D%/packages/patches/python-sip-include-dirs.patch	\
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 2cea636e1b..4804e74a81 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -3045,13 +3045,18 @@ (define-public python-mapsims
 (define-public python-pixell
   (package
     (name "python-pixell")
-    (version "0.28.0")
+    (version "0.28.1")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "pixell" version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/simonsobs/pixell")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "11xd0ld329vr3spg5nzszn0bxzahnvkrh2akkd7qff33ndf75hkk"))))
+        (base32 "0p3pndy04n0hd352gjgwpqafp9sm1iq6c45pj745z1cswaf2lmc8"))
+       (patches (search-patches
+                 "python-pixell-avoid-dependency-propagation.patch"))))
     (build-system pyproject-build-system)
     (native-inputs
      (list gfortran
@@ -3062,8 +3067,6 @@ (define-public python-pixell
            python-pytest))
     (propagated-inputs
      (list python-astropy
-           python-coveralls
-           python-cython ; check why it needs in installation
            python-dateutil
            python-ducc0
            python-h5py
diff --git a/gnu/packages/patches/python-pixell-avoid-dependency-propagation.patch b/gnu/packages/patches/python-pixell-avoid-dependency-propagation.patch
new file mode 100644
index 0000000000..52c27bad6f
--- /dev/null
+++ b/gnu/packages/patches/python-pixell-avoid-dependency-propagation.patch
@@ -0,0 +1,17 @@
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -22,14 +22,10 @@
+     'h5py>=2.7',
+     'scipy>=1.0',
+     'python_dateutil>=2.7',
+-    'cython',
+     'healpy>=1.13',
+     'matplotlib>=2.0',
+     'pyyaml>=5.0',
+     'Pillow>=5.3.0, != 10.4.0',
+-    'pytest-cov>=2.6',
+-    'coveralls>=1.5',
+-    'pytest>=4.6',
+     'ducc0>=0.36.0',
+     'numba>=0.54.0'
+ ]
-- 
2.48.1