diff --git a/pythonforandroid/recipe.py b/pythonforandroid/recipe.py index 51aa8323b..12847ca4d 100644 --- a/pythonforandroid/recipe.py +++ b/pythonforandroid/recipe.py @@ -945,6 +945,9 @@ def folder_name(self): return name def get_recipe_env(self, arch=None, with_flags_in_cc=True): + if self._host_recipe is None: + self._host_recipe = Recipe.get_recipe("hostpython3", self.ctx) + env = super().get_recipe_env(arch, with_flags_in_cc) # Set the LANG, this isn't usually important but is a better default # as it occasionally matters how Python e.g. reads files diff --git a/pythonforandroid/recipes/python3/__init__.py b/pythonforandroid/recipes/python3/__init__.py index d43fe851b..a403e89e4 100644 --- a/pythonforandroid/recipes/python3/__init__.py +++ b/pythonforandroid/recipes/python3/__init__.py @@ -83,7 +83,7 @@ class Python3Recipe(TargetPythonRecipe): ] - depends = ['hostpython3', 'sqlite3', 'openssl', 'libffi', 'libbz2', 'liblzma', 'libb2', 'util-linux'] + depends = ['hostpython3', 'sqlite3', 'openssl', 'libffi', 'libbz2', 'liblzma', 'util-linux'] configure_args = [ '--host={android_host}', @@ -94,6 +94,7 @@ class Python3Recipe(TargetPythonRecipe): '--without-ensurepip', '--without-static-libpython', '--without-readline', + '--with-builtin-hashlib-hashes=md5,sha1,sha2,sha3', # Android prefix '--prefix={prefix}', @@ -378,7 +379,9 @@ def create_python_bundle(self, dirn, arch): self.get_build_dir(arch.arch), 'android-build', 'build', - 'lib.linux{}-{}-{}'.format( + 'lib.{}{}-{}-{}'.format( + # android is now supported platform + "android" if self._p_version >= Version("3.13") else "linux", '2' if self.version[0] == '2' else '', arch.command_prefix.split('-')[0], self.major_minor_version_string