Fix ticket #4, from package cimport module
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 2 Apr 2009 23:45:33 +0000 (16:45 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 2 Apr 2009 23:45:33 +0000 (16:45 -0700)
Cython/Compiler/Main.py

index 6fb867644cacf44a59dacdbb7de59863ec27a38e..a2cb780c06e99e4c580fcbfd457997db8976fb37 100644 (file)
@@ -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: