[PATCH]: Gnu add astropy

  • Done
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • Vinicius Monego
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 26 Apr 2021 22:01
(address . guix-patches@gnu.org)
CAO+9K5r_T32NoHCX08=KfrmVX4Rrm890jwJFm_VdcpFWphU_2g@mail.gmail.com
Hi Guix team!
Here is my attempt to pack bulky python package - https://www.astropy.org/
I've disabled test and add minor modification removing `_compiler.c' file.
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From 12680c01148cac6be095f1dfab8beae21977f6ef Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Mon, 26 Apr 2021 20:52:09 +0100
Subject: [PATCH] Gnu: Add Astropy

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

Toggle diff (109 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 4660e141a4..c43c98f797 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -39,6 +39,7 @@
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages libusb)
@@ -51,11 +52,14 @@
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages time)
#: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)
@@ -1034,3 +1038,79 @@ astronomical images, especially when there is no WCS information available.")
"Skyfield computes positions for the stars, planets, and satellites in
orbit around the Earth.")
(license license:expat)))
+
+(define-public python-astropy
+ (package
+ (name "python-astropy")
+ (version "4.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ ;; Source: https://github.com/astropy/astropy
+ (uri (pypi-uri "astropy" version))
+ (sha256
+ (base32 "09w4q64c6bykcdp8xdq5fgsdjqrcihqhqjszqjp3s5a1493kwj7d"))))
+ (build-system python-build-system)
+ (arguments
+ ;; NOTE: (Sharlatan-20210426T204315+0100): Tests require build astropy
+ ;; module, it needs a good review on how to enable them.
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'setenv-astropy-system-all
+ (lambda _
+ (setenv "ASTROPY_USE_SYSTEM_ALL" "1")
+ #t))
+ ;; NOTE: (Sharlatan-20210426T200127+0100): it fails during install
+ ;; phases without the file is removed
+ ;;
+ ;; PermissionError: [Errno 13] Permission denied: './astropy/_compiler.c'
+ (add-before 'install 'remove-compiler-c
+ (lambda _
+ (delete-file "astropy/_compiler.c")
+ #t))
+ (add-before 'install 'makdir-astropy
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p
+ (string-append out "/astropy")))
+ #t)))))
+ (native-inputs
+ `(("cfitsio" ,cfitsio)
+ ("coverage" ,python-coverage)
+ ("cython" ,python-cython)
+ ("extension-helpers" ,python-extension-helpers)
+ ("ipython" ,python-ipython)
+ ("objgraph" ,python-objgraph)
+ ("pkg-config" ,pkg-config)
+ ("setuptools-scm" ,python-setuptools-scm)
+ ("sgp4" ,python-sgp4)
+ ("skyfield" ,python-skyfield)))
+ (inputs
+ `(("asdf" ,python-asdf)
+ ("beautifulsoup4" ,python-beautifulsoup4)
+ ("bleach" ,python-bleach)
+ ("bottleneck" ,python-bottleneck)
+ ("cfitsio" ,cfitsio)
+ ("dask" ,python-dask)
+ ("expat" ,expat)
+ ("graphviz" ,graphviz)
+ ("h5py" ,python-h5py)
+ ("html5lib" ,python-html5lib)
+ ("jplephem" ,python-jplephem)
+ ("matplotlib" ,python-matplotlib)
+ ("mpmath" ,python-mpmath)
+ ("numpy" ,python-numpy)
+ ("pandas" ,python-pandas)
+ ("pyerfa" ,python-pyerfa)
+ ("pytz" ,python-pytz)
+ ("pyyaml" ,python-pyyaml)
+ ("scipy" ,python-scipy)
+ ("sortedcontainers" ,python-sortedcontainers)
+ ("wcslib" ,wcslib)))
+ (home-page "https://astropy.org/")
+ (synopsis "Astronomy and astrophysics core library")
+ (description
+ "Astropy Project is a single core package for Astronomy in Python and foster
+interoperability between Python astronomy packages.")
+ (license license:bsd-3)))
--
2.31.1
V
V
Vinicius Monego wrote on 19 May 2021 20:16
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 48046@debbugs.gnu.org)
a2c650067b52001a3b205cbc1b3999eb99ea4d92.camel@posteo.net
Hi,

Em seg, 2021-04-26 às 20:01 +0000, Sharlatan Hellseher escreveu:
Toggle quote (7 lines)
> Hi Guix team!
>
> Here is my attempt to pack bulky python package -
> https://www.astropy.org/
> I've disabled test and add minor modification removing `_compiler.c'
> file.

I've tried to package AstroPy before but got stuck in the dependencies,
more specifically pytest-astropy. There is a bug somewhere that pytest-
filter-subpackage is not found by setup.py, even though it's listed in
the inputs. I encountered that problem again here, after enabling the
tests.

Toggle quote (5 lines)
> + ;; NOTE: (Sharlatan-20210426T204315+0100): Tests require build
> astropy
> + ;; module, it needs a good review on how to enable them.
> + `(#:tests? #f

AstroPy uses pytest, which is not listed in your native-inputs. The
other dependencies I had to add are python-hypothesis, python-pytest-
cov, python-pytest-astropy and python-pytest-xdist. According to the
documentation, it should be as simple as running pytest to run the
entire test suite:


If you end up in 'ModuleNotFoundError: No module named "astropy"', you
may have to update PYTHONPATH after the install phase with (add-
installed-pythonpath inputs outputs). That usually happens when
replacing the check phase.

Toggle quote (23 lines)
> + (inputs
> + `(("asdf" ,python-asdf)
> + ("beautifulsoup4" ,python-beautifulsoup4)
> + ("bleach" ,python-bleach)
> + ("bottleneck" ,python-bottleneck)
> + ("cfitsio" ,cfitsio)
> + ("dask" ,python-dask)
> + ("expat" ,expat)
> + ("graphviz" ,graphviz)
> + ("h5py" ,python-h5py)
> + ("html5lib" ,python-html5lib)
> + ("jplephem" ,python-jplephem)
> + ("matplotlib" ,python-matplotlib)
> + ("mpmath" ,python-mpmath)
> + ("numpy" ,python-numpy)
> + ("pandas" ,python-pandas)
> + ("pyerfa" ,python-pyerfa)
> + ("pytz" ,python-pytz)
> + ("pyyaml" ,python-pyyaml)
> + ("scipy" ,python-scipy)
> + ("sortedcontainers" ,python-sortedcontainers)
> + ("wcslib" ,wcslib)))

AstroPy is a library, its Python inputs should be propagated here.
for reference.

Also, the documentation states that the only strict requirements are
PyERFA and NumPy:


IMO we should only propagate these, and leave the rest in native-inputs
as needed by tests.

Now speaking of the astropy dependencies, pytest-astropy is supposed to
propagate its six dependencies. AFAIK its purpose is to be a
metapackage to install these other 6 pytest modules. PyERFA should also
propagate numpy (liberfa can remain as normal input).

I'll take a look at this package again next week. Could you test these
suggestions in the meantime?

Vinicius
S
S
Sharlatan Hellseher wrote on 22 May 2021 22:00
(name . Vinicius Monego)(address . monego@posteo.net)(address . 48046@debbugs.gnu.org)
CAO+9K5oVE-z7giCse5ZSZq0JL=MPwS5zsnYAW-EF46a2CjC3Fg@mail.gmail.com
Hi Vinicius,

My attempt to make Astropy test working failed as well. the project
heavily depends on TOX which requires pip to install missing
dependencies for itself. I run test with pytest but it looks like it's
not allowed by this

I'll come back to conquer it once again when I have some fresh ideas.

On Wed, 19 May 2021 at 18:16, Vinicius Monego <monego@posteo.net> wrote:
Toggle quote (83 lines)
>
> Hi,
>
> Em seg, 2021-04-26 às 20:01 +0000, Sharlatan Hellseher escreveu:
> > Hi Guix team!
> >
> > Here is my attempt to pack bulky python package -
> > https://www.astropy.org/
> > I've disabled test and add minor modification removing `_compiler.c'
> > file.
>
> I've tried to package AstroPy before but got stuck in the dependencies,
> more specifically pytest-astropy. There is a bug somewhere that pytest-
> filter-subpackage is not found by setup.py, even though it's listed in
> the inputs. I encountered that problem again here, after enabling the
> tests.
>
> > + ;; NOTE: (Sharlatan-20210426T204315+0100): Tests require build
> > astropy
> > + ;; module, it needs a good review on how to enable them.
> > + `(#:tests? #f
>
> AstroPy uses pytest, which is not listed in your native-inputs. The
> other dependencies I had to add are python-hypothesis, python-pytest-
> cov, python-pytest-astropy and python-pytest-xdist. According to the
> documentation, it should be as simple as running pytest to run the
> entire test suite:
>
> https://docs.astropy.org/en/latest/development/testguide.html#running-tests
>
> If you end up in 'ModuleNotFoundError: No module named "astropy"', you
> may have to update PYTHONPATH after the install phase with (add-
> installed-pythonpath inputs outputs). That usually happens when
> replacing the check phase.
>
> > + (inputs
> > + `(("asdf" ,python-asdf)
> > + ("beautifulsoup4" ,python-beautifulsoup4)
> > + ("bleach" ,python-bleach)
> > + ("bottleneck" ,python-bottleneck)
> > + ("cfitsio" ,cfitsio)
> > + ("dask" ,python-dask)
> > + ("expat" ,expat)
> > + ("graphviz" ,graphviz)
> > + ("h5py" ,python-h5py)
> > + ("html5lib" ,python-html5lib)
> > + ("jplephem" ,python-jplephem)
> > + ("matplotlib" ,python-matplotlib)
> > + ("mpmath" ,python-mpmath)
> > + ("numpy" ,python-numpy)
> > + ("pandas" ,python-pandas)
> > + ("pyerfa" ,python-pyerfa)
> > + ("pytz" ,python-pytz)
> > + ("pyyaml" ,python-pyyaml)
> > + ("scipy" ,python-scipy)
> > + ("sortedcontainers" ,python-sortedcontainers)
> > + ("wcslib" ,wcslib)))
>
> AstroPy is a library, its Python inputs should be propagated here.
> See https://guix.gnu.org/manual/en/html_node/package-Reference.html#package-Reference
> for reference.
>
> Also, the documentation states that the only strict requirements are
> PyERFA and NumPy:
>
> https://docs.astropy.org/en/stable/install.html
>
> IMO we should only propagate these, and leave the rest in native-inputs
> as needed by tests.
>
> Now speaking of the astropy dependencies, pytest-astropy is supposed to
> propagate its six dependencies. AFAIK its purpose is to be a
> metapackage to install these other 6 pytest modules. PyERFA should also
> propagate numpy (liberfa can remain as normal input).
>
> I'll take a look at this package again next week. Could you test these
> suggestions in the meantime?
>
> Vinicius
>
>


