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

Ralf Gommers ralf.gommers at gmail.com
Tue Oct 27 19:02:26 EDT 2015


On Tue, Oct 27, 2015 at 11:35 PM, Juan Nunez-Iglesias <jni.soma at gmail.com>
wrote:

> Can someone here who understands more about distribution maybe write a
> blog post detailing:
>
> - why these setup.py commands are bad
> - which alternative corresponds to each command and why it's better
> - where to find information about this
>

Good question. Not that I have a blog, but I can try to write something a
bit longer the coming weekend.


>
> For example, I had never heard of "twine", and parenthetical statements
> such as "setup.py upload (which is broken and should never be used)" are
> useless to those who don't know this and useless to those who do.
>

IIRC `setup.py upload` sends passwords over plain http. I've also seen it
do weird things like change one's own PyPi rights from maintainer to owner.

The most comprehensive overview of all this stuff is
https://packaging.python.org/en/latest/, which starts with tool
recommendations. Twine is one of the first things mentioned.

Ralf



> I understand that this is an "internal" discussion, but it's nice if those
> following to learn can get quick pointers. Since there is a *ton* of
> material online telling us *to use* python setup.py install, all the time,
> it would be extremely helpful for the community if discussions such as this
> one helped to bubble up the Right Way of doing Python packaging and
> distribution.
>
> Thanks,
>
> Juan.
>
>
>
>
>
> On Wed, Oct 28, 2015 at 9:16 AM, Ralf Gommers <ralf.gommers at gmail.com>
> wrote:
>
>>
>>
>> On Tue, Oct 27, 2015 at 8:19 AM, Ralf Gommers <ralf.gommers at gmail.com>
>> wrote:
>>
>> Updating this list for comments made after I sent it and now that I've
>> looked in more detail at what the less common commands do:
>>
>>
>>> 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``
>>>
>>
>> (removed the item about setup_requires, relevant for scipy but not numpy)
>>
>>
>>> - 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
>>>
>>
>> - error on ``python setup.py upload`` (saying "use `twine upload -s`
>> instead")
>> - error on ``python setup.py upload_docs``
>> - error on ``python setup.py easy_install`` (I'm not joking, that exists)
>> - error on ``python setup.py test`` (saying "use `python runtests.py`
>> instead")
>> - remove setupegg.py
>>
>> Ralf
>>
>> 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.
>>>
>>>
>>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151028/66b929b0/attachment.html>


More information about the NumPy-Discussion mailing list