summaryrefslogtreecommitdiff
path: root/Cython/Compiler/Main.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2019-01-11 06:50:33 +0100
committerStefan Behnel <stefan_ml@behnel.de>2019-01-11 07:45:50 +0100
commitc8e03b35ed434430c84e212acaa409ce4cab5a4d (patch)
tree8464c15577f5cc3f7aa7608b31787d01afd6e338 /Cython/Compiler/Main.py
parentf00af64bcc2cef4c3fb1433ed670ab5f9970e2cd (diff)
downloadcython-gh2665_package_init_pyx.tar.gz
Use the same list of potential package init file names everywhere (not just "__init__.py" but also .pxd and .pyx).gh2665_package_init_pyx
Closes #2665.
Diffstat (limited to 'Cython/Compiler/Main.py')
-rw-r--r--Cython/Compiler/Main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py
index 9130fbf19..ab7a700bb 100644
--- a/Cython/Compiler/Main.py
+++ b/Cython/Compiler/Main.py
@@ -219,7 +219,7 @@ class Context(object):
# look for the non-existing pxd file next time.
scope.pxd_file_loaded = True
package_pathname = self.search_include_directories(qualified_name, ".py", pos)
- if package_pathname and package_pathname.endswith('__init__.py'):
+ if package_pathname and package_pathname.endswith(Utils.PACKAGE_FILES):
pass
else:
error(pos, "'%s.pxd' not found" % qualified_name.replace('.', os.sep))