[PATCH] Add new jplephem

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal

Debbugs page

Sharlatan Hellseher wrote 4 years ago
(address . guix-patches@gnu.org)
CAO+9K5q5XQJTEVsX5j+tgV96b1SptpS0vrm2HSLpCN5GWPZ5AA@mail.gmail.com
Hi Guix team!
I continue adding astronomy packages.
Is it better to put Python packages to python-science or it's ok to
keep them in astronomy?
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From be78bcfd45dd5ac76da8882344198235b5952c71 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Mon, 1 Feb 2021 14:56:41 +0000
Subject: [PATCH] gnu: Add jplephem

* gnu/packages/astronomy.scm (python-jplephem): New variable
---
gnu/packages/astronomy.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 9777b0008f..6748d2dff1 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -48,12 +48,14 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pretty-print)
+ #:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xorg)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1))
@@ -692,3 +694,36 @@ more.")
license:gpl2+
license:lgpl2.0+
license:lgpl2.1+))))
+
+;;; Python based packages completely related to Astronomy
+
+(define-public python-jplephem
+ (package
+ (name "python-jplephem")
+ (version "2.15")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "jplephem" version))
+ (sha256
+ (base32 "1ca3dswsslij79qg6dcijjz4l0fj6nzmxld8z93v45ahlkhps0g0"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (setenv "PYTHONPATH"
+ (string-append "./build/lib:"
+ (getenv "PYTHONPATH")))
+ (setenv "PATH" (string-append out "/bin:"
+ (getenv "PATH")))
+ (invoke "python" "-m" "unittest" "discover" "-s" "test")))))))
+ (inputs
+ `(("python-numpy" ,python-numpy)))
+ (home-page "https://github.com/brandon-rhodes/python-jplephem")
+ (synopsis "Python version of NASA DE4xx ephemerides")
+ (description
+ "Use a JPL ephemeris to predict planet positions.")
+ (license license:expat)))
--
2.30.0
Nicolas Goaziou wrote 4 years ago
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 46237-done@debbugs.gnu.org)
87r1lsut5p.fsf@nicolasgoaziou.fr
Hello,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (3 lines)
> Is it better to put Python packages to python-science or it's ok to
> keep them in astronomy?

I think "astronomy.scm" is fine.

Toggle quote (4 lines)
> Subject: [PATCH] gnu: Add jplephem
>
> * gnu/packages/astronomy.scm (python-jplephem): New variable

Applied. Thank you!

Toggle quote (2 lines)
> +;;; Python based packages completely related to Astronomy

I removed this comment since I think it might add burden to packagers.
IMO, alphabetical or random (!) sorting are fine, but sub-categories in
a module is a bit too much for package definitions.

Toggle quote (3 lines)
> + (description
> + "Use a JPL ephemeris to predict planet positions.")

I expounded the description a bit, following README from repository.

Regards,
--
Nicolas Goaziou
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 46237@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 46237
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help