[Distutils] stdeb-0.3 error

Andrew Straw strawman at astraw.com
Sat Sep 19 09:38:15 CEST 2009


Gerry Reno wrote:
> Ok, I got the __file__ problem solved but now I want to do this whole
> deb pkg create as just a single command in my own setup.py.  How can I
> do this?
>
> I'm thinking something like:
>
> # my setup.py
> import stdeb
>
> Command(mycmd):
>    initialize_option...
>    finalize_option...
>    run
>       sub_commands=[('sdist_dsc', None),]
>       system('dpgk-source ...)
>       print ".deb is here..."
>
> Would this work and is this how to do it?
Do you really need to run it directly from setup.py? Can't you run it
from a shell script or write a python script making lots of use of
subprocess? The reason I ask is that distutils isn't fun to extend, and
as you're already going to be running on a Debian-based system, I can't
see what's to be gained.

What you want to do is probably possible, but I don't have the
motivation to do it myself. I guess it could allow a bdist_deb option,
but IMO that's not particularly desirable -- the Debian source package
emitted by stdeb can be compiled for any Debian derivative for any
version (provided the dependencies are met) -- whereas the .deb will
only have defined behavior on the Debian/Ubuntu release on which it was
built.

-Andrew


More information about the Distutils-SIG mailing list