about summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/cpython/3.7/fix-hardcoded-path-checking-for-rpmbuild.patch
blob: bb3d992612d3d6ad9a8219c4e2ee056d50cdf664 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From a612c481f6116955d420db5ae1fe4c1eb93eb2f2 Mon Sep 17 00:00:00 2001
From: Marcin Niemira <marcin.niemira@gmail.com>
Date: Sun, 9 Jun 2019 07:05:06 +1000
Subject: [PATCH] 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@gmail.com>
---
 Lib/distutils/command/bdist_rpm.py                           | 5 +----
 .../next/Library/2018-11-12-19-08-50.bpo-11122.Gj7BQn.rst    | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)
 create mode 100644 Misc/NEWS.d/next/Library/2018-11-12-19-08-50.bpo-11122.Gj7BQn.rst

diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 20ca7ac6dcffa..74381cc69a6ce 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')