Skip to content

Commit edea820

Browse files
committed
update: numpy, pandas, sdl2
1 parent be3de2e commit edea820

File tree

15 files changed

+33
-31
lines changed

15 files changed

+33
-31
lines changed

ci/makefiles/android.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Downloads and installs the Android SDK depending on supplied platform: darwin or linux
22

33
# Those android NDK/SDK variables can be override when running the file
4-
ANDROID_NDK_VERSION ?= 25b
4+
ANDROID_NDK_VERSION ?= 27c
55
ANDROID_NDK_VERSION_LEGACY ?= 21e
66
ANDROID_SDK_TOOLS_VERSION ?= 6514223
77
ANDROID_SDK_BUILD_TOOLS_VERSION ?= 29.0.3
88
ANDROID_HOME ?= $(HOME)/.android
9-
ANDROID_API_LEVEL ?= 27
9+
ANDROID_API_LEVEL ?= 33
1010

1111
# per OS dictionary-like
1212
UNAME_S := $(shell uname -s)

doc/source/quickstart.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ named ``tools``, and you will need to run extra commands to install
119119
the SDK packages needed.
120120

121121
For Android NDK, note that modern releases will only work on a 64-bit
122-
operating system. **The minimal, and recommended, NDK version to use is r25b:**
122+
operating system. **The minimal, and recommended, NDK version to use is r27c:**
123123

124124
- `Go to ndk downloads page <https://developer.android.com/ndk/downloads/>`_
125125
- Windows users should create a virtual machine with an GNU Linux os
@@ -154,7 +154,7 @@ variables necessary for building on android::
154154
# Adjust the paths!
155155
export ANDROIDSDK="$HOME/Documents/android-sdk-27"
156156
export ANDROIDNDK="$HOME/Documents/android-ndk-r23b"
157-
export ANDROIDAPI="27" # Target API version of your application
157+
export ANDROIDAPI="33" # Target API version of your application
158158
export NDKAPI="21" # Minimum supported API version of your application
159159
export ANDROIDNDKVER="r10e" # Version of the NDK you installed
160160

doc/source/testing_pull_requests.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Using python-for-android commands directly from the pull request files
118118
--requirements=sdl2,pyjnius,kivy,python3,pycryptodome \
119119
--ndk-dir=/media/DEVEL/Android/android-ndk-r20 \
120120
--sdk-dir=/media/DEVEL/Android/android-sdk-linux \
121-
--android-api=27 \
121+
--android-api=33 \
122122
--arch=arm64-v8a \
123123
--permission=VIBRATE \
124124
--debug
@@ -175,7 +175,7 @@ Installing python-for-android using the github's branch of the pull request
175175
python3 setup.py apk \
176176
--ndk-dir=/media/DEVEL/Android/android-ndk-r20 \
177177
--sdk-dir=/media/DEVEL/Android/android-sdk-linux \
178-
--android-api=27 \
178+
--android-api=33 \
179179
--arch=arm64-v8a \
180180
--debug
181181

