Skip to content

fixed #1184 - now cython gets -L of NDK's libraries #1310

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

Closed
wants to merge 1 commit into from
Closed
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
21 changes: 21 additions & 0 deletions pythonforandroid/recipes/cymunk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,26 @@ class CymunkRecipe(CythonRecipe):

depends = [('python2', 'python3crystax')]

def get_recipe_env(self, arch):
"""
cython has problem with -lpython3.5m , hack to add -L to it

roughly adapted from similar numpy (fix-numpy branch) dirty solution
"""

env = super(CymunkRecipe, self).get_recipe_env(arch)
#: Hack add path L to crystax as a CFLAG

if 'python3crystax' not in self.ctx.recipe_build_order:
return env

api_ver = self.ctx.android_api

flags = " -L{ctx.ndk_dir}/sources/python/3.5/libs/{arch}/"\
Copy link
Member

Choose a reason for hiding this comment

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

Could you rely on the Python version rather than hardcoding 3.5? Because it could also be 3.6 for instance.

.format(ctx=self.ctx, arch=arch.arch)
env['LDFLAGS'] += flags

return env


recipe = CymunkRecipe()