From 040f032a1f39038ed3209712b468c356c34a5df5 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Sun, 21 Aug 2005 23:33:40 +0000 Subject: Fix problem w/bdist_rpm and setuptools, reported by Walter Doerwald. I was trying to have setuptools fix distutils' broken filename handling that assumes people haven't put punctuation in their distribution names, including '-' (which prevents unambiguous parsing of distribution names). However, bdist_rpm's attempt to guess a source distribution's filename isn't compatible with this fix, without making other changes. I decided therefore to drop the fixes for the sake of backward compatibility, but monkeypatch bdist_rpm so that it runs "egg_info" first, to ensure that any --tag-svn-revision or other tagging options take effect. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041215 --- setuptools/command/egg_info.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'setuptools/command/egg_info.py') diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 8bfc8d42..2c9a953e 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -60,13 +60,13 @@ class egg_info(Command): self.ensure_dirname('egg_base') self.egg_info = os.path.join(self.egg_base, self.egg_name+'.egg-info') - # Set package version and name for the benefit of dumber commands - # (e.g. sdist, bdist_wininst, etc.) We escape '-' so filenames will - # be more machine-parseable. + # Set package version for the benefit of dumber commands + # (e.g. sdist, bdist_wininst, etc.) # - metadata = self.distribution.metadata - metadata.version = self.egg_version.replace('-','_') - metadata.name = self.egg_name.replace('-','_') + self.distribution.metadata.version = self.egg_version + + + -- cgit v1.2.1