Commit 5ae0b7cc authored by Robert Bradshaw's avatar Robert Bradshaw Committed by GitHub

Prohibit naming a module cython.

This causes the compiler to get confused and reuse the magic `cimport cython` module. See #2057.
parent 7210462c
......@@ -785,6 +785,9 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
print("Warning: Extension name '%s' does not match fully qualified name '%s' of '%s'" % (
name, module_name, file))
module_name = name
if module_name == 'cython':
raise ValueError('cython is a special module, cannot be used as a module name')
if module_name not in seen:
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment