[Distutils] bdist_deb in stdeb

Gerry Reno greno at verizon.net
Mon Sep 28 21:08:40 CEST 2009

Andrew Straw wrote:
> Gerry Reno wrote:
>> Olof Bjarnason wrote:
>>>> Ok, the commands behave like makefile rules, once run they don't run
>>>> again.
>>>> But there are still several issues here:
>>>> Remember that I said that my goal with 'bdist_deb' was for users to
>>>> have a
>>>> SINGLE command to generate a .deb.
>>>> What needs to be achieved is for a command like this:
>>>> $ python setup.py  bdist_deb
>>>> OR
>>>> $ python setup.py  bdist_deb 
>>>> --ignore-single-version-externally-managed
>>>> to be possible.  'bdist_deb' would call sdist_dsc internally with the
>>>> necessary args WITHOUT having to explicitly put 'sdist_dsc' on the
>>>> command
>>>> line.
>>> This would be _exactly_ what I'm looking for :)
>> I know.  I've had many of my users requesting exactly the same thing
>> as well and I've been pursuing this for months now and when I got a
>> 'bdist_deb' working with stdeb I knew I was getting close.  It just
>> needs a little more tweeking and I think we'll have it.  Let's wait
>> and see what Andrew says here.
> I don't understand what you're waiting on me for at this point.
> Olaf -- as I understand it -- you need to work with Ubuntu 9.04. I just
> released stdeb 0.4 which supports this "bdist_deb" and doesn't pass the
> --single-version-externally-managed option anyway and therefore doesn't
> support the "--ignore-single-version-externally-managed" option. I don't
> understand why you need to pass
> "--ignore-single-version-externally-managed". "python setup.py
> bdist_deb" should work for you. Please report with specific information
> about expected and actual behavior if things are not working to your
> desire (taking care to read the, admittedly minimal, documentation in
> README.rst).
> Gerry -- I don't understand why you want to subvert the normal distutils
> way of doing things. Passing arguments to bdist_deb that are really
> arguments to sdist_dsc just isn't the way distutils does things. 
Please explain this then.  Why EVEN bother to call 'sdist_dsc' from 
within 'bdist_deb' if you cannot somehow pass arguments to the internal 
'sdist_dsc' call?

> You're
> asking for the equivalent of being able to pass arguments to the
> distutils install command that are ultimately intended for the distutils
> build_ext command. If you want to test (and possibly implement)
> functionality such as adding a [sdist_dsc] section to setup.cfg where
> these options could just live so that you don't need to pass arguments
> at the command line, thats would be welcome.
> Gerry, point 2 -- I still think you're not looking at your own big
> picture here -- AFAIK, you are bending over backwards to attempt to pass
> the "--ignore-single-version-externally-managed" so that you don't have
> to import setuptools in your setup.py file to avoid the monkeypatching
> that setuptools does. 
Stop. NO.  IF I import stdeb in the setup.py THEN any local distutils 
install class gets an error:
--single-version-externally-managed not recognized (or something 
similar).  The only way to get by this is by passing in the NEW option 
that I made, '--ignore-single-version-externally-managed' which removes 
this option from the install command which then allows the install to 
succeed.   This is because it looks like stdeb hijacks the distutils 
install command.

> But, setuptools is explicitly imported in the
> debian/rules files created in stdeb 0.3.x. I get the impression that
> you're fixated on this argument passing business and not looking at the
> bigger picture of the architecture involved and whether your ultimate
> goal is even achievable with stdeb 0.3.x.

More information about the Distutils-SIG mailing list