guix-commits
[Top][All Lists]
Advanced

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

03/04: gnu: Add python-astral.


From: guix-commits
Subject: 03/04: gnu: Add python-astral.
Date: Sat, 8 Jan 2022 17:28:30 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit c487b05d5fd1f27f9515483f6ba5a86bad2a9f45
Author: paladhammika <paladhammika@protonmail.com>
AuthorDate: Tue Jan 4 10:42:24 2022 -0500

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

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 1f9eca9a44..a7a07fa3a8 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -57,6 +57,7 @@
   #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
   #:use-module (gnu packages wxwidgets)
@@ -704,6 +705,36 @@ much of the core functionality and some common tools 
needed for performing
 astronomy and astrophysics.")
     (license license:bsd-3)))
 
+(define-public python-astral
+  (package
+    (name "python-astral")
+    (version "2.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "astral" version))
+       (sha256
+        (base32 "1gkggdibccmdy9glymw3kbrkzm6svvsg0lk56hhy92y4smkrj7g4"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest")))))))
+    (native-inputs
+     (list python-freezegun python-setuptools-scm))
+    (propagated-inputs
+     (list python-dataclasses python-pytest python-pytz))
+    (home-page "https://github.com/sffjunkie/astral";)
+    (synopsis "Calculations for the position of the sun and moon")
+    (description "Astral is a Python module that calculates times for various
+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 libnova
   (package
     (name "libnova")



reply via email to

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