Py2.3 fix
authorStefan Behnel <scoder@users.berlios.de>
Sat, 16 Apr 2011 10:32:23 +0000 (12:32 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 16 Apr 2011 10:32:23 +0000 (12:32 +0200)
Cython/Build/BuildExecutable.py

index ab47883baddb315a101a70bbd61bae417b8c85ec..ae82beb690491f0ba6ca1e989c3e5d8719e5cba5 100755 (executable)
@@ -11,7 +11,6 @@ DEBUG = True
 
 import sys
 import os
-import subprocess
 from distutils import sysconfig
 
 INCDIR = sysconfig.get_python_inc()
@@ -51,7 +50,13 @@ def runcmd(cmd, shell=True):
     else:
         _debug(' '.join(cmd))
 
-    returncode = subprocess.call(cmd, shell=shell)
+    try:
+        import subprocess
+    except ImportError: # Python 2.3 ...
+        returncode = os.system(cmd)
+    else:
+        returncode = subprocess.call(cmd, shell=shell)
+    
     if returncode:
         sys.exit(returncode)