File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
pythonforandroid/recipes/pymunk Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ from pythonforandroid .toolchain import PythonRecipe
2+ from pythonforandroid .toolchain import CythonRecipe
3+ from pythonforandroid .recipe import CompiledComponentsPythonRecipe
4+ from pythonforandroid .logger import info
5+
6+ import os .path
7+
8+ class PymunkRecipe (CompiledComponentsPythonRecipe ):
9+ name = "pymunk"
10+ version = '5.2.0'
11+ url = 'https://pypi.python.org/packages/5e/bd/e67edcffdee3d0a1e3ebf0050bb9746a61d616f5502ceedddf0f7fd0a896/pymunk-5.2.0.zip'
12+ depends = [('python2' , 'python3crystax' ), 'cffi' , 'setuptools' ]
13+ call_hostpython_via_targetpython = False
14+
15+ def get_recipe_env (self , arch ):
16+ env = super (PymunkRecipe , self ).get_recipe_env (arch )
17+ env ['PYTHON_ROOT' ] = self .ctx .get_python_install_dir ()
18+ arch_noeabi = arch .arch .replace ('eabi' , '' )
19+ env ['LDFLAGS' ] += " -shared -llog"
20+ env ['LDFLAGS' ] += " -landroid -lpython2.7"
21+ env ['LDFLAGS' ] += " --sysroot={ctx.ndk_dir}/platforms/android-{ctx.android_api}/arch-{arch_noeabi}" .format (
22+ ctx = self .ctx , arch_noeabi = arch_noeabi )
23+ return env
24+
25+ recipe = PymunkRecipe ()
You can’t perform that action at this time.
0 commit comments