--

… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
V
V
Vinicius Monego wrote on 23 May 2021 19:54
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 48046@debbugs.gnu.org)
7055d87cdde449415e62f0b0c15d96deb378af67.camel@posteo.net
Hi Sharlatan,

Thanks for continuing the work on the astropy package, I managed to
finish it this time. I am resending your patch with the following
modifications:

- Moved the package definition from the bottom to the middle of the
file (to avoid merge conflicts)
- Removed all optional inputs and propagated the remaining. I left only
those listed in install_requires, setup_requires, test_requires and
test[extras] in setup.cfg
- Changed synopsis and description
- Changed package labels to match the package name
- Made the compiler file writable instead of deleting it
- Deleted the makdir-astropy phase (it wasn't needed)
- Added license for the jquery bundle that is not replaced

and then I made my own improvements on that patch: enabling tests and
unbundling some external libraries.

I removed the optional packages because astropy is a core package,
which will be a dependency for its many extensions. It's important that
it builds with a high probability of success or the chain will break.
Some of its optional dependencies, e.g. Pandas, have a broken build in
aarch64 at the moment. The "full" astropy package could be installed
easily from a manifest file and the tests can run again with
astropy.test().

Toggle quote (3 lines)
> the project heavily depends on TOX which requires pip to install
> missing dependencies for itself.

I don't think that a project can heavily depend on tox, all it does is
manage a virtual environment with dependencies to run the tests. Guix
does the same so tox is redundant here. Tests will still run with the
testing framework.

Two more suggestions for future Python patches:

Toggle quote (5 lines)
> + (replace 'check
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (add-installed-pythonpath inputs outputs)
> + (invoke "pytest" "-vv")))

