[Distutils] Specifying version information once

Zooko Wilcox-O'Hearn zooko at zooko.com
Tue May 19 21:12:52 CEST 2009

On May 19, 2009, at 12:21 PM, Jean-Paul Calderone wrote:

> What is the recommendation for specifying version information in a  
> way which is compatible with all these new tools?

My personal recommendation is to put the version information in a  
flat text file and have your setup.py read that flat text file  
instead of importing a Python package, e.g.:


Another approach is to have the revision control be the single store  
of versioning information, and read it out of revision control  
whenever your setup.py runs.  I believe I've already submitted one  
patch for each of these techniques for Nevow:


A third approach is require setuptools and rely on setuptools's  
implementation of the second approach -- reading versioning  
information from your revision control tool.  That one has obvious  
disadvantages (e.g. The Big Two: http://bugs.python.org/setuptools/ 
issue54 (be more like distutils with regard to --prefix=) and http:// 
bugs.python.org/setuptools/issue53 (respect the PYTHONPATH)), but it  
has the advantage that the implementation of this feature is not in  
your setup.py but is in setuptools or in a setuptools plugin such as  
setuptools_hg or setuptools_bzr.




More information about the Distutils-SIG mailing list