File tree Expand file tree Collapse file tree
pythonforandroid/recipes/python3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from pythonforandroid .recipe import TargetPythonRecipe
22from pythonforandroid .toolchain import shprint , current_directory
3- from pythonforandroid .logger import logger , info
3+ from pythonforandroid .logger import logger , info , error
44from pythonforandroid .util import ensure_dir , walk_valid_filens
55from os .path import exists , join , dirname
66from os import environ
@@ -39,9 +39,16 @@ class Python3Recipe(TargetPythonRecipe):
3939
4040 depends = ['hostpython3' ]
4141 conflicts = ['python3crystax' , 'python2' ]
42- # opt_depends = ['openssl', 'sqlite3']
42+
43+ # This recipe can be built only against API 21+
44+ MIN_NDK_API = 21
4345
4446 def build_arch (self , arch ):
47+ if self .ctx .ndk_api < self .MIN_NDK_API :
48+ error ('Target ndk-api is {}, but the python3 recipe supports only {}+' .format (
49+ self .ctx .ndk_api , self .MIN_NDK_API ))
50+ exit (1 )
51+
4552 recipe_build_dir = self .get_build_dir (arch .arch )
4653
4754 # Create a subdirectory to actually perform the build
You can’t perform that action at this time.
0 commit comments