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
657de8b7
Commit
657de8b7
authored
May 13, 2013
by
R. Andrew Ohana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add fix for in-tree symlinks, with updated test
parent
d5743eb3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+4
-2
tests/build/build_dir.srctree
tests/build/build_dir.srctree
+6
-0
No files found.
Cython/Build/Dependencies.py
View file @
657de8b7
...
...
@@ -671,8 +671,10 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
if
build_dir
:
root
=
os
.
path
.
realpath
(
os
.
path
.
abspath
(
find_root_package_dir
(
m
.
sources
[
0
])))
def
copy_to_build_dir
(
filepath
,
root
=
root
):
filepath
=
os
.
path
.
realpath
(
os
.
path
.
abspath
(
filepath
))
if
filepath
.
startswith
(
root
):
filepath_abs
=
os
.
path
.
realpath
(
os
.
path
.
abspath
(
filepath
))
if
os
.
path
.
isabs
(
filepath
):
filepath
=
filepath_abs
if
filepath_abs
.
startswith
(
root
):
mod_dir
=
os
.
path
.
join
(
build_dir
,
os
.
path
.
dirname
(
_relpath
(
filepath
,
root
)))
if
not
os
.
path
.
isdir
(
mod_dir
):
...
...
tests/build/build_dir.srctree
View file @
657de8b7
PYTHON -c "import os; os.symlink('subdir', 'fake')"
PYTHON setup.py build_ext --inplace
PYTHON -c "import a"
PYTHON -c "import pkg.b"
...
...
@@ -43,12 +44,16 @@ int value2 = 200;
######## pkg/b.pyx ########
cdef extern from "../fake/helper.h":
int value2
cdef extern from "pkg_helper.h":
int value3
cdef extern from "subdir/pkg_helper.h":
int value4
assert value2 == 200
assert value3 == 300
assert value4 == 400
...
...
@@ -72,5 +77,6 @@ assert not os.path.exists("a.c")
assert os.path.exists("scratchB/pkg/b.c")
assert os.path.exists("scratchB/pkg/pkg_helper.h")
assert os.path.exists("scratchB/pkg/subdir/pkg_helper.h")
assert os.path.exists("scratchB/fake/helper.h")
assert not os.path.exists("b.c")
assert not os.path.exists("pkg/b.c")
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