From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SLWgGxFAV2FKYgAAgWs5BA (envelope-from ) for ; Fri, 01 Oct 2021 19:06:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2ep6FxFAV2ExAwAA1q6Kng (envelope-from ) for ; Fri, 01 Oct 2021 17:06:25 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 298DC705E for ; Fri, 1 Oct 2021 19:06:20 +0200 (CEST) Received: from localhost ([::1]:39304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWLzH-00069o-9R for larch@yhetil.org; Fri, 01 Oct 2021 13:06:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWLx4-0004uP-MW for guix-patches@gnu.org; Fri, 01 Oct 2021 13:04:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWLx4-0006S5-E7 for guix-patches@gnu.org; Fri, 01 Oct 2021 13:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWLx4-0003lL-9T for guix-patches@gnu.org; Fri, 01 Oct 2021 13:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50887] [PATCH] gnu: Add python-fitsio. Resent-From: Konrad Hinsen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Oct 2021 17:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50887 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen , 50887@debbugs.gnu.org Received: via spool by 50887-submit@debbugs.gnu.org id=B50887.163310780714420 (code B ref 50887); Fri, 01 Oct 2021 17:04:02 +0000 Received: (at 50887) by debbugs.gnu.org; 1 Oct 2021 17:03:27 +0000 Received: from localhost ([127.0.0.1]:57249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLwQ-0003kQ-HA for submit@debbugs.gnu.org; Fri, 01 Oct 2021 13:03:27 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:50103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLwM-0003kB-H7 for 50887@debbugs.gnu.org; Fri, 01 Oct 2021 13:03:20 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 674BD3202834; Fri, 1 Oct 2021 13:03:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 01 Oct 2021 13:03:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=YElrlFj0pLcnZmhk+d20YnG8zO MFcXgFhamG1AK8qco=; b=hPbignTWkhKkYiQ6Wg1qSCzD7VBddlC9HiovCPVre+ zBgcWzkHGuqqYikEqrTH7KmXw7Ie60Qwq9Vd7U7qnYJ/K+RaseF201T6TIuR8Sh7 yMjJCtwbLFb63rnPD3vNWl04p09KtcQ5sUXan/3DtcSVwVndNlZWTJEGOCr6Wie2 ZH8DdRG/lpPYt2XM4ltJftZQ+NGanWhuaZRtcAcxl+c+vH1MfpkuXjuCjHITVwTG rBSwG/YUQVPxVXlv09h22pMTJ+D6trTuPWLqrdgGUNBjExO8tCchvyP4XJYWCt4F IhZy0nKFQNHgybh59XnQswHUcYL2SIjO52O7ngHAMpyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=YElrlF j0pLcnZmhk+d20YnG8zOMFcXgFhamG1AK8qco=; b=hVi7rRABNcZTafDKM2KY3Y 581bAVbCCmFz4yUO25Vt54/uL6WxEsi0KykkhpOxM0meEmd03uEalu+Pi0aBRBTZ sZAHUtxgu++EKGDgvGWAfUVromJM4A1Ex8Q9fz6FxwrI64Y6/lWFTUNXhx/oZd/a GFlclPahI7RvXbbnCSEUQPU38OOE40kCCWQ3ZKlEgm7TQtm4FJczLcPNn936txSZ 3kFAKqKzCVE5UQZ5aLMg8axdLqqmIj4oXgzo0YD61d4gi0oPo+Kuwj2n5ajB74nM xHkfhAd8eWUIRc/Gv2Tz9tJ7EXPgcmOQv635YMONOzC6dXYHGnEvt6bXoERlHJ7Q == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekiedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdefhedmnecujfgurhephf fvufgjfhffkfggtgesmhdtreertddttdenucfhrhhomhepmfhonhhrrgguucfjihhnshgv nhcuoehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnhgvtheqnecuggftrf grthhtvghrnhephedvgedvjedvtdeuueduueegvdeuhfefueeffeetvedtvdelveekveeg gefggfeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epkhhonhhrrggurdhhihhnshgvnhesfhgrshhtmhgrihhlrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Oct 2021 13:03:11 -0400 (EDT) From: Konrad Hinsen In-Reply-To: <87r1d4lu13.fsf@yoctocell.xyz> References: <87r1d4lu13.fsf@yoctocell.xyz> Date: Fri, 01 Oct 2021 19:03:10 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633107980; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=YElrlFj0pLcnZmhk+d20YnG8zOMFcXgFhamG1AK8qco=; b=ayQQEnHegC3hfx0yQmSr4eZjqfwUs9U2JNjy7CR2AylV1h1S6lcHAX4FvoxZiMSxaNRvRQ iw7fyvgvrjIMCuwBmNQ1W44PURC9Uf+I9PE+hhAM5faYbbPx9zHpjid5eVOiQJxI2K++pr v4vDVIJV4dhsLC15PnBDU3QoYtfmveug9lMbQ73lrTyM8kCHUJkiS1bA39FnE4cGRPFvx2 PkzctH1hX0ycmpax2bnvg3r1JW+kQAMZk+/S0iaRk3Xck1AXqtvsQhCeTBkA/oDrUNTy0P ENdwinOlvhDjyJe9/JCXm7fu1suysEtQFb8+nBFdYt5KT/Sci/D3LJTOnhFs1g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633107980; a=rsa-sha256; cv=none; b=s6rr+nAAjRTqWpeYGs/oKlVcI/eIXaNdx90Rp1bbq0LgMqrMrss6zBWr/s+ipvn+TO2rtM v68/crScycuI0c3p/A2I8R5C8KZYJe5vfkjq8oFp6i0C2X1/9e9laOJbluKecYsjVi+6hR mrIw4Zb1f+mEJx7T9Go88aKaVpBRgzEFE1ByKFxMLsAeKrHWUR3jB0YMGmYMLTdB+VSSoI St8+La+l9fdH3YMA6L54qAF5Qwhs38f5iB5+ymgUvzWl2rKDnkoR+1fBgaBQv8IB07u1Oe 6iJtmxYr3BuszSCWFSSp0rus7OfztX4xq/qrCmUcylURr/9g9RrnvO6cEICjHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.net header.s=fm1 header.b=hPbignTW; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=hVi7rRAB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.80 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.net header.s=fm1 header.b=hPbignTW; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b=hVi7rRAB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 298DC705E X-Spam-Score: -1.80 X-Migadu-Scanner: scn1.migadu.com X-TUID: 3mMtpfWsbwgv --=-=-= Content-Type: text/plain Xinglu Chen writes: > Could you send an updated patch? Here it comes. Thanks for the careful code review! I learned a few things from this: I didn't know about snippets, nor about the subtle differences between gpl2 and gpl2+. Thanks, Konrad. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-Add-python-fitsio.patch >From c95c0b18b4c2da6af7432a3dcf11c5f9984772f8 Mon Sep 17 00:00:00 2001 From: Konrad Hinsen Date: Wed, 29 Sep 2021 10:47:39 +0200 Subject: [PATCH] gnu: Add python-fitsio. * gnu/packages/astronomy.scm (python-fitsio): New variable. --- gnu/packages/astronomy.scm | 65 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index a3f7d5cbf4..287cf4a94c 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -96,6 +96,71 @@ 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")) + (modules '((guix build utils))) + (snippet + ;; Remove the bundled cfitsio + `(begin + (delete-file-recursively "cfitsio3490") + (substitute* "MANIFEST.in" + (("recursive-include cfitsio3490.*$\n") "")) + #t)))) + (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))))) + (add-after 'unpack 'skip-bzip2-test + (lambda* (#:key inputs #:allow-other-keys) + ;; The bzip2 test fails because Guix' cfitsio + ;; is built without bzip2 support. + (substitute* "fitsio/test.py" + (("'SKIP_BZIP_TEST' in os.environ") "True"))))))) + (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 + "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. +@end itemize") + (license license:gpl2+))) + (define-public qfits (package (name "qfits") -- 2.33.0 --=-=-=--