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
b0a428d4
Commit
b0a428d4
authored
Jul 14, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Included files dependency fix in cythonize.
parent
3d6d9687
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+7
-5
No files found.
Cython/Build/Dependencies.py
View file @
b0a428d4
...
...
@@ -330,7 +330,7 @@ class DependencyTree(object):
@
cached_method
def
included_files
(
self
,
filename
):
# This is messy because included files are textually included, resolving
# cimports (
and other
includes) relative to the including file.
# cimports (
but not
includes) relative to the including file.
all
=
set
()
for
include
in
self
.
parse_dependencies
(
filename
)[
1
]:
include_path
=
join_path
(
os
.
path
.
dirname
(
filename
),
include
)
...
...
@@ -340,20 +340,22 @@ class DependencyTree(object):
if
'.'
+
os
.
path
.
sep
in
include_path
:
include_path
=
os
.
path
.
normpath
(
include_path
)
all
.
add
(
include_path
)
all
.
update
(
self
.
included_files
(
include_path
))
else
:
print
(
"Unable to locate '%s' referenced from '%s'"
%
(
filename
,
include
))
return
all
@
cached_method
def
cimports_and_externs
(
self
,
filename
):
# This is really ugly. Nested cimports are resolved with respect to the
# includer, but includes are resolved with respect to the includee.
cimports
,
includes
,
externs
=
self
.
parse_dependencies
(
filename
)[:
3
]
cimports
=
set
(
cimports
)
externs
=
set
(
externs
)
for
include
in
self
.
included_files
(
filename
):
# include file recursion resolved by self.included_files(source_filename)
deps
=
self
.
parse_dependencies
(
filename
)
cimports
.
update
(
deps
[
0
])
externs
.
update
(
deps
[
2
])
included_cimports
,
included_externs
=
self
.
cimports_and_externs
(
include
)
cimports
.
update
(
included_cimports
)
externs
.
update
(
included_externs
)
return
tuple
(
cimports
),
normalize_existing
(
filename
,
externs
)
def
cimports
(
self
,
filename
):
...
...
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