Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3fea61f

Browse filesBrowse files
authored
Merge pull request #14410 from charris/remove-cython-fallback
BLD: Only allow using Cython module when cythonizing.
2 parents f786041 + 393a3a4 commit 3fea61f
Copy full SHA for 3fea61f

File tree

Expand file treeCollapse file tree

1 file changed

+4
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-7
lines changed

‎tools/cythonize.py

Copy file name to clipboardExpand all lines: tools/cythonize.py
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,10 @@ def process_pyx(fromfile, tofile):
6060
# try the cython in the installed python first (somewhat related to scipy/scipy#2397)
6161
from Cython.Compiler.Version import version as cython_version
6262
except ImportError:
63-
# if that fails, use the one on the path, which might be the wrong version
64-
try:
65-
# Try the one on the path as a last resort
66-
subprocess.check_call(
67-
['cython'] + flags + ["-o", tofile, fromfile])
68-
except OSError:
69-
raise OSError('Cython needs to be installed')
63+
# The `cython` command need not point to the version installed in the
64+
# Python running this script, so raise an error to avoid the chance of
65+
# using the wrong version of Cython.
66+
raise OSError('Cython needs to be installed in Python as a module')
7067
else:
7168
# check the version, and invoke through python
7269
from distutils.version import LooseVersion

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.