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
39b1a034
Commit
39b1a034
authored
Feb 24, 2012
by
Bradley M. Froehle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Search for pxd files in sys.path.
parent
6f343d9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+5
-2
No files found.
Cython/Compiler/Main.py
View file @
39b1a034
...
...
@@ -182,7 +182,7 @@ class Context(object):
# the directory containing the source file is searched first
# for a dotted filename, and its containing package root
# directory is searched first for a non-dotted filename.
pxd
=
self
.
search_include_directories
(
qualified_name
,
".pxd"
,
pos
)
pxd
=
self
.
search_include_directories
(
qualified_name
,
".pxd"
,
pos
,
sys_path
=
True
)
if
pxd
is
None
:
# XXX Keep this until Includes/Deprecated is removed
if
(
qualified_name
.
startswith
(
'python'
)
or
qualified_name
in
(
'stdlib'
,
'stdio'
,
'stl'
)):
...
...
@@ -221,13 +221,16 @@ class Context(object):
return
path
def
search_include_directories
(
self
,
qualified_name
,
suffix
,
pos
,
include
=
False
):
include
=
False
,
sys_path
=
False
):
# Search the list of include directories for the given
# file name. If a source file position is given, first
# searches the directory containing that file. Returns
# None if not found, but does not report an error.
# The 'include' option will disable package dereferencing.
# If 'sys_path' is True, also search sys.path.
dirs
=
self
.
include_directories
if
sys_path
:
dirs
=
dirs
+
sys
.
path
if
pos
:
file_desc
=
pos
[
0
]
if
not
isinstance
(
file_desc
,
FileSourceDescriptor
):
...
...
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