diff options
| author | PJ Eby <distutils-sig@python.org> | 2005-11-18 11:29:50 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2005-11-18 11:29:50 +0000 |
| commit | fdf5cd175d701b095bff23faedc5f6c1d4c131d8 (patch) | |
| tree | f46984ca96f813d80bae3af5f0d40acbb538378d | |
| parent | 4cd66c4147bef3ee8096f7161d407fb37582f1c9 (diff) | |
| download | python-setuptools-git-fdf5cd175d701b095bff23faedc5f6c1d4c131d8.tar.gz | |
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
| -rwxr-xr-x | setuptools.txt | 3 | ||||
| -rwxr-xr-x | setuptools/command/egg_info.py | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/setuptools.txt b/setuptools.txt index e4ce6366..f478b82c 100755 --- a/setuptools.txt +++ b/setuptools.txt @@ -2010,6 +2010,9 @@ Release Notes/Change History automatically include any package data listed in revision control or ``MANIFEST.in``. + * Fixed ``--tag-svn-revision`` not working when run from a source + distribution. + 0.6a8 * Fixed some problems building extensions when Pyrex was installed, especially with Python 2.4 and/or packages using SWIG. diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 3f17c041..a245002e 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -133,11 +133,11 @@ class egg_info(Command): version = self.distribution.get_version() if self.tag_build: version+=self.tag_build - if self.tag_svn_revision and os.path.exists('.svn'): - version += '-r%s' % self.get_svn_revision() + if self.tag_svn_revision and ( + os.path.exists('.svn') or os.path.exists('PKG-INFO') + ): version += '-r%s' % self.get_svn_revision() if self.tag_date: - import time - version += time.strftime("-%Y%m%d") + import time; version += time.strftime("-%Y%m%d") return safe_version(version) def get_svn_revision(self): |
