Subject: [PATCH 42/51] gnu: Add python-losoto.

From: Sharlatan Hellseher <[email-masked]>
Date: Fri, 21 Feb 2025 21:49:36 +0000

* gnu/packages/astronomy.scm (python-losoto): New variable.

Change-Id: I402823c3c2cd01b709f17d1c863975b5d73c2091
---
 gnu/packages/astronomy.scm | 42 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 1cc549c214f..ae1030b922a 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -3051,6 +3051,48 @@ (define-public python-holodeck
 observationally-derived galaxy merger catalogs.")
     (license license:expat)))
 
+(define-public python-losoto
+  (package
+    (name "python-losoto")
+    (version "2.4.4")
+    (source
+     (origin
+       (method git-fetch) ; no tests data in the PyPI tarball
+       (uri (git-reference
+             (url "https://github.com/revoltek/losoto")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0sdg30fi3dl4w5k4a4ry8b4rgx8ydf18s0yrka1ba1sin34jkwnk"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                ;; Test steps are taken from GitHub Actions
+                ;; <.github/workflows/python.yml>.
+                (invoke "python" "tools/losoto_test.py")))))))
+    (native-inputs
+     (list python-cython-3
+           python-setuptools
+           python-wheel))
+    (propagated-inputs
+     (list python-configparser
+           python-matplotlib
+           python-numpy
+           python-casacore
+           python-scipy
+           python-tables))
+    (home-page "https://github.com/revoltek/losoto")
+    (synopsis "LOFAR Solution Tool")
+    (description
+     "This package provides a @acronym{Low-Frequency Array,
+@url{http://www.lofar.org/, LOFAR}} a large radio telescope Solution Tool.")
+    (license license:gpl3)))
+
 (define-public python-mapsims
   (package
     (name "python-mapsims")
-- 
2.47.1