Skip to content

Commit 2b5960e

Browse files
committed
[dist] Fix Recipe.clean_build for BootstrapNDKRecipe
1 parent 7a0bf03 commit 2b5960e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pythonforandroid/recipe.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,21 @@ class BootstrapNDKRecipe(Recipe):
758758

759759
dir_name = None # The name of the recipe build folder in the jni dir
760760

761+
def clean_build(self, arch=None):
762+
# we must set python recipe first or `get_recipe_env` will fail
763+
self.ctx.python_recipe = Recipe.get_recipe(
764+
'python3'
765+
if 'python3' in self.ctx.recipe_build_order
766+
else 'python2',
767+
self.ctx,
768+
)
769+
for arch in self.ctx.archs if not arch else [arch]:
770+
env = self.get_recipe_env(arch)
771+
# to clean sdl2 recipe, we also needs below to set nel variable
772+
env['APP_ALLOW_MISSING_DEPS'] = 'true'
773+
with current_directory(self.get_build_dir(arch.arch)):
774+
shprint(sh.ndk_build, 'clean', _env=env)
775+
761776
def get_build_container_dir(self, arch):
762777
return self.get_jni_dir()
763778

0 commit comments

Comments
 (0)