]> granicus.if.org Git - python/commitdiff
Patch #619493: Prefer rpmbuild over rpm if available. Backported to 2.2.
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 7 Oct 2002 05:57:21 +0000 (05:57 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 7 Oct 2002 05:57:21 +0000 (05:57 +0000)
Lib/distutils/command/bdist_rpm.py

index bbaad7dc7b19304a62d821e9bf2f39185fb2829a..86a40947b4c888b81612090f86c04b01c4ca5ad4 100644 (file)
@@ -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: