File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
pythonforandroid/recipes/python3 Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
from pythonforandroid .recipe import TargetPythonRecipe
2
2
from pythonforandroid .toolchain import shprint , current_directory
3
- from pythonforandroid .logger import logger , info
3
+ from pythonforandroid .logger import logger , info , error
4
4
from pythonforandroid .util import ensure_dir , walk_valid_filens
5
5
from os .path import exists , join , dirname
6
6
from os import environ
@@ -39,9 +39,16 @@ class Python3Recipe(TargetPythonRecipe):
39
39
40
40
depends = ['hostpython3' ]
41
41
conflicts = ['python3crystax' , 'python2' ]
42
- # opt_depends = ['openssl', 'sqlite3']
42
+
43
+ # This recipe can be built only against API 21+
44
+ MIN_NDK_API = 21
43
45
44
46
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
+
45
52
recipe_build_dir = self .get_build_dir (arch .arch )
46
53
47
54
# Create a subdirectory to actually perform the build
You can’t perform that action at this time.
0 commit comments