[Distutils] stdeb-0.3 error

Andrew Straw strawman at astraw.com
Sun Sep 20 06:36:18 CEST 2009


Gerry Reno wrote:
> Ok, I have a setup.py that imports stdeb and creates a 'bdist_deb'
> command.

Great.

> The entire thing is working except for the last subcommand for
> dpkg-buildpackage is trying to build for python2.4 and failing.
>
> dpkg-buildpackage fails in the fakeroot...
> ...
> debian/rules build
> python2.4 -c "import
> setuptools,sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})"
> build
> Traceback (most recent call last):
> File "<string>", line 1, in ?
> File "setup.py", line 35, in ?
> import stdeb
> ImportError: No module named stdeb
> make: *** [build-python2.4] Error 1
> dpkg-buildpackage: failure: debian/rules build gave error exit status 2
>
> Is this something to do with python versions?
> So how do I limit the python versions for dpkg-buildpackage?
To answer your question directly[*]:

create an stdeb.cfg file like the following and put in the
distribution_name.egg-info directory. (See "Customizing the produced
Debian source package" at http://github.com/astraw/stdeb ).

[default]
XS-Python-Version: 2.5

[*] Note: I think if you switch to stdeb 0.4 you won't need stdeb
installed for all Python versions to run debian/rules. There is a much
cleaner infrastructure making use of debhelper 7. At this point, I
suggest downloading the 0.4 branch and working from there. I don't think
any of your changes so far will be hard to port, but working on
modifying debian/rules in the 0.3 branch doesn't have much of a future.
If you're not a git person, you can simply download the latest version
of the master branch by clicking the "download" button at
http://github.com/astraw/stdeb (not the "Downloads" tab). I hope with
stdeb 0.4 this won't be necessary.

-Andrew


More information about the Distutils-SIG mailing list