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,
package_filename)
if path_exists(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
......
......@@ -33,6 +33,12 @@ cdef int foo(int a):
ctypedef int my_int
######## pkg/subpkg/__init__.py ########
######## pkg/subpkg/submod.pxd ########
ctypedef int my_int
######## a.pyx ########
from other cimport A, foo
......@@ -43,3 +49,5 @@ print other.A, other.foo(10)
from pkg cimport sub
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