unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: Sharlatan Hellseher <sharlatanus@gmail.com>
Cc: 48046@debbugs.gnu.org
Subject: [bug#48046] [PATCH]: Gnu add astropy
Date: Wed, 19 May 2021 18:16:41 +0000	[thread overview]
Message-ID: <a2c650067b52001a3b205cbc1b3999eb99ea4d92.camel@posteo.net> (raw)
In-Reply-To: <CAO+9K5r_T32NoHCX08=KfrmVX4Rrm890jwJFm_VdcpFWphU_2g@mail.gmail.com>

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
 





  reply	other threads:[~2021-05-19 18:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 20:01 [bug#48046] [PATCH]: Gnu add astropy Sharlatan Hellseher
2021-05-19 18:16 ` Vinicius Monego [this message]
2021-05-22 20:00   ` Sharlatan Hellseher
2021-05-23 17:54     ` Vinicius Monego
2021-05-23 20:01       ` Sharlatan Hellseher
2021-10-29 21:35         ` Sharlatan Hellseher
2021-10-29 22:58           ` Vinicius Monego
2021-10-30  2:51 ` [bug#48046] [PATCH v2 0/3] Add Astropy Vinicius Monego
2021-10-30  2:51   ` [bug#48046] [PATCH v2 1/3] gnu: python-pytest-astropy: Adjust inputs Vinicius Monego
2021-10-30  2:51   ` [bug#48046] [PATCH v2 2/3] gnu: python-pyerfa: " Vinicius Monego
2021-10-30  2:51   ` [bug#48046] [PATCH v2 3/3] gnu: Add python-astropy Vinicius Monego
2021-11-08  8:06   ` bug#48046: [PATCH v2 0/3] Add Astropy Efraim Flashner

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=a2c650067b52001a3b205cbc1b3999eb99ea4d92.camel@posteo.net \
    --to=monego@posteo.net \
    --cc=48046@debbugs.gnu.org \
    --cc=sharlatanus@gmail.com \
    /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).