distutils: fixed custom wokkel building

This commit is contained in:
Goffi 2011-01-06 19:16:50 +01:00
commit 5cc2716b73

View file

@ -73,12 +73,16 @@ class custom_install(install):
'/usr/bin/hg commit -m "Merged wokkel\'s MUC branch"',
'%s setup.py install' % sys.executable]
for command in commands:
ret = subprocess.call(command, shell=True)
if ret!=0:
os.chdir(ori_path)
print ("ERROR while building/installing custom wokkel")
print ('Error happened when executing [%s]' % command)
raise MercurialException
if command.startswith('cd '):
os.chdir(command[3:])
else:
ret = subprocess.call(command, stdout=open('/dev/null', 'w'), shell=True)
if ret!=0:
os.chdir(ori_path)
print ("ERROR while building/installing custom wokkel")
print ('Error happened when executing [%s]' % command)
print ('tmpdir is [%s]' % work_path)
raise MercurialException
os.chdir(ori_path)
print "Custom wokkel builded and installed, removing temporary files"
import shutil