lbry-android-sdk/p4a/pythonforandroid/recipes/pymunk/__init__.py

23 lines
814 B
Python
Raw Permalink Normal View History

from os.path import join
2017-08-13 03:24:00 +02:00
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = '5.3.2'
url = 'https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip'
depends = ['cffi', 'setuptools']
2017-08-13 03:24:00 +02:00
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()
env['LDFLAGS'] += " -shared -llog"
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'
2017-08-13 03:24:00 +02:00
return env
2017-08-13 03:24:00 +02:00
recipe = PymunkRecipe()