Skip to content

Commit e8e4fb1

Browse files
committed
Use Kivy setup.py flag instead of rmtree
1 parent 06f981f commit e8e4fb1

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pythonforandroid/recipes/kivy/__init__.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
from pythonforandroid.toolchain import CythonRecipe, shprint, current_directory, ArchARM
3-
from os.path import exists, join, isdir
4-
from shutil import rmtree
3+
from os.path import exists, join
54
import sh
65
import glob
76

@@ -35,6 +34,7 @@ def get_recipe_env(self, arch):
3534
env = super(KivyRecipe, self).get_recipe_env(arch)
3635
if 'sdl2' in self.ctx.recipe_build_order:
3736
env['USE_SDL2'] = '1'
37+
env['KIVY_SPLIT_EXAMPLES'] = '1'
3838
env['KIVY_SDL2_PATH'] = ':'.join([
3939
join(self.ctx.bootstrap.build_dir, 'jni', 'SDL', 'include'),
4040
join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_image'),
@@ -44,11 +44,4 @@ def get_recipe_env(self, arch):
4444

4545
return env
4646

47-
def install_python_package(self, arch):
48-
super(KivyRecipe, self).install_python_package(arch)
49-
site_packages_dir = self.ctx.get_site_packages_dir(arch)
50-
usr_dir = join(site_packages_dir, 'usr', 'share', 'kivy-examples')
51-
if exists(usr_dir) and isdir(usr_dir):
52-
rmtree(usr_dir)
53-
5447
recipe = KivyRecipe()

0 commit comments

Comments
 (0)