Skip to content

Commit bdf81ee

Browse files
committed
Delete the kivy-examples dir from the dist under python3
Unlike the python2 build, this dir is automatically included in site-packages.
1 parent bd52448 commit bdf81ee

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pythonforandroid/recipes/kivy/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

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

@@ -43,4 +44,12 @@ def get_recipe_env(self, arch):
4344

4445
return env
4546

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+
print('usr_dir is', usr_dir)
52+
if exists(usr_dir) and isdir(usr_dir):
53+
rmtree(usr_dir)
54+
4655
recipe = KivyRecipe()

0 commit comments

Comments
 (0)