[openstack-dev] "python setup clean" should never call "pip install"

Monty Taylor mordred at inaugust.com
Sun Jun 16 18:57:52 UTC 2013



On 06/15/2013 09:29 PM, Monty Taylor wrote:
> 
> 
> On 06/14/2013 03:28 PM, Thomas Goirand wrote:
>> Hi everyone!
>>
>> It'd be nice if "python setup clean" was never doing some pip install.
>> Because if it does, then this breaks my cowbuilder (eg: the tool which I
>> use in Jenkins to build my Debian packages in a minimal, clean, chroot).
>> Here is a good example of a bad thing that can happen:
>> https://debian.pkgs.enovance.com/job/python-keystoneclient/12/console
>>
>> What happens is that, before downloading the build-dependencies,
>> git-buildpackage calls clean (that's the way it works), it then calls
>> "python setup.py clean -a", which then does the wrong thing.
> 
> Well, I'd like to say that you have found a bug in git-buildpackage. In
> this case, build-deps really should be downloaded before setup.py is called.
> 
> In our case, we have setup_requires needs in order for setup.py to
> operate. These cannot be avoided, and they are a normal enough python
> feature.
> 
> I'm not sure how they expect executable code in the source package
> (setup.py) to operate without the stated build depends being present.
> Can we get git-buildpackage fixed? This isn't specific to OpenStack,
> using setuptools setup_requires in any circumstance is going to result
> in this behavior.
> 
>> I have ways to fix it: disable "python setup.py clean -a" (by adding
>> override_dh_auto_clean), and do the work myself, as a package
>> maintainer, to clean built files.
>>
>> Though I'm sure that everyone would agree that this is not the best
>> solution. Best would be if I could use upstream's clean script, though
>> in the current state of things, I just can't ... :/
>>
>> If the above isn't clean (I'm really bad at explaining, sorry), let me
>> know and I'll try again.
> 
> Totally makes sense the problem you are having, but it's not going to
> change from OpenStack's side (we need setup_requires). I would be more
> than happy to help track down and file a git-buildpackage bug though.

http://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps

Are you putting the build-depends on pbr and d2to1 in build-depends? Or
build-depends-indep? Because if you're putting them in indep, indep is
not required to be installed before the clean target is invoked.
build-depends, on the other hand, is.

Monty



More information about the OpenStack-dev mailing list