diff --git a/twisted/scripts/tap2rpm.py b/twisted/scripts/tap2rpm.py
index 3f55840..97ed546 100755
|
a
|
b
|
|
| 1 | 1 | # -*- test-case-name: twisted.scripts.test.test_tap2rpm -*- |
| 2 | 2 | |
| 3 | | # Copyright (c) 2003-2009 Twisted Matrix Laboratories. |
| | 3 | # Copyright (c) 2003-2010 Twisted Matrix Laboratories. |
| 4 | 4 | # See LICENSE for details. |
| 5 | 5 | |
| 6 | 6 | import sys, os, shutil, time, glob |
| | 7 | import subprocess |
| 7 | 8 | |
| 8 | 9 | from twisted.python import usage |
| 9 | 10 | from twisted.scripts import tap2deb |
| … |
… |
|
| 242 | 243 | % vars()) |
| 243 | 244 | |
| 244 | 245 | # build rpm |
| 245 | | print 'Starting build...' |
| 246 | | print '=' * 70 |
| 247 | | sys.stdout.flush() |
| 248 | | os.system('rpmbuild --define "_topdir %s" -ta %s' % ( tmp_dir, tarfile_name )) |
| 249 | | print 'Done with build...' |
| 250 | | print '=' * 70 |
| | 246 | job = subprocess.Popen([ |
| | 247 | "rpmbuild", |
| | 248 | "--define", "_topdir %s" % (tmp_dir,), |
| | 249 | "-ta", tarfile_name, |
| | 250 | ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
| | 251 | stdout, _ = job.communicate() |
| | 252 | |
| | 253 | # If there was a problem, show people what it was. |
| | 254 | if job.returncode != 0: |
| | 255 | print stdout |
| 251 | 256 | |
| 252 | 257 | # copy the RPMs to the local directory |
| 253 | 258 | rpm_path = glob.glob(os.path.join(tmp_dir, 'RPMS', 'noarch', '*'))[0] |