Created
January 6, 2019 15:54
-
-
Save opacam/10cef1ca8182a39b9e5ebffe0adcdc90 to your computer and use it in GitHub Desktop.
Fix linkage problems with python3's versioned library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: pythonforandroid/recipes/python3/__init__.py | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- pythonforandroid/recipes/python3/__init__.py (revision Local Version) | |
+++ pythonforandroid/recipes/python3/__init__.py (revision Shelved Version) | |
@@ -169,7 +169,13 @@ | |
exec_prefix=sys_exec_prefix)).split(' '), _env=env) | |
if not exists('python'): | |
- shprint(sh.make, 'all', _env=env) | |
+ py_version = self.major_minor_version_string | |
+ if self.major_minor_version_string[0] == '3': | |
+ py_version += 'm' | |
+ shprint(sh.make, 'all', | |
+ 'INSTSONAME=libpython{version}.so'.format( | |
+ version=py_version), | |
+ _env=env) | |
# TODO: Look into passing the path to pyconfig.h in a | |
# better way, although this is probably acceptable | |
@@ -224,10 +230,6 @@ | |
join(python_build_dir, | |
'libpython{}m.so'.format(self.major_minor_version_string)), | |
'libs/{}'.format(arch.arch)) | |
- shprint(sh.cp, | |
- join(python_build_dir, | |
- 'libpython{}m.so.1.0'.format(self.major_minor_version_string)), | |
- 'libs/{}'.format(arch.arch)) | |
info('Renaming .so files to reflect cross-compile') | |
self.reduce_object_file_names(join(dirn, 'site-packages')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment