Closed astrofrog closed 5 years ago
hmmmm, the advantage of doing it here is it get's the package name from the cookiecutter rather than whatever ah_bootstrap says?
Either you are using pip, in which case you will never run into this issue anyway since pip won't even download packages where the python_requires is not compatible, or you are installing the package locally, in which case you know what the package is. So I don't really see the value in having the package name in the error? (also we can easily get that from setup.cfg
in ah_bootstrap.py
if you really want).
@astrofrog that does make sense. However, just to be difficult, the case where this would actually appear is when someone is running an older version in Python, in which case it's likely that they have an older version of pip
that doesn't actually check for python_requires
(which is only supported fairly recently, iirc).
But either way I'm not going to hold it up since it makes good sense for long-term maintenance.
@drdavella - won't pip say which package failed to install though? In any case I still prefer the option of including the package name in the ah_bootstrap.py
error if we really want.
@astrofrog I am on board if ah_bootstrap
reads setup.cfg
, I just don't want the sunpy setup.py thing to say "astropy"...
Currently it would say "astropy-helpers". So I agree with reading from setup.cfg
.
Ok I'll work on improving the error message in ah_bootstrap.py
@Cadair @drdavella - what about https://github.com/astropy/astropy-helpers/pull/441
I think we might have to include this only once we drop Python 2 (which could be shortly, see #385)
Last year we added a Python version check at the top of
setup.py
to address https://github.com/astropy/astropy/issues/7306. However, since then this has also been added to the top ofah_bootstrap.py
. Sinceah_bootstrap
is imported immediately after the check, we can therefore remove the check insetup.py
.(this is part of a series of PRs to simplify setup.py)
Companion to https://github.com/astropy/astropy/pull/8344