Skip to content

Commit 2b15b02

Browse files
authored
Add support for Python 3.10 and make it the default while building hostpython3 and python3 (kivy#2577)
* Add support for Python 3.10 and make it the default while building hostpython3 and python3 * Update bugfix version
1 parent bdf1883 commit 2b15b02

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

pythonforandroid/bootstraps/common/build/src/main/java/org/kivy/android/PythonUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ protected static ArrayList<String> getLibraries(File libsDir) {
5454
libsList.add("python3.7m");
5555
libsList.add("python3.8");
5656
libsList.add("python3.9");
57+
libsList.add("python3.10");
5758
libsList.add("main");
5859
return libsList;
5960
}
@@ -73,7 +74,7 @@ public static void loadLibraries(File filesDir, File libsDir) {
7374
// load, and it has failed, give a more
7475
// general error
7576
Log.v(TAG, "Library loading error: " + e.getMessage());
76-
if (lib.startsWith("python3.9") && !foundPython) {
77+
if (lib.startsWith("python3.10") && !foundPython) {
7778
throw new RuntimeException("Could not load any libpythonXXX.so");
7879
} else if (lib.startsWith("python")) {
7980
continue;

pythonforandroid/recipes/hostpython3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class HostPython3Recipe(Recipe):
3535
:class:`~pythonforandroid.python.HostPythonRecipe`
3636
'''
3737

38-
version = '3.9.9'
38+
version = '3.10.10'
3939
name = 'hostpython3'
4040

4141
build_subdir = 'native-build'

pythonforandroid/recipes/python3/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Python3Recipe(TargetPythonRecipe):
5656
:class:`~pythonforandroid.python.GuestPythonRecipe`
5757
'''
5858

59-
version = '3.9.9'
59+
version = '3.10.10'
6060
url = 'https://www.python.org/ftp/python/{version}/Python-{version}.tgz'
6161
name = 'python3'
6262

@@ -70,14 +70,16 @@ class Python3Recipe(TargetPythonRecipe):
7070

7171
# Python 3.8.1 & 3.9.X
7272
('patches/py3.8.1.patch', version_starts_with("3.8")),
73-
('patches/py3.8.1.patch', version_starts_with("3.9"))
73+
('patches/py3.8.1.patch', version_starts_with("3.9")),
74+
('patches/py3.8.1.patch', version_starts_with("3.10"))
7475
]
7576

7677
if shutil.which('lld') is not None:
7778
patches = patches + [
7879
("patches/py3.7.1_fix_cortex_a8.patch", version_starts_with("3.7")),
7980
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.8")),
80-
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.9"))
81+
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.9")),
82+
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.10"))
8183
]
8284

8385
depends = ['hostpython3', 'sqlite3', 'openssl', 'libffi']
@@ -96,6 +98,7 @@ class Python3Recipe(TargetPythonRecipe):
9698
'ac_cv_file__dev_ptc=no',
9799
'--without-ensurepip',
98100
'ac_cv_little_endian_double=yes',
101+
'ac_cv_header_sys_eventfd_h=no',
99102
'--prefix={prefix}',
100103
'--exec-prefix={exec_prefix}',
101104
'--enable-loadable-sqlite-extensions')

0 commit comments

Comments
 (0)