Greg Ward wrote:
On 20 September 2000, Martin von Loewis said:
In my package, I have two places which carry version information: in the setup.py, when passing the version= keyword argument to setup, and in the package's __init__, to allow runtime access to the available version.
I have the same problem -- I always have to update the Distutils setup.py and distutils/__init__.py in sync. Yuck.
I'd like these to be synchronized, having the information only in a single place, and fetching it from there in the other. Is there any mechanism in distutils to facilitate such synchronization?
I just had an idea which requires no funky substitution mechanism, and no extra code in the Distutils: in the setup file, do this (or equivalent for your scenario):
from distutils import core import distutils
setup(name = "Distutils", version = distutils.__version__, ...)
Uhm... isn't that the obvious solution ;-) Note that I've just moved a thread about package versioning from xml-sig to python-dev. I think we need a PEP on this. -- Marc-Andre Lemburg ______________________________________________________________________ Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/