aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsetuptools.egg-info/entry_points.txt1
-rw-r--r--setuptools/command/__init__.py2
-rwxr-xr-xsetuptools/command/bdist_rpm.py11
-rwxr-xr-xsetuptools/command/egg_info.py12
4 files changed, 19 insertions, 7 deletions
diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt
index c6b3f595..d8435a3d 100755
--- a/setuptools.egg-info/entry_points.txt
+++ b/setuptools.egg-info/entry_points.txt
@@ -17,6 +17,7 @@ entry_points.txt = setuptools.command.egg_info:write_entries
depends.txt = setuptools.command.egg_info:warn_depends_obsolete
[distutils.commands]
+bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
rotate = setuptools.command.rotate:rotate
develop = setuptools.command.develop:develop
setopt = setuptools.command.setopt:setopt
diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py
index 720b7a3f..7294d55c 100644
--- a/setuptools/command/__init__.py
+++ b/setuptools/command/__init__.py
@@ -1,5 +1,5 @@
__all__ = [
- 'alias', 'bdist_egg', 'build_ext', 'build_py', 'develop',
+ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop',
'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts',
'sdist', 'setopt', 'test', 'upload',
]
diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py
new file mode 100755
index 00000000..004419ce
--- /dev/null
+++ b/setuptools/command/bdist_rpm.py
@@ -0,0 +1,11 @@
+# This is just a kludge so that bdist_rpm doesn't guess wrong about the
+# distribution name and version, if the egg_info command is going to alter them
+
+from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm
+
+class bdist_rpm(_bdist_rpm):
+
+ def run(self):
+ self.run_command('egg_info') # ensure distro name is up-to-date
+ _bdist_rpm.run(self)
+
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
+
+
+