From 5cc2716b73f08ab1f5ce146475169ebe08af6291 Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 6 Jan 2011 19:16:50 +0100 Subject: [PATCH] distutils: fixed custom wokkel building --- setup.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 0f0bab6a..d33425d7 100644 --- a/setup.py +++ b/setup.py @@ -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