summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/cythonize.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/cythonize.py b/tools/cythonize.py
index 6cebf0f72..911b81243 100755
--- a/tools/cythonize.py
+++ b/tools/cythonize.py
@@ -56,6 +56,7 @@ def process_pyx(fromfile, tofile):
try:
# try the cython in the installed python first (somewhat related to scipy/scipy#2397)
+ import Cython
from Cython.Compiler.Version import version as cython_version
except ImportError:
# The `cython` command need not point to the version installed in the
@@ -73,7 +74,9 @@ def process_pyx(fromfile, tofile):
required_version = LooseVersion('0.29.21')
if LooseVersion(cython_version) < required_version:
- raise RuntimeError(f'Building {VENDOR} requires Cython >= {required_version}')
+ cython_path = Cython.__file__
+ raise RuntimeError(f'Building {VENDOR} requires Cython >= {required_version}'
+ f', found {cython_version} at {cython_path}')
subprocess.check_call(
[sys.executable, '-m', 'cython'] + flags + ["-o", tofile, fromfile])