Skip to content
Open
Show file tree
Hide file tree
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
34 changes: 34 additions & 0 deletions modules/recipes/kivent_core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from pythonforandroid.recipe import CythonRecipe
from os.path import join


class KiventCoreRecipe(CythonRecipe):
version = 'master'
url = 'https://github.com/kivy/kivent/archive/{version}.zip'
name = 'kivent_core'

depends = ['kivy']

subbuilddir = False

def get_recipe_env(self, arch, with_flags_in_cc=True):
env = super(KiventCoreRecipe, self).get_recipe_env(
arch, with_flags_in_cc=with_flags_in_cc)
env['CYTHONPATH'] = self.get_recipe(
'kivy', self.ctx).get_build_dir(arch.arch)
return env

def get_build_dir(self, arch, sub=False):
builddir = super(KiventCoreRecipe, self).get_build_dir(arch)
if sub or self.subbuilddir:
return join(builddir, 'modules', 'core')
else:
return builddir

def build_arch(self, arch):
self.subbuilddir = True
super(KiventCoreRecipe, self).build_arch(arch)
self.subbuilddir = False


recipe = KiventCoreRecipe()
34 changes: 0 additions & 34 deletions modules/recipes/kivent_core/recipe.sh

This file was deleted.

32 changes: 32 additions & 0 deletions modules/recipes/kivent_cymunk/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from pythonforandroid.recipe import CythonRecipe
from os.path import join


class KiventCymunkRecipe(CythonRecipe):
name = 'kivent_cymunk'

depends = ['kivent_core', 'cymunk']

subbuilddir = False

def get_recipe_env(self, arch, with_flags_in_cc=True):
env = super(KiventCymunkRecipe, self).get_recipe_env(
arch, with_flags_in_cc=with_flags_in_cc)
cymunk = self.get_recipe('cymunk', self.ctx).get_build_dir(arch.arch)
env['PYTHONPATH'] = join(cymunk, 'cymunk', 'python')
kivy = self.get_recipe('kivy', self.ctx).get_build_dir(arch.arch)
kivent = self.get_recipe('kivent_core',
self.ctx).get_build_dir(arch.arch, sub=True)
env['CYTHONPATH'] = ':'.join((kivy, cymunk, kivent))
return env

def prepare_build_dir(self, arch):
'''No need to prepare, we'll use kivent_core'''
return

def get_build_dir(self, arch):
builddir = self.get_recipe('kivent_core', self.ctx).get_build_dir(arch)
return join(builddir, 'modules', 'cymunk')


recipe = KiventCymunkRecipe()
37 changes: 0 additions & 37 deletions modules/recipes/kivent_cymunk/recipe.sh

This file was deleted.

30 changes: 30 additions & 0 deletions modules/recipes/kivent_particles/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from pythonforandroid.recipe import CythonRecipe
from os.path import join


class KiventParticlesRecipe(CythonRecipe):
name = 'kivent_particles'

depends = ['kivent_core']

subbuilddir = False

def get_recipe_env(self, arch, with_flags_in_cc=True):
env = super(KiventParticlesRecipe, self).get_recipe_env(
arch, with_flags_in_cc=with_flags_in_cc)
kivy = self.get_recipe('kivy', self.ctx).get_build_dir(arch.arch)
kivent = self.get_recipe('kivent_core',
self.ctx).get_build_dir(arch.arch, sub=True)
env['CYTHONPATH'] = ':'.join((kivy, kivent))
return env

def prepare_build_dir(self, arch):
'''No need to prepare, we'll use kivent_core'''
return

def get_build_dir(self, arch):
builddir = self.get_recipe('kivent_core', self.ctx).get_build_dir(arch)
return join(builddir, 'modules', 'particles')


recipe = KiventParticlesRecipe()
35 changes: 0 additions & 35 deletions modules/recipes/kivent_particles/recipe.sh

This file was deleted.