-
Notifications
You must be signed in to change notification settings - Fork 1.9k
update
: numpy, pandas, sdl2
#3164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
from pythonforandroid.recipe import Recipe, MesonRecipe | ||
from pythonforandroid.logger import error | ||
from os.path import join | ||
import shutil | ||
|
||
NUMPY_NDK_MESSAGE = "In order to build numpy, you must set minimum ndk api (minapi) to `24`.\n" | ||
|
||
|
||
class NumpyRecipe(MesonRecipe): | ||
version = 'v1.26.5' | ||
version = 'v2.3.0' | ||
url = 'git+https://github.com/numpy/numpy' | ||
hostpython_prerequisites = ["Cython>=3.0.6"] # meson does not detects venv's cython | ||
hostpython_prerequisites = ["Cython==3.0.6"] # meson does not detects venv's cython | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have to be that restrictive? Maybe it doesn't work with too recents Cython versions, but in this case maybe we should use a range at least |
||
extra_build_args = ['-Csetup-args=-Dblas=none', '-Csetup-args=-Dlapack=none'] | ||
need_stl_shared = True | ||
min_ndk_api_support = 24 | ||
|
||
def get_recipe_meson_options(self, arch): | ||
options = super().get_recipe_meson_options(arch) | ||
|
@@ -36,13 +36,6 @@ def get_recipe_env(self, arch, **kwargs): | |
"python3", self.ctx).get_build_dir(arch.arch), "android-build", "python") | ||
return env | ||
|
||
def download_if_necessary(self): | ||
# NumPy requires complex math functions which were added in api 24 | ||
if self.ctx.ndk_api < 24: | ||
error(NUMPY_NDK_MESSAGE) | ||
exit(1) | ||
super().download_if_necessary() | ||
Comment on lines
-39
to
-44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh OK I see what you did there by moving it to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did this because it was also required in |
||
|
||
def build_arch(self, arch): | ||
super().build_arch(arch) | ||
self.restore_hostpython_prerequisites(["cython"]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, shouldn't we leverage
pythonforandroid/recommendations.py
?Maybe @misl6 has better insights