From: Stefan Behnel Date: Sat, 16 Apr 2011 10:32:23 +0000 (+0200) Subject: Py2.3 fix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=269fb2b8e950e1db630ffcaa839fbc4338e969ec;p=cython.git Py2.3 fix --- diff --git a/Cython/Build/BuildExecutable.py b/Cython/Build/BuildExecutable.py index ab47883b..ae82beb6 100755 --- a/Cython/Build/BuildExecutable.py +++ b/Cython/Build/BuildExecutable.py @@ -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)