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
2285a087
Commit
2285a087
authored
Apr 21, 2015
by
Jeroen Demeyer
Committed by
Stefan Behnel
Apr 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When merging a transitive_list, copy the list
parent
8b142e8e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
6 deletions
+39
-6
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+6
-6
tests/compile/distutils_libraries_T845.srctree
tests/compile/distutils_libraries_T845.srctree
+33
-0
No files found.
Cython/Build/Dependencies.py
View file @
2285a087
...
@@ -216,11 +216,12 @@ class DistutilsInfo(object):
...
@@ -216,11 +216,12 @@ class DistutilsInfo(object):
self
.
values
[
key
]
=
value
self
.
values
[
key
]
=
value
elif
type
is
transitive_list
:
elif
type
is
transitive_list
:
if
key
in
self
.
values
:
if
key
in
self
.
values
:
all
=
self
.
values
[
key
]
# Change a *copy* of the list (Trac #845)
all
=
self
.
values
[
key
][:]
for
v
in
value
:
for
v
in
value
:
if
v
not
in
all
:
if
v
not
in
all
:
all
.
append
(
v
)
all
.
append
(
v
)
else
:
value
=
all
self
.
values
[
key
]
=
value
self
.
values
[
key
]
=
value
return
self
return
self
...
@@ -250,8 +251,7 @@ class DistutilsInfo(object):
...
@@ -250,8 +251,7 @@ class DistutilsInfo(object):
for
key
,
value
in
self
.
values
.
items
():
for
key
,
value
in
self
.
values
.
items
():
type
=
distutils_settings
[
key
]
type
=
distutils_settings
[
key
]
if
type
in
[
list
,
transitive_list
]:
if
type
in
[
list
,
transitive_list
]:
getattr
(
extension
,
key
).
extend
(
value
)
value
=
getattr
(
extension
,
key
)
+
list
(
value
)
else
:
setattr
(
extension
,
key
,
value
)
setattr
(
extension
,
key
,
value
)
@
cython
.
locals
(
start
=
long
,
q
=
long
,
single_q
=
long
,
double_q
=
long
,
hash_mark
=
long
,
@
cython
.
locals
(
start
=
long
,
q
=
long
,
single_q
=
long
,
double_q
=
long
,
hash_mark
=
long
,
...
...
tests/compile/distutils_libraries_T845.srctree
0 → 100644
View file @
2285a087
PYTHON setup.py build_ext --inplace
######## setup.py ########
from Cython.Build import cythonize
from Cython.Distutils.extension import Extension
ext_modules = [
Extension("a", ["a.pyx"]),
Extension("x", ["x.pyx"]),
Extension("y", ["y.pyx"]),
]
ext_modules = cythonize(ext_modules)
assert ext_modules[1].libraries == ["lib_x"]
assert ext_modules[2].libraries == ["lib_y"]
######## libx.pxd ########
# distutils: libraries = lib_x
######## liby.pxd ########
# distutils: libraries = lib_y
######## a.pyx ########
cimport libx
cimport liby
######## x.pyx ########
cimport libx
######## y.pyx ########
cimport liby
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