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 :)
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))
dist_created = os.listdir(os.path.join(pkg_dir, 'dist'))
self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created)
+ # bug #2945: upload ignores bdist_rpm files
+ self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm'), dist.dist_files)
+ self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm'), dist.dist_files)
+
def test_no_optimize_flag(self):
# XXX I am unable yet to make this test work without
dist_created = os.listdir(os.path.join(pkg_dir, 'dist'))
self.assertTrue('foo-0.1-1.noarch.rpm' in dist_created)
+
+ # bug #2945: upload ignores bdist_rpm files
+ self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm'), dist.dist_files)
+ self.assertIn(('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm'), dist.dist_files)
+
os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm'))
def test_suite():
Juan M. Bello Rivas
Davide Rizzo
Anthony Roach
+Carl Robben
Mark Roberts
Jim Robinson
Andy Robinson
Library
-------
+- Issue #2945: Make the distutils upload command aware of bdist_rpm products.
+
- Issue #13642: Unquote before b64encoding user:password during Basic
Authentication. Patch contributed by Joonas Kuorilehto.