Skip to content

Instantly share code, notes, and snippets.

@opacam
Created January 6, 2019 15:54
Show Gist options
  • Save opacam/10cef1ca8182a39b9e5ebffe0adcdc90 to your computer and use it in GitHub Desktop.
Save opacam/10cef1ca8182a39b9e5ebffe0adcdc90 to your computer and use it in GitHub Desktop.
Fix linkage problems with python3's versioned library
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