]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #619493: Prefer rpmbuild over rpm if available.
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 7 Oct 2002 05:56:42 +0000 (05:56 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 7 Oct 2002 05:56:42 +0000 (05:56 +0000)
Lib/distutils/command/bdist_rpm.py

index 4bc2561324ce31da0bc7e50e8b5757cfa2b0dfe0..5e5fd61865ef7ab35b749763b52cff4902d1cffc 100644 (file)
@@ -280,6 +280,9 @@ class bdist_rpm (Command):
         # build package
         self.announce('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: