changeset 233:6a37bc1b0b8c

distutils: fixed custom wokkel building
author Goffi <goffi@goffi.org>
date Thu, 06 Jan 2011 19:16:50 +0100 (2011-01-06)
parents 0cd5b3c4513f
children a7079e835432
files setup.py
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Thu Jan 06 18:48:56 2011 +0100
+++ b/setup.py	Thu Jan 06 19:16:50 2011 +0100
@@ -73,12 +73,16 @@
                         '/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