summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2012-01-15 01:48:55 (GMT)
committerÉric Araujo <merwok@netwok.org>2012-01-15 01:48:55 (GMT)
commit73cec21af2bfd729e9b9a72a97bc661211db6077 (patch)
tree57ea7e7dd97f4bfe1c15e84119ba03c816dbb6d6 /Lib/distutils/command
parent9c7b9190c33d3df61167ddd25d8ddd6ca1e79bff (diff)
downloadcpython-73cec21af2bfd729e9b9a72a97bc661211db6077.zip
cpython-73cec21af2bfd729e9b9a72a97bc661211db6077.tar.gz
cpython-73cec21af2bfd729e9b9a72a97bc661211db6077.tar.bz2
Stop ignoring RPMs in distutils' upload command (#2945).
Bug reported by Hartmut Goebel and patch contributed by Carl Robben. Carl tested the fix and we have a buildbot with rpm installed, so I’m committing even though I could not run this test (but I do understand the changed code :)
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/bdist_rpm.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 678e118..357eaa5 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -365,16 +365,28 @@ class bdist_rpm(Command):
self.spawn(rpm_cmd)
if not self.dry_run:
+ if self.distribution.has_ext_modules():
+ pyversion = get_python_version()
+ else:
+ pyversion = 'any'
+
if not self.binary_only:
srpm = os.path.join(rpm_dir['SRPMS'], source_rpm)
assert(os.path.exists(srpm))
self.move_file(srpm, self.dist_dir)
+ filename = os.path.join(self.dist_dir, source_rpm)
+ self.distribution.dist_files.append(
+ ('bdist_rpm', pyversion, filename))
if not self.source_only:
for rpm in binary_rpms:
rpm = os.path.join(rpm_dir['RPMS'], rpm)
if os.path.exists(rpm):
self.move_file(rpm, self.dist_dir)
+ filename = os.path.join(self.dist_dir,
+ os.path.basename(rpm))
+ self.distribution.dist_files.append(
+ ('bdist_rpm', pyversion, filename))
def _dist_path(self, path):
return os.path.join(self.dist_dir, os.path.basename(path))