From 269fb2b8e950e1db630ffcaa839fbc4338e969ec Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 16 Apr 2011 12:32:23 +0200 Subject: [PATCH] Py2.3 fix --- Cython/Build/BuildExecutable.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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) -- 2.26.2