From patchwork Sat Oct 30 02:51:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 34144 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2FB6927BBE3; Sat, 30 Oct 2021 03:57:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E586E27BBE1 for ; Sat, 30 Oct 2021 03:57:22 +0100 (BST) Received: from localhost ([::1]:53028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgeYa-0004pc-W9 for patchwork@mira.cbaines.net; Fri, 29 Oct 2021 22:57:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgeYI-0004pT-KZ for guix-patches@gnu.org; Fri, 29 Oct 2021 22:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44854) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgeYI-0004RX-CN for guix-patches@gnu.org; Fri, 29 Oct 2021 22:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgeYI-0006kP-7e for guix-patches@gnu.org; Fri, 29 Oct 2021 22:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48046] [PATCH v2 1/3] gnu: python-pytest-astropy: Adjust inputs. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Oct 2021 02:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48046 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48046@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48046-submit@debbugs.gnu.org id=B48046.163556262025923 (code B ref 48046); Sat, 30 Oct 2021 02:57:02 +0000 Received: (at 48046) by debbugs.gnu.org; 30 Oct 2021 02:57:00 +0000 Received: from localhost ([127.0.0.1]:56399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgeYG-0006k3-DW for submit@debbugs.gnu.org; Fri, 29 Oct 2021 22:57:00 -0400 Received: from mout02.posteo.de ([185.67.36.66]:46203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgeYC-0006jY-1x for 48046@debbugs.gnu.org; Fri, 29 Oct 2021 22:56:57 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id E5C51240103 for <48046@debbugs.gnu.org>; Sat, 30 Oct 2021 04:56:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1635562609; bh=5bMg+S1S90Z/oRLm7GbQHTs5e1i1CpNqo1BCwv2m2Uw=; h=From:To:Cc:Subject:Date:From; b=SEIXLwJL5ajWK3erMZU3D4ClKYJsyT++BirZxTiX4P98dOXNMTT7IGVgImWM60GpS rLb4bHeIBRLVxkndAyjiF+PJt+kEV85dRWhowWGLEh2yJTwBvyuylTXvbBYJkPyUss w84GnpqGxsh3vd+dtSOdr3e0qRwQhJwXUSA56/AFhT8b2B7BmEgz6zqb3bF6VFVr8M 7x8UGkn0neelTEbgu/203v66b1NqQ/ed/WJvV24ugMqWejnhg/6yo4j2LNDqiJ/voo ZnR+ab8P1SUH82BfzqvGrK0LTslnfeP/7eOQojWmbUYofcSG13gSjjIV2UM90kZWA9 taFJFRgftYrDw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Hh3q44ZN2z9rxG; Sat, 30 Oct 2021 04:56:48 +0200 (CEST) From: Vinicius Monego Date: Sat, 30 Oct 2021 02:51:31 +0000 Message-Id: <20211030025133.23186-2-monego@posteo.net> In-Reply-To: <20211030025133.23186-1-monego@posteo.net> References: <20211030025133.23186-1-monego@posteo.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-check.scm (python-pytest-astropy)[arguments]: Add new phase to skip a version check bug. [native-inputs]: Remove python-pytest. Move python-attrs, python-hypothesis, python-pytest-arraydiff, python-pytest-astropy-header, python-pytest-cov, python-pytest-filter-subpackage, python-pytest-mock, python-pytest-openfiles, python-pytest-remotedata to ... [propagated-inputs]: ... here. --- gnu/packages/python-check.scm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index a13bd0baa4..0cc0468d00 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -341,12 +341,20 @@ Astropy project, but is optimized for use with astropy-related projects.") (base32 "18j6z6y2fvykmcs5z0mldhhaxxn6wzpnhlm2ps7m8r5z5kmh1631")))) (build-system python-build-system) (arguments - ;; No tests provided - '(#:tests? #f)) + `(#:tests? #f ; there are no tests + #:phases + (modify-phases %standard-phases + ;; There is a bug somewhere that makes pytest-filter-subpackage appear + ;; as version 0.0.0 to setup.py. Remove it from the requirements. + (add-after 'unpack 'remove-requirement + (lambda _ + (substitute* "setup.cfg" + ((".*pytest-filter-subpackage.*") ""))))))) (native-inputs + `(("python-setuptools-scm" ,python-setuptools-scm))) + (propagated-inputs `(("attrs" ,python-attrs) ("hypothesis" ,python-hypothesis) - ("pytest" ,python-pytest) ("pytest-arraydiff" ,python-pytest-arraydiff) ("pytest-astropy-header" ,python-pytest-astropy-header) ("pytest-cov" ,python-pytest-cov) @@ -354,8 +362,7 @@ Astropy project, but is optimized for use with astropy-related projects.") ("pytest-filter-subpackage" ,python-pytest-filter-subpackage) ("pytest-mock" ,python-pytest-mock) ("pytest-openfiles" ,python-pytest-openfiles) - ("pytest-remotedata" ,python-pytest-remotedata) - ("setuptools-scm" ,python-setuptools-scm))) + ("pytest-remotedata" ,python-pytest-remotedata))) (home-page "https://github.com/astropy/pytest-astropy") (synopsis "Metapackage for all the testing machinery used by the Astropy Project") From patchwork Sat Oct 30 02:51:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 34145 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3132B27BBE3; Sat, 30 Oct 2021 03:58:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5A92627BBE1 for ; Sat, 30 Oct 2021 03:58:20 +0100 (BST) Received: from localhost ([::1]:53508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgeZX-0005CK-Gd for patchwork@mira.cbaines.net; Fri, 29 Oct 2021 22:58:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgeZJ-0005Bo-AZ for guix-patches@gnu.org; Fri, 29 Oct 2021 22:58:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44864) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgeZG-0007Ag-4E for guix-patches@gnu.org; Fri, 29 Oct 2021 22:58:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgeZG-0006mR-3z for guix-patches@gnu.org; Fri, 29 Oct 2021 22:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48046] [PATCH v2 2/3] gnu: python-pyerfa: Adjust inputs. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Oct 2021 02:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48046 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48046@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48046-submit@debbugs.gnu.org id=B48046.163556263725997 (code B ref 48046); Sat, 30 Oct 2021 02:58:02 +0000 Received: (at 48046) by debbugs.gnu.org; 30 Oct 2021 02:57:17 +0000 Received: from localhost ([127.0.0.1]:56409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgeYW-0006lD-T9 for submit@debbugs.gnu.org; Fri, 29 Oct 2021 22:57:17 -0400 Received: from mout01.posteo.de ([185.67.36.65]:46493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgeYL-0006k2-Db for 48046@debbugs.gnu.org; Fri, 29 Oct 2021 22:57:12 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id C0C5F240027 for <48046@debbugs.gnu.org>; Sat, 30 Oct 2021 04:56:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1635562619; bh=ZVBcdpcfzRlPiX5Hy7f0mGc6jaTFh8c6a4/06VPRkas=; h=From:To:Cc:Subject:Date:From; b=qG/CVJlyLdKGG/KpHAsCW72DKQ1EdMHiUUFL3fvy3EH4peaxWr+rDQN719x1S8tbz /R/0I2DjnmT/ptd1icmf8XbY/1Mot7bVjBW4OTGVM8GlOv/49bt+XpoZPLw+1T1YTu lPJStM3sxaE28+iqroKoo4+N6P+psuwC4ZMWYHO4EGTftiyBgwVlFVYSEVZg3oqbui mFbPpkJsp8dXSojjYWQ0CXhwvVhSc1nWedHuGQ/BN5k6B8fxo9oC6LcdZ29a7rZnhx ymzHHDXAaFZ1AXPjMQz6T9uUKb7zmscuLCd/dbJ/DuMkiVOop/lLKtCymf7PvWdX9Q 5CyZLtZ+EIlsQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Hh3qG6NDcz6tm5; Sat, 30 Oct 2021 04:56:58 +0200 (CEST) From: Vinicius Monego Date: Sat, 30 Oct 2021 02:51:32 +0000 Message-Id: <20211030025133.23186-3-monego@posteo.net> In-Reply-To: <20211030025133.23186-1-monego@posteo.net> References: <20211030025133.23186-1-monego@posteo.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/astronomy.scm (python-pyerfa)[inputs]: Move python-numpy to ... [propagated-inputs]: ... here. --- gnu/packages/astronomy.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 1fb6f5a38b..95846749af 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2020 R Veera Kumar ;;; Copyright © 2020, 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Sharlatan Hellseher +;;; Copyright © 2021 Vinicius Monego ;;; ;;; This file is part of GNU Guix. ;;; @@ -1009,8 +1010,9 @@ JPL ephemerides use to predict raw (x,y,z) planetary positions.") ("setuptools-scm" ,python-setuptools-scm) ("pytest-doctestplus" ,python-pytest-doctestplus))) (inputs - `(("liberfa" ,erfa) - ("numpy" ,python-numpy))) + `(("liberfa" ,erfa))) + (propagated-inputs + `(("numpy" ,python-numpy))) (home-page "https://github.com/liberfa/pyerfa") (synopsis "Python bindings for ERFA") (description From patchwork Sat Oct 30 02:51:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 34146 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6B92327BBE1; Sat, 30 Oct 2021 03:58:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7C2FD27BBE5 for ; Sat, 30 Oct 2021 03:58:20 +0100 (BST) Received: from localhost ([::1]:53512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgeZX-0005CN-Kh for patchwork@mira.cbaines.net; Fri, 29 Oct 2021 22:58:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgeZJ-0005Bn-DP for guix-patches@gnu.org; Fri, 29 Oct 2021 22:58:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgeZF-0007Ae-O4 for guix-patches@gnu.org; Fri, 29 Oct 2021 22:58:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgeZF-0006mK-NX for guix-patches@gnu.org; Fri, 29 Oct 2021 22:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48046] [PATCH v2 3/3] gnu: Add python-astropy. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Oct 2021 02:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48046 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48046@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 48046-submit@debbugs.gnu.org id=B48046.163556263625990 (code B ref 48046); Sat, 30 Oct 2021 02:58:01 +0000 Received: (at 48046) by debbugs.gnu.org; 30 Oct 2021 02:57:16 +0000 Received: from localhost ([127.0.0.1]:56407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgeYR-0006ky-Nh for submit@debbugs.gnu.org; Fri, 29 Oct 2021 22:57:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]:55343) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgeYP-0006kj-P6 for 48046@debbugs.gnu.org; Fri, 29 Oct 2021 22:57:10 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 17241240103 for <48046@debbugs.gnu.org>; Sat, 30 Oct 2021 04:57:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1635562624; bh=HeKFZ4Ufv3XzPwPyPhaPdRe0UVfGV6uV//YxWQYDNE4=; h=From:To:Cc:Subject:Date:From; b=LV/jvJpXTODacdRrEePLk4Xu25Dy6N8giuu+p3Io837wgtzXMuMBFw4iRv1BVuC1d 1fvgop0rvdd7CTMes6McDirsVi5nECAm6yh5z0LQ8W+xAzPQKxJpSCiQPWFNYt4FlJ veJyeQrw2TkyFVQR2gmyhxVW9kjYTvx6wFZD8N8DYgGzlWCy+nypDB/eafooJyl8XH ABAabGSPC2lJIhf0xgRHyB3N4nXBAE1B0J7nuIPMtqn1PVQUHfIb3BphjpiwI8g9oH jVR1DxtkvmPfRi6ldk8DjcBUCSOHsEjabHwBOpDBd9rgjG7QXrYeXnf78SZB0zaCSe mDuQXlI+yW5rw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Hh3qM0bbHz6tm5; Sat, 30 Oct 2021 04:57:02 +0200 (CEST) From: Vinicius Monego Date: Sat, 30 Oct 2021 02:51:33 +0000 Message-Id: <20211030025133.23186-4-monego@posteo.net> In-Reply-To: <20211030025133.23186-1-monego@posteo.net> References: <20211030025133.23186-1-monego@posteo.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Sharlatan Hellseher This patch was co-authored with Vinicius Monego. * gnu/packages/astronomy.scm (python-astropy): New variable. --- gnu/packages/astronomy.scm | 95 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 95846749af..ec48c787e3 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -57,6 +57,7 @@ #:use-module (gnu packages version-control) #:use-module (gnu packages video) #:use-module (gnu packages xiph) + #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) @@ -613,6 +614,100 @@ accurately in real time at any rate desired.") `(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF") #:tests? #f)))) +(define-public python-astropy + (package + (name "python-astropy") + (version "4.3.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "astropy" version)) + (sha256 + (base32 "0lfd6n7v7kas4wvacddnwgccax3ks908735dzilg7dsf7ci52f9d")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove Python bundles. + (with-directory-excursion "astropy/extern" + (for-each delete-file-recursively '("ply" "configobj"))) + ;; Remove cextern bundles and leave the wcslib bundle. Astropy + ;; upgrades to different versions of wcslib every few releases + ;; and tests break every upgrade. + ;; TODO: unbundle wcslib. + (with-directory-excursion "cextern" + (for-each delete-file-recursively '("cfitsio" "expat"))) + #t)))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'preparations + (lambda _ + ;; Use our own libraries in place of bundles, with the + ;; exception of wcslib. + (setenv "ASTROPY_USE_SYSTEM_CFITSIO" "1") + (setenv "ASTROPY_USE_SYSTEM_EXPAT" "1") + ;; Some tests require a writable home. + (setenv "HOME" "/tmp") + ;; Relax xfail tests. + (substitute* "setup.cfg" + (("xfail_strict = true") "xfail_strict = false")) + ;; Replace all references to external ply. + (let ((ply-files '("coordinates/angle_formats.py" + "utils/parsing.py"))) + (with-directory-excursion "astropy" + (map (lambda (file) + (substitute* file (("astropy.extern.ply") + "ply"))) + ply-files))) + ;; Replace reference to external configobj. + (with-directory-excursion "astropy/config" + (substitute* "configuration.py" + (("from astropy.extern.configobj ") ""))))) + ;; This file is opened in both install and check phases. + (add-before 'install 'writable-compiler + (lambda _ (make-file-writable "astropy/_compiler.c"))) + (add-before 'check 'writable-compiler + (lambda _ (make-file-writable "astropy/_compiler.c"))) + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + ;; Extensions have to be rebuilt before running the tests. + (invoke "python" "setup.py" "build_ext" "--inplace") + (invoke "python" "-m" "pytest" "--pyargs" "astropy" + ;; Skip tests that need remote data. + "-m" "not remote_data"))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python-coverage" ,python-coverage) + ("python-cython" ,python-cython) + ("python-extension-helpers" ,python-extension-helpers) + ("python-ipython" ,python-ipython) + ("python-jplephem" ,python-jplephem) + ("python-objgraph" ,python-objgraph) + ("python-pytest" ,python-pytest) + ("python-pytest-astropy" ,python-pytest-astropy) + ("python-pytest-xdist" ,python-pytest-xdist) + ("python-setuptools-scm" ,python-setuptools-scm) + ("python-sgp4" ,python-sgp4) + ("python-skyfield" ,python-skyfield))) + (inputs + `(("cfitsio" ,cfitsio) + ("expat" ,expat))) + (propagated-inputs + `(("python-configobj" ,python-configobj) + ("python-numpy" ,python-numpy) + ("python-ply" ,python-ply) + ("python-pyerfa" ,python-pyerfa))) + (home-page "https://www.astropy.org/") + (synopsis "Core package for Astronomy in Python") + (description + "Astropy is a single core package for Astronomy in Python. It contains +much of the core functionality and some common tools needed for performing +astronomy and astrophysics.") + (license license:bsd-3))) + (define-public libnova (package (name "libnova")