Skip to content

Commit 3c38e69

Browse files
committed
Merge branch 'develop' into firebase
# Conflicts: # pythonforandroid/bootstraps/common/build/gradle/wrapper/gradle-wrapper.properties # pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle
2 parents 8e084c3 + 2ebea90 commit 3c38e69

File tree

21 files changed

+63
-41
lines changed

21 files changed

+63
-41
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 ?= 28c
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 ?= 36
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 r28c:**
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="36" # 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=36 \
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=36 \
179179
--arch=arm64-v8a \
180180
--debug
181181

pythonforandroid/bootstraps/common/build/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip

pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
buildscript {
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:8.10.0'
8+
classpath 'com.android.tools.build:gradle:8.11.0'
99
classpath 'com.google.gms:google-services:4.4.2'
1010
}
1111
}
1212

1313
allprojects {
1414
repositories {
1515
google()
16-
jcenter()
16+
mavenCentral()
1717
{%- for repo in args.gradle_repositories %}
1818
{{repo}}
1919
{%- endfor %}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
APP_PLATFORM := $(NDK_API)
2+
APP_ABI := $(ARCH)

pythonforandroid/bootstraps/webview/build/jni/Application.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55

66
# APP_ABI := armeabi armeabi-v7a x86
77
APP_ABI := $(ARCH)
8+
APP_PLATFORM := $(NDK_API)

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", "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"])

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

0 commit comments

Comments
 (0)