[Distutils] bdist_deb in stdeb

Olof Bjarnason olof.bjarnason at gmail.com
Mon Sep 28 21:56:53 CEST 2009

2009/9/28 Olof Bjarnason <olof.bjarnason at gmail.com>:
> 2009/9/28 Andrew Straw <strawman at astraw.com>:
>> 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).
> I tried "stdeb_run_setup", it got me a lot of files (and directories)
> although no .deb file.
> Also tried "python setup.py bdist_deb" and ".. sdist_deb". Didn't work.
> What is the command line I'm supposed to run in the setup.py directory?

OK I came a little further apt-get:ing debhelper and python-all-dev,
then issuing

sudo python -c "import stdeb; execfile('setup.py')" bdist_deb

.. but it ended with this:

Compatibility mode: using detected XS-Python-Version.
varning, "debian/python-fortressdefender/DEBIAN/control" innehåller
användardefinierat fält "Python-Version"
dpkg-deb - fel: (upstream) version ("dev") innehåller inga siffror
dpkg-deb: 1 fel i kontrollfilen
dh_builddeb: command returned error code 512
make: *** [binary] Fel 1
dpkg-buildpackage: misslyckades: fakeroot debian/rules binary
returnerade felkod 2
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 42, in <module>
    scripts = ["bin/fortressdefender"],
  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
  File "build/bdist.linux-x86_64/egg/stdeb/command/bdist_deb.py", line
40, in run
  File "build/bdist.linux-x86_64/egg/stdeb/util.py", line 73, in process_command
  File "build/bdist.linux-x86_64/egg/stdeb/util.py", line 31, in check_call
stdeb.util.CalledProcessError: 2

> Note: I'm a newbee on these tools, spent a total <1 hr so far on 'em,
> sorry for being so thick. It is a whole jungle to understand all these
> different tools/nomenclature and how it all hangs together. I'm new to
> distutils, setuptools, stdeb and .deb building in general.
>> 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. 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. 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.
>> -Andrew
> --
> twitter.com/olofb
> olofb.wordpress.com
> olofb.wordpress.com/tag/english


More information about the Distutils-SIG mailing list