When a project contains tests as part of the application code, as in
Astropy, tests should run with "pytest --pyargs module". See Pytest
Integration Pratices:

It's also good practice in Guix to use (when tests?) when overriding
the check phase to allow --without-tests=pkg.
Toggle quote (4 lines)
> ImportError: You appear to be trying to import astropy from within a
> source checkout or from an editable installation without building the
> extension modules first. Either run:

I fixed this error by running the second command before the tests.

If you don't mind the modifications I did, I will call this patchset
complete and wait for a committer to review.

Vinicius
From d7245f0852a1a2f39bdba277b4287e2a753955a6 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Mon, 26 Apr 2021 20:52:09 +0100
Subject: [PATCH 1/6] gnu: Add python-astropy.

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

Toggle diff (61 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 6d1c4ddfe6..b32f3f7cf5 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -547,6 +547,54 @@ 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.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "astropy" version))
+ (sha256
+ (base32 "09w4q64c6bykcdp8xdq5fgsdjqrcihqhqjszqjp3s5a1493kwj7d"))))
+ (build-system python-build-system)
+ (arguments
+ ;; NOTE: (Sharlatan-20210426T204315+0100): Tests require build astropy
+ ;; module, it needs a good review on how to enable them.
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'setenv-astropy-system-all
+ (lambda _
+ (setenv "ASTROPY_USE_SYSTEM_ALL" "1")))
+ ;; Permission denied: './astropy/_compiler.c'.
+ (add-before 'install 'writable-compiler
+ (lambda _ (make-file-writable "astropy/_compiler.c"))))))
+ (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-objgraph" ,python-objgraph)
+ ("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-sgp4" ,python-sgp4)
+ ("python-skyfield" ,python-skyfield)))
+ (inputs
+ `(("cfitsio" ,cfitsio)
+ ("wcslib" ,wcslib)))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)
+ ("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 (list license:bsd-3 ;astropy
+ license:expat)))) ;jquery
+
(define-public libnova
(package
(name "libnova")
--
2.31.1
From 7a119c602124c24555aacd0a39d634127e7b65d0 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Sat, 22 May 2021 14:49:54 -0300
Subject: [PATCH 2/6] gnu: python-pytest-astropy: Propagate inputs.

* 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 ...
[propagated-inputs]: ... here.
---
gnu/packages/python-check.scm | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index f0b454eec9..b75d0fb155 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -286,12 +286,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)
@@ -299,8 +307,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")
--
2.31.1
From 256038d0d9eae6509d96bd370404f30a723715f0 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Sat, 22 May 2021 14:58:15 -0300
Subject: [PATCH 3/6] gnu: python-pyerfa: Adjust inputs.

* gnu/packages/astronomy.scm (python-pyerfa)[inputs]: Move python-numpy to ...
[propagated-inputs]: ... here.
---
gnu/packages/astronomy.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index b32f3f7cf5..4c5c86a3dc 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -992,8 +992,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
--
2.31.1
From fda2610f09b0849645d17b906ade3c8fdc493cb5 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Sat, 22 May 2021 15:14:59 -0300
Subject: [PATCH 4/6] gnu: Add wcslib-7.3.

* gnu/packages/astronomy.scm (wcslib-7.3): New variable.
---
gnu/packages/astronomy.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 4c5c86a3dc..6e0fdeb969 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -205,6 +205,20 @@ coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image
header.")
(license license:lgpl3+)))
+(define-public wcslib-7.3
+ (package
+ (inherit wcslib)
+ (name "wcslib")
+ (version "7.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version
+ ".tar.bz2"))
+ (sha256
+ (base32 "0q99k61l2zh6irzkd5195aama37mlm0nivamz6j6r8l2ad1cy0ab"))))))
+
(define-public weightwatcher
(package
(name "weightwatcher")
--
2.31.1
From d226f4d8560d78da88ae9ebfdc48abf443b572e0 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Sat, 22 May 2021 17:13:35 -0300
Subject: [PATCH 5/6] gnu: python-astropy: Enable tests.

* gnu/packages/astronomy.scm (python-astropy)[arguments]: Enable tests.
[phases]{setenv-astropy-system-all}: Move to after 'unpack. Rename to
'preparations'. Set HOME to /tmp. Allow xfail tests to pass.
{writable-compiler}: New phase.
{check}: Override phase.
[native-inputs]: Add python-pytest, python-pytest-astropy, python-pytest-xdist.
[inputs]: Remove wcslib. Add wcslib-7.3.
---
gnu/packages/astronomy.scm | 37 ++++++++++++++++++++++++++++---------
1 file changed, 28 insertions(+), 9 deletions(-)

Toggle diff (65 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 6e0fdeb969..d9785696bb 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -573,17 +573,31 @@ accurately in real time at any rate desired.")
(base32 "09w4q64c6bykcdp8xdq5fgsdjqrcihqhqjszqjp3s5a1493kwj7d"))))
(build-system python-build-system)
(arguments
- ;; NOTE: (Sharlatan-20210426T204315+0100): Tests require build astropy
- ;; module, it needs a good review on how to enable them.
- `(#:tests? #f
- #:phases
+ `(#:phases
(modify-phases %standard-phases
- (add-before 'build 'setenv-astropy-system-all
+ (add-after 'unpack 'preparations
(lambda _
- (setenv "ASTROPY_USE_SYSTEM_ALL" "1")))
- ;; Permission denied: './astropy/_compiler.c'.
+ ;; Use our own libraries in place of bundles.
+ (setenv "ASTROPY_USE_SYSTEM_ALL" "1")
+ ;; Some tests require a writable home.
+ (setenv "HOME" "/tmp")
+ ;; Relax xfail tests.
+ (substitute* "setup.cfg"
+ (("xfail_strict = true") "xfail_strict = false"))))
+ ;; This file is opened in both install and check phases.
(add-before 'install 'writable-compiler
- (lambda _ (make-file-writable "astropy/_compiler.c"))))))
+ (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)
@@ -591,12 +605,17 @@ accurately in real time at any rate desired.")
("python-extension-helpers" ,python-extension-helpers)
("python-ipython" ,python-ipython)
("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)
- ("wcslib" ,wcslib)))
+ ;; Astropy 4.2.1 bundles wcslib 7.3 and that is the only version it
+ ;; accepts. Version 7.5 will not be validated in the build.
+ ("wcslib" ,wcslib-7.3)))
(propagated-inputs
`(("python-numpy" ,python-numpy)
("python-pyerfa" ,python-pyerfa)))
--
2.31.1
From be70ce67532c8b5c14bebdf3a4c0ce483bc86530 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Sat, 22 May 2021 15:09:37 -0300
Subject: [PATCH 6/6] gnu: python-astropy: Unbundle ply and configobj.

* gnu/packages/astronomy.scm (python-astropy)[arguments]: Replace references
to external ply and configobj and delete the bundles.
[propagated-inputs]: Add python-ply, python-configobj.
---
gnu/packages/astronomy.scm | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index d9785696bb..17617eef9b 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -583,7 +583,25 @@ accurately in real time at any rate desired.")
(setenv "HOME" "/tmp")
;; Relax xfail tests.
(substitute* "setup.cfg"
- (("xfail_strict = true") "xfail_strict = false"))))
+ (("xfail_strict = true") "xfail_strict = false"))
+ ;; Delete ply and configobj because we have them. They are not
+ ;; covered by ASTROPY_USE_SYSTEM_ALL.
+ (with-directory-excursion "astropy/extern"
+ (for-each delete-file-recursively '("ply" "configobj")))
+ ;; Replace all references to external ply.
+ (let ((ply-files '("coordinates/angle_utilities.py"
+ "units/format/cds.py"
+ "units/format/ogip.py"
+ "units/format/generic.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")))
@@ -617,7 +635,9 @@ accurately in real time at any rate desired.")
;; accepts. Version 7.5 will not be validated in the build.
("wcslib" ,wcslib-7.3)))
(propagated-inputs
- `(("python-numpy" ,python-numpy)
+ `(("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")
--
2.31.1
S
S
Sharlatan Hellseher wrote on 23 May 2021 22:01
(name . Vinicius Monego)(address . monego@posteo.net)(address . 48046@debbugs.gnu.org)
CAO+9K5oMqiq5JUtyhNhBvBUDs5bmfguRrcT4cWOkNz4wGLgYrw@mail.gmail.com
Hi Vinicius,

It' fantastic! Thanks for your feedback and modification, I'm
absolutely ok with them.

When astropy is accepted it will open a way for other astronomical
packages which are depend on it,
and I've noticed some other packages in master require astropy for
tests so it would beneficial to have it merged :)!

On Sun, 23 May 2021 at 17:54, Vinicius Monego <monego@posteo.net> wrote:
Toggle quote (65 lines)
>
> Hi Sharlatan,
>
> Thanks for continuing the work on the astropy package, I managed to
> finish it this time. I am resending your patch with the following
> modifications:
>
> - Moved the package definition from the bottom to the middle of the
> file (to avoid merge conflicts)
> - Removed all optional inputs and propagated the remaining. I left only
> those listed in install_requires, setup_requires, test_requires and
> test[extras] in setup.cfg
> - Changed synopsis and description
> - Changed package labels to match the package name
> - Made the compiler file writable instead of deleting it
> - Deleted the makdir-astropy phase (it wasn't needed)
> - Added license for the jquery bundle that is not replaced
>
> and then I made my own improvements on that patch: enabling tests and
> unbundling some external libraries.
>
> I removed the optional packages because astropy is a core package,
> which will be a dependency for its many extensions. It's important that
> it builds with a high probability of success or the chain will break.
> Some of its optional dependencies, e.g. Pandas, have a broken build in
> aarch64 at the moment. The "full" astropy package could be installed
> easily from a manifest file and the tests can run again with
> astropy.test().
>
> > the project heavily depends on TOX which requires pip to install
> > missing dependencies for itself.
>
> I don't think that a project can heavily depend on tox, all it does is
> manage a virtual environment with dependencies to run the tests. Guix
> does the same so tox is redundant here. Tests will still run with the
> testing framework.
>
> Two more suggestions for future Python patches:
>
> > + (replace 'check
> > + (lambda* (#:key inputs outputs #:allow-other-keys)
> > + (add-installed-pythonpath inputs outputs)
> > + (invoke "pytest" "-vv")))
>
> When a project contains tests as part of the application code, as in
> Astropy, tests should run with "pytest --pyargs module". See Pytest
> Integration Pratices:
> https://docs.pytest.org/en/documentation-restructure/background/goodpractices.html
>
> It's also good practice in Guix to use (when tests?) when overriding
> the check phase to allow --without-tests=pkg.
>
> > ImportError: You appear to be trying to import astropy from within a
> > source checkout or from an editable installation without building the
> > extension modules first. Either run:
>
> I fixed this error by running the second command before the tests.
>
> If you don't mind the modifications I did, I will call this patchset
> complete and wait for a committer to review.
>
> Vinicius



--

… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
S
S
Sharlatan Hellseher wrote on 29 Oct 2021 23:35
(address . 48046@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
CAO+9K5rVkjj0rv7_FSbdR7aTcwuUG8m4FeHFY6jqNUmN9ZmAzQ@mail.gmail.com
Hi Guix team!

Is this set of patches still in review or just dromaint :)?

Regards

On Sun, 23 May 2021 at 21:01, Sharlatan Hellseher <sharlatanus@gmail.com> wrote:
Toggle quote (85 lines)
>
> Hi Vinicius,
>
> It' fantastic! Thanks for your feedback and modification, I'm
> absolutely ok with them.
>
> When astropy is accepted it will open a way for other astronomical
> packages which are depend on it,
> and I've noticed some other packages in master require astropy for
> tests so it would beneficial to have it merged :)!
>
> On Sun, 23 May 2021 at 17:54, Vinicius Monego <monego@posteo.net> wrote:
> >
> > Hi Sharlatan,
> >
> > Thanks for continuing the work on the astropy package, I managed to
> > finish it this time. I am resending your patch with the following
> > modifications:
> >
> > - Moved the package definition from the bottom to the middle of the
> > file (to avoid merge conflicts)
> > - Removed all optional inputs and propagated the remaining. I left only
> > those listed in install_requires, setup_requires, test_requires and
> > test[extras] in setup.cfg
> > - Changed synopsis and description
> > - Changed package labels to match the package name
> > - Made the compiler file writable instead of deleting it
> > - Deleted the makdir-astropy phase (it wasn't needed)
> > - Added license for the jquery bundle that is not replaced
> >
> > and then I made my own improvements on that patch: enabling tests and
> > unbundling some external libraries.
> >
> > I removed the optional packages because astropy is a core package,
> > which will be a dependency for its many extensions. It's important that
> > it builds with a high probability of success or the chain will break.
> > Some of its optional dependencies, e.g. Pandas, have a broken build in
> > aarch64 at the moment. The "full" astropy package could be installed
> > easily from a manifest file and the tests can run again with
> > astropy.test().
> >
> > > the project heavily depends on TOX which requires pip to install
> > > missing dependencies for itself.
> >
> > I don't think that a project can heavily depend on tox, all it does is
> > manage a virtual environment with dependencies to run the tests. Guix
> > does the same so tox is redundant here. Tests will still run with the
> > testing framework.
> >
> > Two more suggestions for future Python patches:
> >
> > > + (replace 'check
> > > + (lambda* (#:key inputs outputs #:allow-other-keys)
> > > + (add-installed-pythonpath inputs outputs)
> > > + (invoke "pytest" "-vv")))
> >
> > When a project contains tests as part of the application code, as in
> > Astropy, tests should run with "pytest --pyargs module". See Pytest
> > Integration Pratices:
> > https://docs.pytest.org/en/documentation-restructure/background/goodpractices.html
> >
> > It's also good practice in Guix to use (when tests?) when overriding
> > the check phase to allow --without-tests=pkg.
> >
> > > ImportError: You appear to be trying to import astropy from within a
> > > source checkout or from an editable installation without building the
> > > extension modules first. Either run:
> >
> > I fixed this error by running the second command before the tests.
> >
> > If you don't mind the modifications I did, I will call this patchset
> > complete and wait for a committer to review.
> >
> > Vinicius
>
>
>
> --
>
> … ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
> ????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
> ?????????? ?? ? ????????? ??????? ????? ? ?????????????????.



--

… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
V
V
Vinicius Monego wrote on 30 Oct 2021 00:58
ae363920f2ae9f24501d2218f702a434e8c7ca25.camel@posteo.net
Hi Sharlatan,

I was looking at this series once again and there are some fixes I will
have to do in a resubmission.

The main problem right now is that astropy is tied to a specific wcs
version that it bundles. The code can't compile with the 7.5 version in
Guix. Astropy 4.2 comes with wcs 7.3 and 4.3 comes with wcs 7.6. I
tried to update wcs in guix to 7.6 but tests failed in this version.
Not sure what is the best approach in this, packaging a separate wcs at
7.3 and keep astropy at 4.2.1, or use the bundle.

Anyway, I'll submit this series again later.

Vinicius

Em sex, 2021-10-29 às 22:35 +0100, Sharlatan Hellseher escreveu:
Toggle quote (115 lines)
> Hi Guix team!
>
> Is this set of patches still in review or just dromaint :)?
>
> Regards
>
> On Sun, 23 May 2021 at 21:01, Sharlatan Hellseher
> <sharlatanus@gmail.com> wrote:
> >
> > Hi Vinicius,
> >
> > It' fantastic! Thanks for your feedback and modification, I'm
> > absolutely ok with them.
> >
> > When astropy is accepted it will open a way for other astronomical
> > packages which are depend on it,
> > and I've noticed some other packages in master require astropy for
> > tests so it would beneficial to have it merged :)!
> >
> > On Sun, 23 May 2021 at 17:54, Vinicius Monego <monego@posteo.net>
> > wrote:
> > >
> > > Hi Sharlatan,
> > >
> > > Thanks for continuing the work on the astropy package, I managed
> > > to
> > > finish it this time. I am resending your patch with the following
> > > modifications:
> > >
> > > - Moved the package definition from the bottom to the middle of
> > > the
> > > file (to avoid merge conflicts)
> > > - Removed all optional inputs and propagated the remaining. I
> > > left only
> > > those listed in install_requires, setup_requires, test_requires
> > > and
> > > test[extras] in setup.cfg
> > > - Changed synopsis and description
> > > - Changed package labels to match the package name
> > > - Made the compiler file writable instead of deleting it
> > > - Deleted the makdir-astropy phase (it wasn't needed)
> > > - Added license for the jquery bundle that is not replaced
> > >
> > > and then I made my own improvements on that patch: enabling tests
> > > and
> > > unbundling some external libraries.
> > >
> > > I removed the optional packages because astropy is a core
> > > package,
> > > which will be a dependency for its many extensions. It's
> > > important that
> > > it builds with a high probability of success or the chain will
> > > break.
> > > Some of its optional dependencies, e.g. Pandas, have a broken
> > > build in
> > > aarch64 at the moment. The "full" astropy package could be
> > > installed
> > > easily from a manifest file and the tests can run again with
> > > astropy.test().
> > >
> > > > the project heavily depends on TOX which requires pip to
> > > > install
> > > > missing dependencies for itself.
> > >
> > > I don't think that a project can heavily depend on tox, all it
> > > does is
> > > manage a virtual environment with dependencies to run the tests.
> > > Guix
> > > does the same so tox is redundant here. Tests will still run with
> > > the
> > > testing framework.
> > >
> > > Two more suggestions for future Python patches:
> > >
> > > > +         (replace 'check
> > > > +           (lambda* (#:key inputs outputs #:allow-other-keys)
> > > > +             (add-installed-pythonpath inputs outputs)
> > > > +             (invoke "pytest" "-vv")))
> > >
> > > When a project contains tests as part of the application code, as
> > > in
> > > Astropy, tests should run with "pytest --pyargs module". See
> > > Pytest
> > > Integration Pratices:
> > > https://docs.pytest.org/en/documentation-restructure/background/goodpractices.html
> > >
> > > It's also good practice in Guix to use (when tests?) when
> > > overriding
> > > the check phase to allow --without-tests=pkg.
> > >
> > > > ImportError: You appear to be trying to import astropy from
> > > > within a
> > > > source checkout or from an editable installation without
> > > > building the
> > > > extension modules first. Either run:
> > >
> > > I fixed this error by running the second command before the
> > > tests.
> > >
> > > If you don't mind the modifications I did, I will call this
> > > patchset
> > > complete and wait for a committer to review.
> > >
> > > Vinicius
> >
> >
> >
> > --
> >
> > … ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
> > ????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
> > ?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
>
>
>
V
V
Vinicius Monego wrote on 30 Oct 2021 04:51
[PATCH v2 0/3] Add Astropy.
(address . 48046@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211030025133.23186-1-monego@posteo.net
Changes in this series:

Merged astropy patches into one and added myself as co-author.
Moved unbundling code from phase to snippet.
Updated astropy to 4.3.1.
Added python-jplephem to native-inputs in astropy.
Removed wcs patch and used the wcs bundle from astropy.

Sharlatan Hellseher (1):
gnu: Add python-astropy.

Vinicius Monego (2):
gnu: python-pytest-astropy: Adjust inputs.
gnu: python-pyerfa: Adjust inputs.

gnu/packages/astronomy.scm | 101 +++++++++++++++++++++++++++++++++-
gnu/packages/python-check.scm | 17 ++++--
2 files changed, 111 insertions(+), 7 deletions(-)


base-commit: e1261ddd38cf02a0f046f3a5360502d659b4e7d4
--
2.30.2
V
V
Vinicius Monego wrote on 30 Oct 2021 04:51
[PATCH v2 1/3] gnu: python-pytest-astropy: Adjust inputs.
(address . 48046@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211030025133.23186-2-monego@posteo.net
* 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(-)

Toggle diff (40 lines)
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")
--
2.30.2
V
V
Vinicius Monego wrote on 30 Oct 2021 04:51
[PATCH v2 3/3] gnu: Add python-astropy.
(address . 48046@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
20211030025133.23186-4-monego@posteo.net
From: Sharlatan Hellseher <sharlatanus@gmail.com>

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(+)

Toggle diff (115 lines)
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")
--
2.30.2
V
V
Vinicius Monego wrote on 30 Oct 2021 04:51
[PATCH v2 2/3] gnu: python-pyerfa: Adjust inputs.
(address . 48046@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211030025133.23186-3-monego@posteo.net
* 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(-)

Toggle diff (26 lines)
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 <vkor@vkten.in>
;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
;;;
;;; 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
--
2.30.2
E
E
Efraim Flashner wrote on 8 Nov 2021 09:06
Re: [bug#48046] [PATCH v2 0/3] Add Astropy.
(address . 48046-done@debbugs.gnu.org)
YYjag7J5+cLVpeln@3900XT
Thanks for finishing this up. Patches pushed.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmGI2oMACgkQQarn3Mo9
g1Eo/A/8DLB8Deu+UDomAXAuWnzKPV+j9MtKHfjpQ8qZdKP5o1thpYgoC6He4uwE
6y3nJbXWPvhhHgVKpaAW9IlV/Uh3uDzV28jT8IkNPVDsVWVDj1nnZk0Qz2clnRr/
A7lcJZG+FgmkCO0WqVm5AU3utPOIUeuyRCZHPeZ9zXZRE0fu226YsytYNCOSspfl
kx7TArFUysbX/3nF2s3l3M5o/XHIgRyT6Gbyn18+XGkS9cuF+o5lHATNoVsSUchY
SX+lkRgzRGCJrZCPWgqkJhNlhicV0Uu1ucZJkJ/MrJIMdfb5jPkjKd40sPpK/0EM
7x8k7ryMh3WhHbs7G2X+jE5cb4SnlTWr6emA7oAKI4k5/aGtPmsx8KPKhcqsses7
Ebkv5nZcD8c8+IAu6sWl1romnw5wacHcWmHq/fvGV3oG37S5m5vosVQuZSlzXBdb
k1Cn+kfF9+f7FcHCo+QxK6YMPrznuaMknG6j/ZBww4b44e3qWHQYE0mRtQMSAd7Q
0rBTOWr9KFt8ebFGfnV6tJHEeg+G/9xyX2yGWHLYM8brCMRQYlsFFjw1tDsNeqcv
88kh9cPukY5joOszZrXLw78OBH/Yf8r3o2O5Zep8HB78ChI6tLYuHeNAD9x/+LRf
Qv/NLtXtrrdJwYuGnA4A8QtOW4AxVyW0LXTOOciZRwX8A15h0gU=
=dSVu
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 48046
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