guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

11/11: gnu: Add python-spherical-geometry.


From: guix-commits
Subject: 11/11: gnu: Add python-spherical-geometry.
Date: Fri, 24 Feb 2023 18:07:36 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit b12ee1ee5b8b53bf27b79ce81b1b2158cc7de484
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Mon May 23 23:44:58 2022 +0100

    gnu: Add python-spherical-geometry.
    
    * gnu/packages/astronomy.scm (python-spherical-geometry): New variable.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/packages/astronomy.scm | 49 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 02d6dc0aa1..b6ed1e2f49 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -54,6 +54,7 @@
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages netpbm)
   #:use-module (gnu packages perl)
@@ -1680,6 +1681,54 @@ positions of the sun: dawn, sunrise, solar noon, sunset, 
dusk, solar
 elevation, solar azimuth, rahukaalam, and the phases of the moon.")
     (license license:asl2.0)))
 
+(define-public python-spherical-geometry
+  (package
+    (name "python-spherical-geometry")
+    (version "1.2.22")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/spacetelescope/spherical_geometry";)
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0kzcncqir4v7nhk9lxj9gxr32p3krkaqa58y2i4kksgxxy24qw4z"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      ;; NOTE: (Sharlatan-20220523T231348+0100): Tests depends on old Python2
+      ;; libarry `sphere'
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'preparations
+            (lambda _
+              ;; Fixing: setuptools-scm was unable to detect version for ...
+              (substitute* "setup.py"
+                (("use_scm_version=True")
+                 (format #f "version=~s" #$version))
+                (("setup_requires=\\['setuptools_scm'\\],.*")
+                 ""))
+              ;; Use our own libraries in place of bundles.
+              (setenv "USE_SYSTEM_QD" "1"))))))
+    (native-inputs
+     (list python-pytest
+           python-setuptools-scm))
+    (inputs
+     (list qd))
+    (propagated-inputs
+     (list python-astropy
+           python-numpy))
+    (home-page "https://github.com/spacetelescope/tweakwcs";)
+    (synopsis "Python astronimical package for handling spherical polygons")
+    (description
+     "The @code{spherical_geometry} library is a Python package for handling
+spherical polygons that represent arbitrary regions of the sky.")
+    ;; LICENSE.rst Association of Universities for Research in Astronomy (AURA)
+    ;; QD_LIBRARY_LICENSE.rst for bandeled QD source
+    (license license:bsd-3)))
+
 (define-public libnova
   (package
     (name "libnova")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]