pythonforandroid/recipe.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ class Recipe(metaclass=RecipeMeta):
155155
starting from NDK r18 the `gnustl_shared` lib has been deprecated.
156156
'''
157157

158+
min_ndk_api_support = 20
159+
'''
160+
Minimum ndk api recipe will support.
161+
'''
162+
158163
def get_stl_library(self, arch):
159164
return join(
160165
arch.ndk_lib_dir,
@@ -375,6 +380,9 @@ def get_recipe_dir(self):
375380
# Public Recipe API to be subclassed if needed
376381

377382
def download_if_necessary(self):
383+
if self.ctx.ndk_api < self.min_ndk_api_support:
384+
error(f"In order to build '{self.name}', you must set minimum ndk api (minapi) to `{self.min_ndk_api_support}`.\n")
385+
exit(1)
378386
info_main('Downloading {}'.format(self.name))
379387
user_dir = environ.get('P4A_{}_DIR'.format(self.name.lower()))
380388
if user_dir is not None:

pythonforandroid/recipes/numpy/__init__.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
from pythonforandroid.recipe import Recipe, MesonRecipe
2-
from pythonforandroid.logger import error
32
from os.path import join
43
import shutil
54

65
NUMPY_NDK_MESSAGE = "In order to build numpy, you must set minimum ndk api (minapi) to `24`.\n"
76

87

98
class 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"] # 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"])

pythonforandroid/recipes/pandas/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44

55
class PandasRecipe(MesonRecipe):
6-
version = 'v2.2.1'
7-
url = 'git+https://github.com/pandas-dev/pandas' # noqa
6+
version = 'v2.3.0'
7+
url = 'git+https://github.com/pandas-dev/pandas'
88
depends = ['numpy', 'libbz2', 'liblzma']
9-
hostpython_prerequisites = ["Cython~=3.0.5"] # meson does not detects venv's cython
9+
hostpython_prerequisites = ["Cython<4.0.0a0", "versioneer", "numpy"] # meson does not detects venv's cython
1010
patches = ['fix_numpy_includes.patch']
1111
python_depends = ['python-dateutil', 'pytz']
1212
need_stl_shared = True
@@ -17,7 +17,7 @@ def get_recipe_env(self, arch, **kwargs):
1717
# because we need some includes generated at numpy's compile time
1818

1919
env['NUMPY_INCLUDES'] = join(
20-
self.ctx.get_python_install_dir(arch.arch), "numpy/core/include",
20+
self.ctx.get_python_install_dir(arch.arch), "numpy/_core/include",
2121
)
2222
env["PYTHON_INCLUDE_DIR"] = self.ctx.python_recipe.include_root(arch)
2323

pythonforandroid/recipes/python3/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ class Python3Recipe(TargetPythonRecipe):
141141

142142
site_packages_dir_blacklist = {
143143
'__pycache__',
144-
'tests'
145144
}
146145
'''The directories from site packages dir that we don't want to be included
147146
in our python bundle.'''

pythonforandroid/recipes/sdl2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77

88
class LibSDL2Recipe(BootstrapNDKRecipe):
9-
version = "2.28.5"
9+
version = "2.30.11"
1010
url = "https://github.com/libsdl-org/SDL/releases/download/release-{version}/SDL2-{version}.tar.gz"
11-
md5sum = 'a344eb827a03045c9b399e99af4af13d'
11+
md5sum = 'bea190b480f6df249db29eb3bacfe41e'
1212

1313
conflicts = ['sdl3']
1414

pythonforandroid/recommendations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
MAX_NDK_VERSION = 25
1414

1515
# DO NOT CHANGE LINE FORMAT: buildozer parses the existence of a RECOMMENDED_NDK_VERSION
16-
RECOMMENDED_NDK_VERSION = "25b"
16+
RECOMMENDED_NDK_VERSION = "27c"
1717

1818
NDK_DOWNLOAD_URL = "https://developer.android.com/ndk/downloads/"
1919

testapps/on_device_unit_tests/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
'requirements':
4343
'sqlite3,libffi,openssl,pyjnius,kivy,python3,requests,urllib3,'
4444
'chardet,idna',
45-
'android-api': 27,
45+
'android-api': 33,
4646
'ndk-api': 24,
4747
'dist-name': 'bdist_unit_tests_app',
4848
'arch': 'armeabi-v7a',
@@ -56,7 +56,7 @@
5656
'requirements':
5757
'sqlite3,libffi,openssl,pyjnius,kivy,python3,requests,urllib3,'
5858
'chardet,idna',
59-
'android-api': 27,
59+
'android-api': 33,
6060
'ndk-api': 24,
6161
'dist-name': 'bdist_unit_tests_app',
6262
'arch': 'armeabi-v7a',
@@ -68,7 +68,7 @@
6868
'aar':
6969
{
7070
'requirements' : 'python3',
71-
'android-api': 27,
71+
'android-api': 33,
7272
'ndk-api': 24,
7373
'dist-name': 'bdist_unit_tests_app',
7474
'arch': 'arm64-v8a',

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy