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
3f44b92a
Commit
3f44b92a
authored
May 10, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build_dir copying in Py2.[45]
parent
0b4d290e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+17
-2
No files found.
Cython/Build/Dependencies.py
View file @
3f44b92a
...
...
@@ -18,6 +18,21 @@ try:
except
ImportError
:
import
md5
as
hashlib
try
:
from
os.path
import
relpath
as
_relpath
except
ImportError
:
# Py<2.6
def
_relpath
(
path
,
start
=
os
.
path
.
curdir
):
if
not
path
:
raise
ValueError
(
"no path specified"
)
start_list
=
os
.
path
.
abspath
(
start
).
split
(
os
.
path
.
sep
)
path_list
=
os
.
path
.
abspath
(
path
).
split
(
os
.
path
.
sep
)
i
=
len
(
os
.
path
.
commonprefix
([
start_list
,
path_list
]))
rel_list
=
[
os
.
path
.
pardir
]
*
(
len
(
start_list
)
-
i
)
+
path_list
[
i
:]
if
not
rel_list
:
return
os
.
path
.
curdir
return
os
.
path
.
join
(
*
rel_list
)
from
distutils.extension
import
Extension
...
...
@@ -660,8 +675,8 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
root
=
os
.
path
.
realpath
(
os
.
path
.
abspath
(
m
.
name
.
split
(
'.'
)[
0
]))
def
copy_to_build_dir
(
file
):
if
os
.
path
.
realpath
(
os
.
path
.
abspath
(
file
)).
startswith
(
root
):
dir
=
os
.
path
.
join
(
build_dir
,
os
.
path
.
dirname
(
os
.
path
.
relpath
(
file
)))
dir
=
os
.
path
.
join
(
build_dir
,
os
.
path
.
dirname
(
_
relpath
(
file
)))
if
not
os
.
path
.
isdir
(
dir
):
os
.
makedirs
(
dir
)
shutil
.
copy
(
file
,
dir
)
...
...
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