From: Xinglu Chen <public@yoctocell.xyz>
To: Konrad Hinsen <konrad.hinsen@fastmail.net>, 50887@debbugs.gnu.org
Subject: [bug#50887] [PATCH] gnu: Add python-fitsio.
Date: Fri, 01 Oct 2021 16:05:44 +0200 [thread overview]
Message-ID: <87r1d4lu13.fsf@yoctocell.xyz> (raw)
In-Reply-To: <m1tui3n4t6.fsf@fastmail.net>
[-- Attachment #1: Type: text/plain, Size: 3493 bytes --]
On Wed, Sep 29 2021, Konrad Hinsen wrote:
> * 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)))
Maybe the bundled cfitsio should also be deleted in a ‘snippet’ in the ‘origin’?
> + ;; The bzip2 test fails because Guix' cfitsio
> + ;; is built without bzip2 support.
> + (substitute* "fitsio/test.py"
> + (("'SKIP_BZIP_TEST' in os.environ") "True"))
This part should probably be put in a separate phase, maybe you could
call it ‘skip-bzip-test’.
> + #t)))))
Phases don’t need to return #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.")
The sentence is lacking a subject; the meaning of “FITS” should be
written (I had no idea what it meant). I suggest something like
This package provides a Python library for reading from and writing to
@acronym{FITS, Flexible Image Transport System} files using the
CFITSIO library. Among other things, it can
@itemize
@item read and write image, binary, and ascii table extensions;
@item read arbitrary subsets of tables in a lazy manner;
@item query the rows and columns of a table;
@item read and write header keywords;
@item read and write Gzip files directory;
@item read Zip and Bzip2 files.
@end itemize
> + (license license:gpl2)))
‘LICENSE.txt’ looks like gpl2+
Could you send an updated patch?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
next prev parent reply other threads:[~2021-10-01 14:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 8:47 [bug#50887] [PATCH] gnu: Add python-fitsio Konrad Hinsen
2021-10-01 14:05 ` Xinglu Chen [this message]
2021-10-01 17:03 ` Konrad Hinsen
2021-10-04 14:10 ` bug#50887: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1d4lu13.fsf@yoctocell.xyz \
--to=public@yoctocell.xyz \
--cc=50887@debbugs.gnu.org \
--cc=konrad.hinsen@fastmail.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).