diff options
author | Stefan H. Holek <stefan@epy.co.at> | 2012-10-08 21:06:52 +0200 |
---|---|---|
committer | Stefan H. Holek <stefan@epy.co.at> | 2012-10-08 21:06:52 +0200 |
commit | 907d9f46c3e0ef8dbc55528da9efe5087c182c9f (patch) | |
tree | 42d4cd5ede0a519e15f4418d8f87e38a0dcdfe54 /setuptools/command/egg_info.py | |
parent | 9553dd9910df577351ea04bb1613767096beeca0 (diff) | |
download | external_python_setuptools-907d9f46c3e0ef8dbc55528da9efe5087c182c9f.tar.gz external_python_setuptools-907d9f46c3e0ef8dbc55528da9efe5087c182c9f.tar.bz2 external_python_setuptools-907d9f46c3e0ef8dbc55528da9efe5087c182c9f.zip |
Fix duplicate application of version tags in 'egg_info' command. Fixes #299.
--HG--
branch : distribute
extra : rebase_source : 9f6fb87944bc3b9828b04bf8ac5ba7b3a40bfc95
Diffstat (limited to 'setuptools/command/egg_info.py')
-rwxr-xr-x | setuptools/command/egg_info.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index e932d46a..2dc59187 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -162,7 +162,12 @@ class egg_info(Command): os.unlink(filename) def tagged_version(self): - return safe_version(self.distribution.get_version() + self.vtags) + version = self.distribution.get_version() + # egg_info may be called more than once for a distribution, + # in which case the version string already contains all tags. + if self.vtags and version.endswith(self.vtags): + return safe_version(version) + return safe_version(version + self.vtags) def run(self): self.mkpath(self.egg_info) |