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

Charles R Harris charlesr.harris at gmail.com
Sun Nov 1 19:12:33 EST 2015


On Sun, Nov 1, 2015 at 4:16 PM, Ralf Gommers <ralf.gommers at gmail.com> wrote:

>
>
> On Sun, Nov 1, 2015 at 1:59 AM, Ralf Gommers <ralf.gommers at gmail.com>
> wrote:
>
>>
>>
>> On Sun, Nov 1, 2015 at 1:54 AM, Ralf Gommers <ralf.gommers at gmail.com>
>> wrote:
>>
>>>
>>>
>>>
>>> On Thu, Oct 29, 2015 at 8:11 PM, Warren Weckesser <
>>> warren.weckesser at gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Oct 27, 2015 at 12:31 AM, Nathaniel Smith <njs at pobox.com>
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Apparently it is not well known that if you have a Python project
>>>>> source tree (e.g., a numpy checkout), then the correct way to install
>>>>> it is NOT to type
>>>>>
>>>>>   python setup.py install   # bad and broken!
>>>>>
>>>>> but rather to type
>>>>>
>>>>>   pip install .
>>>>>
>>>>>
>>>>
>>>> FWIW, I don't see any mention of this in the numpy docs, but I do see a
>>>> lot of instructions involving `setup.py build` and `setup.py install`.
>>>> See, for example, INSTALL.txt.  Also see
>>>>
>>>> http://docs.scipy.org/doc/numpy/user/install.html#building-from-source
>>>> So I guess it is not surprising that it is not well known.
>>>>
>>>
>>> Indeed, install docs are always hopelessly outdated. And we have too
>>> many of them. There's duplicate info in INSTALL.txt and
>>> http://scipy.org/scipylib/building/index.html for example. We should
>>> probably just empty out INSTALL.txt and simply put a link in it to the html
>>> docs.
>>>
>>> I've created an issue with a long todo list and a bunch of links:
>>> https://github.com/numpy/numpy/issues/6599. Feel free to add stuff. Or
>>> to go fix something:)
>>>
>>
>> Oh, and: looking at this thread there haven't been serious unanswered
>> concerns (at least in my perception), so without more discussion I'd
>> interpret the current status as "go ahead".
>>
>
> Hmm, after some more testing I'm going to have to bring up a few concerns
> myself:
>
> 1. ``pip install .`` still has a clear bug; it starts by copying
> everything (including .git/ !) to a tempdir with shutil, which is very
> slow. And the fix for that will go via ``setup.py sdist``, which is still
> slow.
>
> 2. ``pip install .`` silences build output, which may make sense for some
> usecases, but for numpy it just sits there for minutes with no output after
> printing "Running setup.py install for numpy". Users will think it hangs
> and Ctrl-C it. https://github.com/pypa/pip/issues/2732
>
> 3. ``pip install .`` refuses to upgrade an already installed development
> version. For released versions that makes sense, but if I'm in a git tree
> then I don't want it to refuse because 1.11.0.dev0+githash1 compares equal
> to 1.11.0.dev0+githash2. Especially after waiting a few minutes, see (1).
>
>
> I've sent a (incomplete) fix for the shutil thing (
> https://github.com/pypa/pip/pull/3219) and will comment on some open
> issues on the pip tracker. But I'm thinking that for now we should go with
> some printed message first. Something like "please use ``pip install .`` if
> you want reliable uninstall behavior. See <somelink> for more details".
>
> Pip has worked quite well for me in the past, but the above makes me thing
> it's not much of an improvement over use of setuptools.....
>

Which version of pip?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151101/fa17e665/attachment.html>


More information about the NumPy-Discussion mailing list