11from pythonforandroid .recipe import Recipe , MesonRecipe
2- from pythonforandroid .logger import error
32from os .path import join
43import shutil
54
65NUMPY_NDK_MESSAGE = "In order to build numpy, you must set minimum ndk api (minapi) to `24`.\n "
76
87
98class NumpyRecipe (MesonRecipe ):
10- version = 'v1.26.5 '
9+ version = 'v2.3.0 '
1110 url = 'git+https://github.com/numpy/numpy'
12- hostpython_prerequisites = ["Cython>=3.0.6" ] # meson does not detects venv's cython
11+ hostpython_prerequisites = ["Cython>=3.0.6" , "numpy" ] # meson does not detects venv's cython
1312 extra_build_args = ['-Csetup-args=-Dblas=none' , '-Csetup-args=-Dlapack=none' ]
1413 need_stl_shared = True
14+ min_ndk_api_support = 24
1515
1616 def get_recipe_meson_options (self , arch ):
1717 options = super ().get_recipe_meson_options (arch )
@@ -36,13 +36,6 @@ def get_recipe_env(self, arch, **kwargs):
3636 "python3" , self .ctx ).get_build_dir (arch .arch ), "android-build" , "python" )
3737 return env
3838
39- def download_if_necessary (self ):
40- # NumPy requires complex math functions which were added in api 24
41- if self .ctx .ndk_api < 24 :
42- error (NUMPY_NDK_MESSAGE )
43- exit (1 )
44- super ().download_if_necessary ()
45-
4639 def build_arch (self , arch ):
4740 super ().build_arch (arch )
4841 self .restore_hostpython_prerequisites (["cython" ])
0 commit comments