[Numpy-discussion] Proposal: stop supporting 'setup.py install'; start requiring 'pip install .' instead

Ralf Gommers ralf.gommers at gmail.com
Tue Oct 27 03:19:04 EDT 2015


On Tue, Oct 27, 2015 at 6:44 AM, Nathaniel Smith <njs at pobox.com> wrote:

> On Mon, Oct 26, 2015 at 9:31 PM, Nathaniel Smith <njs at pobox.com> wrote:
> [...]
> > I believe that this would also break both 'easy_install numpy', and
> > attempts to install numpy via the setup_requires= argument to
> > setuptools.setup (because setup_requires= implicitly calls
> > easy_install). install_requires= would *not* be affected, and
> > setup_requires= would still be fine in cases where numpy was already
> > installed.
>
> On further investigation, it looks like the simplest approach to doing
> this would actually treat easy_install and setup_requires= the same
> way as they treat pip, i.e., they would all be allowed. (I was
> misreading some particularly confusing code in setuptools.)
>
> It also looks like easy_installed packages can at least be safely
> upgraded, so I guess allowing this is okay :-).


I just discovered https://bitbucket.org/dholth/setup-requires, which
ensures that setup_requires uses pip instead of easy_install. So we can not
only keep setup-requires working, but make it work significantly better.

So if/when we accept the proposal in this thread, I'm thinking we should
make a bunch of changes at once:
- always use setuptools (this is a new dependency)
- error on ``python setup.py install``
- add the setup-requires trick
- error on ``python setup.py clean`` (saying "use `git clean -xdf` (or -Xdf
...) instead")
- change ``python setup.py --help`` to first show numpy-specific stuff
before setuptools help info
- update all our install docs

And when "pip upgrade" is released (should be soon, see
https://github.com/pypa/pip/pull/3194), officially change our mind and
recommend the use of install_requires/setup_requires to packages depending
on numpy.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151027/89df9598/attachment.html>


More information about the NumPy-Discussion mailing list