Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
ff88c735
Commit
ff88c735
authored
Oct 27, 2018
by
bweigel
Committed by
Stefan Behnel
Nov 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial starting point for fix
parent
60fd64bb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
Cython/Utils.py
Cython/Utils.py
+7
-0
tests/run/cimport.srctree
tests/run/cimport.srctree
+8
-0
No files found.
Cython/Utils.py
View file @
ff88c735
...
@@ -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
...
...
tests/run/cimport.srctree
View file @
ff88c735
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment