[Distutils] svn tagging setuptools command

Phillip J. Eby pje at telecommunity.com
Mon Aug 29 08:45:53 CEST 2005


At 06:58 PM 8/28/2005 -0500, Ian Bicking wrote:
>Phillip J. Eby wrote:
>>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.

Then use setup_requires to list the eggs that offer those commands.


>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.

Yep, this is exactly what the setup_requires keyword is for.  If SQLObject 
is the egg with entry points for those commands, then 
setup_requires=['SQLObject>=0.7b1'] or whatever will do the trick, to the 
point of downloading SQLObject to the setup directory and installing it 
there if need be.

(Of course, if SQLObject is already on sys.path due to the easy_install.pth 
file, then you will get those commands in every project anyway, but oh well.)



More information about the Distutils-SIG mailing list