[Distutils] bdist_deb in stdeb
olof.bjarnason at gmail.com
Mon Sep 28 20:12:14 CEST 2009
2009/9/28 Gerry Reno <greno at verizon.net>:
> Andrew Straw wrote:
>> Olof Bjarnason wrote:
>>> 2009/9/28 Gerry Reno <greno at verizon.net>:
>>>>> Just pass the arguments directly to sdist_dsc. It should be something
>>>>> like this:
>>>>> python setup.py sdist_dsc --ignore-single-version-externally-managed
>>>>> --ignore-install-requires bdist_deb
>>>> How's that going to work? You have 'sdist_dsc' on the command line as
>>>> as 'bdist_deb'. 'bdist_deb' also calls 'sdist_dsc' internally but this
>>>> time it would be without any arguments? How can that work?
>> This is standard distutils command processing -- this has nothing to do
>> with stdeb per se. The reason I gave an example not involving stdeb
>> (which was snipped out by you in your quote above) is so that you can
>> try it yourself and explore further without thinking it's somehow an
>> stdeb issue. Specifically, you do not need to understand anything
>> specific to stdeb to understand how to pass multiple arguments to
>> sub-commands of a distutils command. (And if stdeb handles things
>> differently, it's a bug and I would appreciate hearing about it.)
>> For example, "build_ext" is a sub-command of "install" that get called
>> to build extension modules prior to installation. (Being a sub-command
>> is not strictly true in the sense that the install command doesn't list
>> build_ext in its sub_commands in distutils/commands/install.py, but it
>> acts as if it's true.) Likewise, "sdist_dsc" is a sub-command of
>> "bdist_deb". In all cases one, might want to pass arguments to the
>> sub-command before running a later command. distutils allows this.
> 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
> $ 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
This would be _exactly_ what I'm looking for :)
But how would you know what package dependencies the python application has?
Also, would it be a binary or source distribution package..?
> This is how I was expecting that you would implement the bdist_deb command
> inside of stdeb.
> Another issue: In util.py on line 962 (gerry-reno git):
> %(setup_env_vars)spython$* -c "import
> install \\
> Maybe it should be like this (note semicolon splitting line into two
> %(setup_env_vars)s; python$* -c "import
> install \\
> Otherwise any of the env vars don't seem to be in effect for the line
> itself. If you put any of the env vars in the line, they don't expand to
> the value set in set_env_vars. They expand to previous value or to null.
> Distutils-SIG maillist - Distutils-SIG at python.org
More information about the Distutils-SIG