Commit fdf5cd17 authored by PJ Eby's avatar PJ Eby

Fixed ``--tag-svn-revision`` not working when run from a source

distribution.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041474
parent 4cd66c41
...@@ -2010,6 +2010,9 @@ Release Notes/Change History ...@@ -2010,6 +2010,9 @@ Release Notes/Change History
automatically include any package data listed in revision control or automatically include any package data listed in revision control or
``MANIFEST.in``. ``MANIFEST.in``.
* Fixed ``--tag-svn-revision`` not working when run from a source
distribution.
0.6a8 0.6a8
* Fixed some problems building extensions when Pyrex was installed, especially * Fixed some problems building extensions when Pyrex was installed, especially
with Python 2.4 and/or packages using SWIG. with Python 2.4 and/or packages using SWIG.
......
...@@ -133,11 +133,11 @@ class egg_info(Command): ...@@ -133,11 +133,11 @@ class egg_info(Command):
version = self.distribution.get_version() version = self.distribution.get_version()
if self.tag_build: if self.tag_build:
version+=self.tag_build version+=self.tag_build
if self.tag_svn_revision and os.path.exists('.svn'): if self.tag_svn_revision and (
version += '-r%s' % self.get_svn_revision() os.path.exists('.svn') or os.path.exists('PKG-INFO')
): version += '-r%s' % self.get_svn_revision()
if self.tag_date: if self.tag_date:
import time import time; version += time.strftime("-%Y%m%d")
version += time.strftime("-%Y%m%d")
return safe_version(version) return safe_version(version)
def get_svn_revision(self): def get_svn_revision(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment