On Jan 29, 2010, at 10:27 PM, Tarek Ziadé wrote: >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.
Actually, my version number is a static assignment in __init__.py:
__version__ = '2.0.2'
and I just manually bump that with every release. I'd be just as happy to
bump it in setup.cfg (maybe more!) as long as there was an API that I could
add to __init__.py to assign it to my module's namespace, e.g. in
mypkg/__init__.py:
from distribute.resources import get_version
__version__ = get_version('mypkg')
I don't much care how that's spelled. The important things are:
* One place to bump version numbers
* Available from setup.py without importing from the package
* Available from the package's namespace
-Barry
signature.asc
Description: PGP signature
_______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
