pre-processing source from distutils

Michael Stenner mstenner at ece.arizona.edu
Sat Mar 13 15:11:48 EST 2004


Is it possible to pre-process source code from distutils?  I don't want 
to do anything too fancy.  I just want to put the VERSION from setup.py 
(and maybe a date) into the module at sdist or build time (I haven't 
decided which of those would be cleaner).  Anybody know of a clean way 
to do this?

I don't mind writing an arbitrarily complex function to edit files or 
whatever.  The problem is getting it called at the right time and 
knowing what mode setup.py is being called in.

                                    Thanks,
                                     Michael




More information about the Python-list mailing list