[Distutils] stdeb-0.3 error

Andrew Straw strawman at astraw.com
Wed Sep 23 09:07:30 CEST 2009

Gerry Reno wrote:
> Gerry Reno wrote:
>> Andrew Straw wrote:
>>> Gerry Reno wrote:
>>>> So now everything is working on hardy except for the fact that
>>>> stdeb 0.3
>>>> has to be modified to remove the --single-version-externally-managed
>>>> option. So can you just create a 0.3a version with this small
>>>> change and
>>>> that could go out to the repositories and be available by default to
>>>> everyone. There does not seem to be any impact that I can see in
>>>> making
>>>> this change and since so many people create their own install classes
>>>> this would actually prevent conflicts.
>>> I figured out what the reason for
>>> --single-version-externally-managed is
>>> -- it is required for namespace packages to function properly. Thus, I
>>> can't remove it, as doing so would be a regression.
>>> However, if you create a patch I can apply against the old-stable
>>> branch
>>> that makes this optional, (e.g. set in a similar way as the
>>> --ignore-install-requires option), I can add that and make release
>>> 0.3.1. 
>> Ok, I'll look at getting you a patch that removes the option.
> Patch to utils.py in old-stable branch attached.

I saw your patch, but that wasn't what I meant. Disabling
--single-version-externally-managed has to be optional, and the argument
must continue to be used by default. Simply removing the call will
create a regression for namespace packages. Thus, the
--single-version-externally-managed should only be removed when someone
explicitly asks for it to be removed (because they presumably know what
they're doing or are at least aware it may have negative consequences).
Hence my suggestion to look at how the --ignore-install-requires works
as an example of how to pass an option via the distuils infrastructure.

>>> Note also that I'm very close to releasing 0.4, as the 0.3 line
>>> has major problems with Jaunty and later.
>>> Are you planning to submit a patch for the bdist_deb command? I could
>>> include that, too.
>> Yes, I have something ready but I think the 'bdist_deb' command
>> belongs as a distutils patch. I created the command by subclassing
>> the distutils Command class. Maybe Tarek could comment on what might
>> be best here.
>> Here is my working 'bdist_deb' code verbatim from inside my setup.py:

OK, based on your code I added a "bdist_deb" distutils command to stdeb.
I've checked this into the old-stable branch and I'd appreciate it if
you can check whether this works for you and send me any comments.
Invoke it like this:

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

The implementation is in the old-stable branch
http://github.com/astraw/stdeb/commits/old-stable I will merge this into
the master branch soon.


More information about the Distutils-SIG mailing list