Skip to content

Commit

Permalink
Merge pull request #1026 from viblo/master
Browse files Browse the repository at this point in the history
Recipe for Pymunk
  • Loading branch information
inclement committed Mar 27, 2017
2 parents 2952f5d + 4b538e7 commit 7ccb512
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pythonforandroid/recipes/pymunk/__init__.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 7ccb512

Please sign in to comment.