[Python-checkins] bpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594)
Miss Islington (bot)
webhook-mailer at python.org
Sat Jun 8 17:25:25 EDT 2019
https://github.com/python/cpython/commit/3f7629d93c8cb3e0ee118c6a6463250f03d6c9f9
commit: 3f7629d93c8cb3e0ee118c6a6463250f03d6c9f9
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-06-08T14:25:21-07:00
summary:
bpo-11122: fix hardcoded path checking for rpmbuild in bdist_rpm.py (GH-10594)
(cherry picked from commit 45a14942c969ed508b35abd5e116cb18f84ce5b4)
Co-authored-by: Marcin Niemira <marcin.niemira at gmail.com>
files:
A Misc/NEWS.d/next/Library/2018-11-12-19-08-50.bpo-11122.Gj7BQn.rst
M Lib/distutils/command/bdist_rpm.py
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 20ca7ac6dcff..74381cc69a6c 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -309,10 +309,7 @@ def run(self):
# 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
index 000000000000..483906613801
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-11-12-19-08-50.bpo-11122.Gj7BQn.rst
@@ -0,0 +1 @@
+Distutils won't check for rpmbuild in specified paths only.
More information about the Python-checkins
mailing list