In the Python package I'm putting together I'm using the following setup.cfg
file:
[egg_info]
tag_build = dev
tag_date = 1
tag_svn_revision = 1
However when I run python setup.py sdist
the SVN revision appears as -r0
. This is likely because there is no .svn
directory where I run the setup script; in fact my tree is
main_dir/
.svn/
branches/
trunk/
setup.py
setup.cfg
How can I tell setuptools
to go find the SVN revision number in a parent directory? I still want to keep using my package version number.