On Fri, Jan 29, 2010 at 22:27, Tarek Ziadé
On Fri, Jan 29, 2010 at 10:05 PM, Barry Warsaw
wrote: [..] However, it would be nice if setuptools/distribute supported something like this out of the box. The important thing is to have exactly one place to set the package's version number.
For metadata fields like "version", one option I am working on in Distutils itself is to have a complementary section in the static setup.cfg file, where you can set some fields:
[setup] name=foo version=1.9.8
Once setup() is run, the Distribution class will look at this file, to complete the options provided by code;
Of course this supposes that the version is not calculated by some code (like in your solution). But I think a plain, non-development version, can be static.
What you want is then a simple way of getting this version number into the python code. Any recommendations for that? -- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64