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
Xavier Thompson
cython
Commits
a57ff372
Commit
a57ff372
authored
Feb 20, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor clarifications.
parent
37ef43ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+4
-4
Cython/Utils.py
Cython/Utils.py
+1
-1
No files found.
Cython/Build/Dependencies.py
View file @
a57ff372
...
@@ -46,11 +46,11 @@ from distutils.extension import Extension
...
@@ -46,11 +46,11 @@ from distutils.extension import Extension
from
..
import
Utils
from
..
import
Utils
from
..Utils
import
(
cached_function
,
cached_method
,
path_exists
,
from
..Utils
import
(
cached_function
,
cached_method
,
path_exists
,
safe_makedirs
,
copy_file_to_dir_if_
changed
,
is_package_dir
)
safe_makedirs
,
copy_file_to_dir_if_
newer
,
is_package_dir
)
from
..Compiler.Main
import
Context
,
CompilationOptions
,
default_options
from
..Compiler.Main
import
Context
,
CompilationOptions
,
default_options
join_path
=
cached_function
(
os
.
path
.
join
)
join_path
=
cached_function
(
os
.
path
.
join
)
copy_once
=
cached_function
(
copy_file_to_dir_if_changed
)
copy_once
_if_newer
=
cached_function
(
copy_file_to_dir_if_newer
)
safe_makedirs_once
=
cached_function
(
safe_makedirs
)
safe_makedirs_once
=
cached_function
(
safe_makedirs
)
if
sys
.
version_info
[
0
]
<
3
:
if
sys
.
version_info
[
0
]
<
3
:
...
@@ -789,7 +789,7 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False,
...
@@ -789,7 +789,7 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False,
to_compile
=
[]
to_compile
=
[]
for
m
in
module_list
:
for
m
in
module_list
:
if
build_dir
:
if
build_dir
:
root
=
os
.
getcwd
()
root
=
os
.
getcwd
()
# distutil extension depends are relative to cwd
def
copy_to_build_dir
(
filepath
,
root
=
root
):
def
copy_to_build_dir
(
filepath
,
root
=
root
):
filepath_abs
=
os
.
path
.
abspath
(
filepath
)
filepath_abs
=
os
.
path
.
abspath
(
filepath
)
if
os
.
path
.
isabs
(
filepath
):
if
os
.
path
.
isabs
(
filepath
):
...
@@ -797,7 +797,7 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False,
...
@@ -797,7 +797,7 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False,
if
filepath_abs
.
startswith
(
root
):
if
filepath_abs
.
startswith
(
root
):
mod_dir
=
join_path
(
build_dir
,
mod_dir
=
join_path
(
build_dir
,
os
.
path
.
dirname
(
_relpath
(
filepath
,
root
)))
os
.
path
.
dirname
(
_relpath
(
filepath
,
root
)))
copy_once
(
filepath_abs
,
mod_dir
)
copy_once
_if_newer
(
filepath_abs
,
mod_dir
)
for
dep
in
m
.
depends
:
for
dep
in
m
.
depends
:
copy_to_build_dir
(
dep
)
copy_to_build_dir
(
dep
)
...
...
Cython/Utils.py
View file @
a57ff372
...
@@ -94,7 +94,7 @@ def safe_makedirs(path):
...
@@ -94,7 +94,7 @@ def safe_makedirs(path):
raise
raise
def
copy_file_to_dir_if_
changed
(
sourcefile
,
destdir
):
def
copy_file_to_dir_if_
newer
(
sourcefile
,
destdir
):
"""
"""
Copy file sourcefile to directory destdir (creating it if needed),
Copy file sourcefile to directory destdir (creating it if needed),
preserving metadata. If the destination file exists and is not
preserving metadata. If the destination file exists and is not
...
...
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