]> granicus.if.org Git - python/commitdiff
bpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594)
authorMarcin Niemira <marcin.niemira@gmail.com>
Sat, 8 Jun 2019 21:05:06 +0000 (07:05 +1000)
committerCheryl Sabella <cheryl.sabella@gmail.com>
Sat, 8 Jun 2019 21:05:05 +0000 (17:05 -0400)
Lib/distutils/command/bdist_rpm.py
Misc/NEWS.d/next/Library/2018-11-12-19-08-50.bpo-11122.Gj7BQn.rst [new file with mode: 0644]

index 20ca7ac6dcffaaa8be79a79d7b3fe95d2a8693c5..74381cc69a6cedca4bc6410e5305ee6e48af7744 100644 (file)
@@ -309,10 +309,7 @@ class bdist_rpm(Command):
 
         # build package
         log.info("building RPMs")
-        rpm_cmd = ['rpm']
-        if os.path.exists('/usr/bin/rpmbuild') or \
-           os.path.exists('/bin/rpmbuild'):
-            rpm_cmd = ['rpmbuild']
+        rpm_cmd = ['rpmbuild']
 
         if self.source_only: # what kind of RPMs?
             rpm_cmd.append('-bs')
diff --git a/Misc/NEWS.d/next/Library/2018-11-12-19-08-50.bpo-11122.Gj7BQn.rst b/Misc/NEWS.d/next/Library/2018-11-12-19-08-50.bpo-11122.Gj7BQn.rst
new file mode 100644 (file)
index 0000000..4839066
--- /dev/null
@@ -0,0 +1 @@
+Distutils won't check for rpmbuild in specified paths only.