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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
2eab8206
Commit
2eab8206
authored
Apr 21, 2015
by
Jeroen Demeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When merging a transitive_list, copy the list
parent
3719264b
Changes
2
Hide 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 @
2eab8206
...
...
@@ -216,12 +216,13 @@ class DistutilsInfo(object):
self
.
values
[
key
]
=
value
elif
type
is
transitive_list
:
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
:
if
v
not
in
all
:
all
.
append
(
v
)
else
:
self
.
values
[
key
]
=
value
value
=
all
self
.
values
[
key
]
=
value
return
self
def
subs
(
self
,
aliases
):
...
...
@@ -250,9 +251,8 @@ class DistutilsInfo(object):
for
key
,
value
in
self
.
values
.
items
():
type
=
distutils_settings
[
key
]
if
type
in
[
list
,
transitive_list
]:
getattr
(
extension
,
key
).
extend
(
value
)
else
:
setattr
(
extension
,
key
,
value
)
value
=
getattr
(
extension
,
key
)
+
list
(
value
)
setattr
(
extension
,
key
,
value
)
@
cython
.
locals
(
start
=
long
,
q
=
long
,
single_q
=
long
,
double_q
=
long
,
hash_mark
=
long
,
end
=
long
,
k
=
long
,
counter
=
long
,
quote_len
=
long
)
...
...
tests/compile/distutils_libraries_T845.srctree
0 → 100644
View file @
2eab8206
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