clean build dir before generating release
This commit is contained in:
@@ -57,7 +57,7 @@ shutil.copy('setup.cfg','setup.cfg.bup')
|
||||
fd = open('setup.cfg','a')
|
||||
fd.write("""
|
||||
[build]
|
||||
/usr/bin/python
|
||||
executable=/usr/bin/python
|
||||
|
||||
[install]
|
||||
prefix=/usr
|
||||
@@ -69,7 +69,6 @@ Vendor=PSI
|
||||
Packager=Derek Feichtinger
|
||||
#Provides
|
||||
Requires=python-ldap
|
||||
License=PSI
|
||||
#Conflicts
|
||||
#Obsoletes
|
||||
#Distribution
|
||||
@@ -78,6 +77,16 @@ License=PSI
|
||||
""")
|
||||
fd.close()
|
||||
|
||||
# clean the build dir first
|
||||
sp = subprocess.Popen(['python','setup.py','clean','--all'],
|
||||
shell = False,
|
||||
stdout = subprocess.PIPE,
|
||||
stderr = subprocess.PIPE)
|
||||
(stdout, stderr) = sp.communicate()
|
||||
if sp.returncode != 0:
|
||||
raise RuntimeError(stderr)
|
||||
sys.stdout.write(stdout)
|
||||
|
||||
# Run the RPM build
|
||||
sp = subprocess.Popen(['python','setup.py','bdist_rpm'],
|
||||
shell = False,
|
||||
|
||||
Reference in New Issue
Block a user