[Distutils] svn tagging setuptools command

Phillip J. Eby pje at telecommunity.com
Mon Aug 29 01:44:21 CEST 2005

At 06:32 PM 8/28/2005 -0500, Ian Bicking wrote:
>Phillip J. Eby wrote:
>>At 03:07 PM 8/28/2005 -0500, Ian Bicking wrote:
>>>I don't know if setup.py is the right frontend for all of these.  One
>>>specific issue is that one command creates the basic framework of a
>>>package, including a setup.py file.  But maybe setuptools could be
>>>extended to support two kinds of entry points: one that is applied
>>>globally (what it currently has), and one that is applied only on demand
>>>(for framework-specific commands).
>>My thought is that at some point (0.7?) setuptools will have a 'nest' 
>>script that runs general-purpose commands, and it will have its own entry 
>>point group for commands to install, list, uninstall, etc.
>I suppose this would be a good place for a command to setup a new project 
>(since that's kind of package management -- at least chronologically); 
>would it be an appropriate entry point for other more project-specific 
>commands?  It doesn't seem like it to me; but then setup.py seems 
>appropriate for those commands.


>I think for the command plugins, I'd imagine:
>   ....
>   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.:

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

>Or maybe it could be something in setup.cfg?  I'd actually find this sort 
>of thing quite awkward in setup.py, since setup.py can't be (reasonably) 
>written to.

I'm still not following you.  Configuration for custom commands of course 
can always be put in setup.cfg.

>Incidentally, is it possible to put setup.cfg in the .egg-info directory 
>or somewhere?

No; that file belongs to the distutils, and the distutils decree that it's 
found in the setup.py directory.

More information about the Distutils-SIG mailing list