Skip to content
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

[CORE UPDATE - PART IX] Pymunk for both versions of python and enhance flags #1550

Merged
merged 2 commits into from
Jan 15, 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
10 changes: 5 additions & 5 deletions pythonforandroid/recipes/pymunk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
from os.path import join
from pythonforandroid.recipe import CompiledComponentsPythonRecipe


class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = '5.2.0'
url = 'https://pypi.python.org/packages/5e/bd/e67edcffdee3d0a1e3ebf0050bb9746a61d616f5502ceedddf0f7fd0a896/pymunk-5.2.0.zip'
depends = [('python2', 'python3crystax'), 'cffi', 'setuptools']
depends = ['cffi', 'setuptools']
call_hostpython_via_targetpython = False

def get_recipe_env(self, arch):
env = super(PymunkRecipe, self).get_recipe_env(arch)
env['PYTHON_ROOT'] = self.ctx.get_python_install_dir()
arch_noeabi = arch.arch.replace('eabi', '')
env['LDFLAGS'] += " -shared -llog"
env['LDFLAGS'] += " -landroid -lpython2.7"
env['LDFLAGS'] += " --sysroot={ctx.ndk_dir}/platforms/android-{ctx.android_api}/arch-{arch_noeabi}".format(
ctx=self.ctx, arch_noeabi=arch_noeabi)
env['LDFLAGS'] += ' -L{}'.format(join(self.ctx.ndk_platform, 'usr', 'lib'))
env['LDFLAGS'] += " --sysroot={}".format(self.ctx.ndk_platform)
env['LIBS'] = env.get('LIBS', '') + ' -landroid'
return env


Expand Down