summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/distutils/command/bdist_rpm.py5
-rw-r--r--Misc/NEWS.d/next/Library/2018-11-12-19-08-50.bpo-11122.Gj7BQn.rst1
2 files changed, 2 insertions, 4 deletions
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 20ca7ac6dc..74381cc69a 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -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
index 0000000000..4839066138
--- /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.