aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorStefan H. Holek <stefan@epy.co.at>2012-10-08 21:06:52 +0200
committerStefan H. Holek <stefan@epy.co.at>2012-10-08 21:06:52 +0200
commit907d9f46c3e0ef8dbc55528da9efe5087c182c9f (patch)
tree42d4cd5ede0a519e15f4418d8f87e38a0dcdfe54 /setuptools/command/egg_info.py
parent9553dd9910df577351ea04bb1613767096beeca0 (diff)
downloadexternal_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-xsetuptools/command/egg_info.py7
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)