emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#50887: closed ([PATCH] gnu: Add python-fitsio.)


From: GNU bug Tracking System
Subject: bug#50887: closed ([PATCH] gnu: Add python-fitsio.)
Date: Mon, 04 Oct 2021 14:11:01 +0000

Your message dated Mon, 04 Oct 2021 16:10:05 +0200
with message-id <87v92cop8i.fsf_-_@gnu.org>
and subject line Re: bug#50887: [PATCH] gnu: Add python-fitsio.
has caused the debbugs.gnu.org bug report #50887,
regarding [PATCH] gnu: Add python-fitsio.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
50887: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50887
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: Add python-fitsio. Date: Wed, 29 Sep 2021 10:47:39 +0200
* gnu/packages/astronomy.scm (python-fitsio): New variable.
---
 gnu/packages/astronomy.scm | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index a3f7d5cbf4..4fba3aae99 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -96,6 +96,49 @@ in FITS files.")
     (license (license:non-copyleft "file://License.txt"
                           "See License.txt in the distribution."))))
 
+(define-public python-fitsio
+  (package
+    (name "python-fitsio")
+    (version "1.1.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "fitsio" version))
+       (sha256
+        (base32 "1llql2i6xr9lkdl81jx5nvz80kspamvira90546y32ldy551hq1l"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unbundle-cfitsio
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((cfitsio (assoc-ref inputs "cfitsio"))
+                    (includedir (string-append "\"" cfitsio "/include\""))
+                    (libdir (string-append "\"" cfitsio "/lib\"")))
+               ;; Use Guix' cfitsio instead of the bundled one
+               (substitute* "setup.py"
+                 (("self.use_system_fitsio = False") "pass")
+                 (("self.system_fitsio_includedir = None") "pass")
+                 (("self.system_fitsio_libdir = None") "pass")
+                 (("self.use_system_fitsio") "True")
+                 (("self.system_fitsio_includedir") includedir)
+                 (("self.system_fitsio_libdir") libdir)))
+             ;; The bzip2 test fails because Guix' cfitsio
+             ;; is built without bzip2 support.
+             (substitute* "fitsio/test.py"
+               (("'SKIP_BZIP_TEST' in os.environ") "True"))
+             #t)))))
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)
+       ("cfitsio" ,cfitsio)))
+    (home-page "https://github.com/esheldon/fitsio";)
+    (synopsis
+     "Python library to read from and write to FITS files")
+    (description
+     "A compact Python library for reading from and writing to FITS files,
+based on the CFITSIO library.")
+    (license license:gpl2)))
+
 (define-public qfits
   (package
     (name "qfits")
-- 
2.33.0




--- End Message ---
--- Begin Message --- Subject: Re: bug#50887: [PATCH] gnu: Add python-fitsio. Date: Mon, 04 Oct 2021 16:10:05 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hi Konrad,

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

>>From c95c0b18b4c2da6af7432a3dcf11c5f9984772f8 Mon Sep 17 00:00:00 2001
> From: Konrad Hinsen <konrad.hinsen@fastmail.net>
> Date: Wed, 29 Sep 2021 10:47:39 +0200
> Subject: [PATCH] gnu: Add python-fitsio.
>
> * gnu/packages/astronomy.scm (python-fitsio): New variable.

Applied.  Thank you & thanks Xinglu for reviewing!

Ludo’.


--- End Message ---

reply via email to

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