[Distutils] How to customize egg_info behavior

P.J. Eby pje at telecommunity.com
Sun Aug 1 01:00:34 CEST 2010

At 12:39 PM 7/31/2010 -0700, Jason R. Coombs wrote:
>I'm using setuptools 0.6c11.
>I'd like to programmatically customize the way the egg_info command 
>is run. That is, in my setup.py, I would like to run some functions 
>to determine the tag-build, tag-date, and tag-svn-revision 
>parameters to egg_info. Are there parameters
>How is this task best accomplished? Do I subclass the egg_info 
>Command? If so, do I just specify 
>cmdclass={'egg_info':my_custom_egg_info} ?  Or would you recommend 
>another approach?

You can just do this in your setup script:

     options = dict(egg_info = dict(tag_build = "whatever", ...)),

Replacing "whatever", of course, with your programmatic calculation. 

More information about the Distutils-SIG mailing list