From 550bb60a2a9eb1589f045723045ddf44483ab346 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 2 Apr 2009 16:45:33 -0700 Subject: [PATCH] Fix ticket #4, from package cimport module --- Cython/Compiler/Main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index 6fb86764..a2cb780c 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -254,7 +254,11 @@ class Context(object): if debug_find_module: print("......found ", pxd_pathname) if not pxd_pathname and need_pxd: - error(pos, "'%s.pxd' not found" % module_name) + package_pathname = self.search_include_directories(module_name, ".py", pos) + if package_pathname and package_pathname.endswith('__init__.py'): + pass + else: + error(pos, "'%s.pxd' not found" % module_name) if pxd_pathname: try: if debug_find_module: -- 2.26.2