From 898519991b24cf4f42fcda24258e1831c2903a75 Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 26 Mar 2017 12:46:24 +0200 Subject: [PATCH 1/2] Recipe for Pymunk --- pythonforandroid/recipes/pymunk/__init__.py | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pythonforandroid/recipes/pymunk/__init__.py diff --git a/pythonforandroid/recipes/pymunk/__init__.py b/pythonforandroid/recipes/pymunk/__init__.py new file mode 100644 index 0000000000..215401335a --- /dev/null +++ b/pythonforandroid/recipes/pymunk/__init__.py @@ -0,0 +1,25 @@ +from pythonforandroid.toolchain import PythonRecipe +from pythonforandroid.toolchain import CythonRecipe +from pythonforandroid.recipe import CompiledComponentsPythonRecipe +from pythonforandroid.logger import info + +import os.path + +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'] + 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) + return env + +recipe = PymunkRecipe() From 4b538e77bc32389d31d8821179cc70b1cc0a3c8d Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 26 Mar 2017 20:53:15 +0200 Subject: [PATCH 2/2] fix inconsistent whitespace --- pythonforandroid/recipes/pymunk/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/pymunk/__init__.py b/pythonforandroid/recipes/pymunk/__init__.py index 215401335a..73e4b78656 100644 --- a/pythonforandroid/recipes/pymunk/__init__.py +++ b/pythonforandroid/recipes/pymunk/__init__.py @@ -17,7 +17,7 @@ def get_recipe_env(self, 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'] += " -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) return env