[openstack-dev] On the usage of pip vs. setup.py install

Monty Taylor mordred at inaugust.com
Tue Sep 24 16:20:25 UTC 2013



On 09/24/2013 12:11 PM, Thomas Goirand wrote:
> Hi Monty,
> 
> On 09/24/2013 09:44 AM, Monty Taylor wrote:
>> Instead of:
>>
>> "python setup.py install"
>>
>> Run:
>>
>> "pip install ."
> 
> No way that this happens on the packaging side. Buildd have no network
> access (on purpose), and we must not do any network access when building.
>
> So I wonder what this post is trying to achieve.

This post has nothing to do with packaging. The OpenStack project does
not produce packages.

This is informational for people who are already running setup.py
install, suggesting that they use pip install . instead.

If, however, you are in a packaging situation and you are running
setup.py install as part of your packaging scripts such as in your
debian/rules file or your rpm spec file, continuing to use setup.py
install should have no negative effects, as all of the requirements
processing should be avoided due to the system packaging having taken
care of it already, so the evil that is easy_install will not be invoked.

Further, all debian/rules and rpm spec files that are packaging
openstack project should really add the SKIP_PIP_INSTALL env var. This
will turn off the additional pip operations that pbr does - which are
again pointless in a distro-packaging world.

> On 09/24/2013 09:44 AM, Monty Taylor wrote:
>> It is common practice in python to run:
>>
>> python setup.py install
>> or
>> python setup.py develop
>>
>> So much so that we spend a giant amount of effort to make sure that
>> those always work.
> 
> Please continue to spend "a giant amount of effort" to make sure that
> python setup.py install works (I won't care about develop), as this is
> what is being used by debhelper by default.

It will.

> On 09/24/2013 09:44 AM, Monty Taylor wrote:
>> It should have the exact same result, but pip can succeed in some
>> places where setup.py install directly can fail.
> 
> If "setup.py install" fails, this is a bug and it shall be fixed. :)

Not to beat a dead horse - but the things I am talking about here have
to do with dependency resolution, not with actual installation.

Monty



More information about the OpenStack-dev mailing list