diff mbox series

[bug#52991] gnu: Add python-astral

Message ID OQl7p6ixOMxODg7AYbOMtsHqzbFTTxvSDM-41dLDIDH3E7xFPFrLLpSYzokn46H0CjYI-Om_miypPAFByRDb9hQNGk_uEIHn95-5MHowc_k=@protonmail.com
State Accepted
Headers show
Series [bug#52991] gnu: Add python-astral | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Disseminate Dissent Jan. 4, 2022, 3:50 p.m. UTC
Herein are the v2 changes.

Disseminate,
Peace


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Tuesday, January 4th, 2022 at 3:08 AM, Vinicius Monego <monego@posteo.net> wrote:

> Hello,
>
> > ;; FIXME The directory '/homeless-shelter/.cache/pip' or its parent
> >
> > directory is not owned or is not writable by the current user. The
> >
> > cache has been disabled. Check the permissions and owner of that
> >
> > directory. If executing pip with sudo, you should use sudo's -H flag.
>
> This can be fixed by overriding the check phase and calling pytest
>
> manually:
>
> >     (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")))))))
> >
>
> I also adjusted the inputs as:
>
> >     (native-inputs
> >      (list python-freezegun python-setuptools-scm))
> >     (propagated-inputs
> >      (list python-dataclasses python-pytest python-pytz))
> >
>
> When the package is a module, all runtime inputs should be propagated.
>
> I also removed python-requests since it was not being used.
>
> > -   (description "This is @code{astral} a Python module which
> >
> >     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.")
>
> I'd reword it starting with "@code{astral} is a Python module ..."
>
> The indentation is also off. If you're using Emacs you can use one of
>
> its indent commands to fix it.
>
> Could you send a v2 with these changes?
diff mbox series

Patch

From edf40f038e037f891bc3aaede0015da064f4c0bb Mon Sep 17 00:00:00 2001
From: paladhammika <paladhammika@protonmail.com>
Date: Tue, 4 Jan 2022 10:42:24 -0500
Subject: [PATCH] gnu: Add python=astral.

---
 gnu/packages/astronomy.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 1f9eca9a44..88966d7ecc 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -57,6 +57,7 @@  (define-module (gnu packages astronomy)
   #: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 @@  (define-public python-astropy
 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 "@code{Astral} a Python module which 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")
-- 
2.34.0