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
Gwenaël Samain
cython
Commits
92fffbfb
Commit
92fffbfb
authored
Oct 27, 2018
by
bweigel
Committed by
Kryštof Pilnáček
Nov 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial starting point for fix
parent
46cc2008
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 @
92fffbfb
...
...
@@ -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
...
...
tests/run/cimport.srctree
View file @
92fffbfb
...
...
@@ -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
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