8000 Fix linkage problems with python's versioned library (reintroduce `INSTSONAME`) by opacam · Pull Request #1568 · kivy/python-for-android · GitHub
[go: up one dir, main page]

Skip to content
8000

Fix linkage problems with python's versioned library (reintroduce INSTSONAME) #1568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions pythonforandroid/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,12 @@ def build_arch(self, arch):
_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(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after discussion this looks like the right way to do it! I think this is a good change

version=py_version), _env=env)

# TODO: Look into passing the path to pyconfig.h in a
# better way, although this is probably acceptable
Expand Down Expand Up @@ -291,9 +296,8 @@ def create_python_bundle(self, dirn, arch):
python_lib_name = 'libpython' + self.major_minor_version_string
if self.major_minor_version_string[0] == '3':
python_lib_name += 'm'
for lib in [python_lib_name + '.so', python_lib_name + '.so.1.0']:
shprint(sh.cp, join(python_build_dir, lib),
'libs/{}'.format(arch.arch))
shprint(sh.cp, join(python_build_dir, python_lib_name + '.so'),
'libs/{}'.format(arch.arch))

info('Renaming .so files to reflect cross-compile')
self.reduce_object_file_names(join(dirn, 'site-packages'))
Expand Down
0