Commit ff88c735 authored by bweigel's avatar bweigel Committed by Stefan Behnel

initial starting point for fix

parent 60fd64bb
...@@ -168,6 +168,13 @@ def search_include_directories(dirs, qualified_name, suffix, pos, ...@@ -168,6 +168,13 @@ def search_include_directories(dirs, qualified_name, suffix, pos,
package_filename) package_filename)
if path_exists(path): if path_exists(path):
return path return path
inits = {"__init__.py", "__init__.pyx", "__init__.pxd"} - {package_filename}
paths = [os.path.join(dir, package_dir, module_name,
init_filename) for init_filename in inits]
if any(path_exists(p) for p in paths):
path = os.path.join(dir, package_dir, module_name, 'sub.pxd')
if path_exists(path):
return path
return None return None
......
...@@ -33,6 +33,12 @@ cdef int foo(int a): ...@@ -33,6 +33,12 @@ cdef int foo(int a):
ctypedef int my_int ctypedef int my_int
######## pkg/subpkg/__init__.py ########
######## pkg/subpkg/submod.pxd ########
ctypedef int my_int
######## a.pyx ######## ######## a.pyx ########
from other cimport A, foo from other cimport A, foo
...@@ -43,3 +49,5 @@ print other.A, other.foo(10) ...@@ -43,3 +49,5 @@ print other.A, other.foo(10)
from pkg cimport sub from pkg cimport sub
cdef sub.my_int a = 100 cdef sub.my_int a = 100
from pkg.subpkg cimport submod
\ No newline at end of file
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