Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
736a36a6
Commit
736a36a6
authored
Apr 29, 2019
by
xdegaye
Committed by
Victor Stinner
Apr 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-21536: On Android, C extensions are linked to libpython (GH-12989)
parent
03ae9d8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
command/build_ext.py
command/build_ext.py
+15
-0
No files found.
command/build_ext.py
View file @
736a36a6
...
...
@@ -714,5 +714,20 @@ class build_ext(Command):
# don't extend ext.libraries, it may be shared with other
# extensions, it is a reference to the original list
return
ext
.
libraries
+
[
pythonlib
]
# On Android only the main executable and LD_PRELOADs are considered
# to be RTLD_GLOBAL, all the dependencies of the main executable
# remain RTLD_LOCAL and so the shared libraries must be linked with
# libpython when python is built with a shared python library (issue
# bpo-21536).
else
:
from
distutils.sysconfig
import
get_config_var
if
get_config_var
(
'Py_ENABLE_SHARED'
):
# Either a native build on an Android device or the
# cross-compilation of Python.
if
(
hasattr
(
sys
,
'getandroidapilevel'
)
or
(
'_PYTHON_HOST_PLATFORM'
in
os
.
environ
and
get_config_var
(
'ANDROID_API_LEVEL'
)
!=
0
)):
ldversion
=
get_config_var
(
'LDVERSION'
)
return
ext
.
libraries
+
[
'python'
+
ldversion
]
return
ext
.
libraries
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