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
Boxiang Sun
cython
Commits
9df4e4e1
Commit
9df4e4e1
authored
May 10, 2013
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build_dir extended test case.
parent
d2081a55
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+4
-7
No files found.
Cython/Build/Dependencies.py
View file @
9df4e4e1
...
@@ -37,7 +37,7 @@ except ImportError:
...
@@ -37,7 +37,7 @@ except ImportError:
from
distutils.extension
import
Extension
from
distutils.extension
import
Extension
from
Cython
import
Utils
from
Cython
import
Utils
from
Cython.Utils
import
cached_function
,
cached_method
,
path_exists
from
Cython.Utils
import
cached_function
,
cached_method
,
path_exists
,
find_root_package_dir
from
Cython.Compiler.Main
import
Context
,
CompilationOptions
,
default_options
from
Cython.Compiler.Main
import
Context
,
CompilationOptions
,
default_options
join_path
=
cached_function
(
os
.
path
.
join
)
join_path
=
cached_function
(
os
.
path
.
join
)
...
@@ -312,13 +312,10 @@ def normalize_existing0(base_dir, rel_paths):
...
@@ -312,13 +312,10 @@ def normalize_existing0(base_dir, rel_paths):
normalized
.
append
(
rel
)
normalized
.
append
(
rel
)
return
normalized
return
normalized
def
resolve_depends
(
depends
,
include_dirs
,
base
):
def
resolve_depends
(
depends
,
include_dirs
):
include_dirs
=
tuple
(
include_dirs
)
include_dirs
=
tuple
(
include_dirs
)
resolved
=
[]
resolved
=
[]
for
depend
in
depends
:
for
depend
in
depends
:
if
path_exists
(
join_path
(
base
,
depend
)):
resolved
.
append
(
join_path
(
base
,
depend
))
continue
path
=
resolve_depend
(
depend
,
include_dirs
)
path
=
resolve_depend
(
depend
,
include_dirs
)
if
path
is
not
None
:
if
path
is
not
None
:
resolved
.
append
(
path
)
resolved
.
append
(
path
)
...
@@ -616,7 +613,7 @@ def create_extension_list(patterns, exclude=[], ctx=None, aliases=None, quiet=Fa
...
@@ -616,7 +613,7 @@ def create_extension_list(patterns, exclude=[], ctx=None, aliases=None, quiet=Fa
sources
.
append
(
source
)
sources
.
append
(
source
)
del
kwds
[
'sources'
]
del
kwds
[
'sources'
]
if
'depends'
in
kwds
:
if
'depends'
in
kwds
:
depends
=
resolve_depends
(
kwds
[
'depends'
],
kwds
.
get
(
'include_dirs'
)
or
[],
base
=
os
.
path
.
dirname
(
file
)
)
depends
=
resolve_depends
(
kwds
[
'depends'
],
(
kwds
.
get
(
'include_dirs'
)
or
[])
+
[
find_root_package_dir
(
file
)]
)
if
template
is
not
None
:
if
template
is
not
None
:
# Always include everything from the template.
# Always include everything from the template.
depends
=
list
(
set
(
template
.
depends
).
union
(
set
(
depends
)))
depends
=
list
(
set
(
template
.
depends
).
union
(
set
(
depends
)))
...
@@ -672,7 +669,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
...
@@ -672,7 +669,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
to_compile
=
[]
to_compile
=
[]
for
m
in
module_list
:
for
m
in
module_list
:
if
build_dir
:
if
build_dir
:
root
=
os
.
path
.
realpath
(
os
.
path
.
abspath
(
m
.
name
.
split
(
'.'
)[
0
]
))
root
=
os
.
path
.
realpath
(
os
.
path
.
abspath
(
find_root_package_dir
(
m
.
sources
[
0
])
))
def
copy_to_build_dir
(
filepath
,
root
=
root
):
def
copy_to_build_dir
(
filepath
,
root
=
root
):
filepath
=
os
.
path
.
abspath
(
filepath
)
filepath
=
os
.
path
.
abspath
(
filepath
)
if
os
.
path
.
realpath
(
filepath
).
startswith
(
root
):
if
os
.
path
.
realpath
(
filepath
).
startswith
(
root
):
...
...
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