From 76134ff59b005c515c3cc388922f40c89c6850a2 Mon Sep 17 00:00:00 2001 From: cgohlke Date: Tue, 12 Jun 2012 13:28:33 -0700 Subject: [PATCH] Fix build error on EPD for Windows --- skimage/_build.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/skimage/_build.py b/skimage/_build.py index b30f7596..dbf5e678 100644 --- a/skimage/_build.py +++ b/skimage/_build.py @@ -38,15 +38,17 @@ def cython(pyx_files, working_path=''): cmd = 'cython -o %s %s' % (c_file, pyxfile) print(cmd) - if platform.system() == 'Windows': + try: + status = subprocess.call(['cython', '-o', c_file, pyxfile]) + except WindowsError: + # On Windows cython.exe may be missing if Cython was installed + # via distutils. Run the cython.py script instead. status = subprocess.call( [sys.executable, os.path.join(os.path.dirname(sys.executable), 'Scripts', 'cython.py'), '-o', c_file, pyxfile], shell=True) - else: - status = subprocess.call(['cython', '-o', c_file, pyxfile]) def _md5sum(f): m = hashlib.new('md5')