[Distutils] svn tagging setuptools command

Ian Bicking ianb at colorstudy.com
Mon Aug 29 01:58:37 CEST 2005


Phillip J. Eby wrote:
>> I think for the command plugins, I'd imagine:
>>
>> setup(
>>   ....
>>   setup_plugins=['spec1', 'spec2', ...])
>>
>> Which writes to .egg-info/setup_plugins.txt (one line per 
>> requirement).  Then it includes any 'distutils.extra_commands' entry 
>> points from those eggs, which act exactly like distutils.commands.
> 
> 
> I'm confused.  If you want to add custom commands to a particular 
> project's setup.py, you just supply the standard distutils 'cmdclass' 
> argument to setup, e.g.:
> 
>     setup(
>         ...
>         cmdclass = {'mycommand':mycommand}
>     )
> 
> Conversely, if what you mean is that you'd like to ensure that certain 
> distutils extensions are available when setup.py runs, then you should 
> use the 'setup_requires' argument (see the setuptools docs).

I'm thinking of framework-specific commands, not purely project-specific.

For instance, if I have a project that uses SQLObject, I would like to 
make the SQLObject admin commands available.  This way I could do things 
like "python setup.py sqlcreate", "python setup.py sqlstatus", etc.  I 
want a single setting in setup.py to add all the commands from 
SQLObject.  But I also don't want every setup.py on the system to have 
these same commands, because they mean nothing for a project that 
doesn't use SQLObject.


-- 
Ian Bicking  /  ianb at colorstudy.com  / http://blog.ianbicking.org


More information about the Distutils-SIG mailing list