summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-10-07 05:57:21 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-10-07 05:57:21 (GMT)
commitbb20bb6bdb01596fac70b86949d045a45d7519d8 (patch)
tree99bc6b5529fe46cd0c9d05e4cbd66fad2e1bde9d /Lib
parent9cce029e483efff3aa31c42e4cecbf5e1dfcc826 (diff)
downloadcpython-bb20bb6bdb01596fac70b86949d045a45d7519d8.zip
cpython-bb20bb6bdb01596fac70b86949d045a45d7519d8.tar.gz
cpython-bb20bb6bdb01596fac70b86949d045a45d7519d8.tar.bz2
Patch #619493: Prefer rpmbuild over rpm if available. Backported to 2.2.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/command/bdist_rpm.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index bbaad7d..86a4094 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -282,6 +282,9 @@ 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']
if self.source_only: # what kind of RPMs?
rpm_cmd.append('-bs')
elif self.binary_only: