On Wed, May 26, 2010 at 12:58 AM, Ronny Pfannschmidt <[email protected]> wrote: > hi, > > whats a good place to store version information from a vcs in a sdist, > without needing to drop them into python files.
What's the reason for not putting it in python files ? If the reason is to avoid hardcoding things, you can generate the python file. What I generally do is to "build" the version in setup.py, and generate a trivial __version.py module which is imported by the module to know its version. The __version.py is always generated everytime setup.py (so will be taken into account when doing sdist), and I protect the import of __version to have a default value, so that the package may be imported before any call to setup.py David _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
