Skip to content

Commit bed9059

Browse files
committed
support Python 3.9 & update Python to 3.9.0
1 parent e62d33c commit bed9059

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
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
@@ -44,6 +44,7 @@ protected static ArrayList<String> getLibraries(File libsDir) {
4444
libsList.add("python3.6m");
4545
libsList.add("python3.7m");
4646
libsList.add("python3.8m");
47+
libsList.add("python3.9m");
4748
libsList.add("main");
4849
return libsList;
4950
}
@@ -63,7 +64,7 @@ public static void loadLibraries(File filesDir, File libsDir) {
6364
// load, and it has failed, give a more
6465
// general error
6566
Log.v(TAG, "Library loading error: " + e.getMessage());
66-
if (lib.startsWith("python3.8") && !foundPython) {
67+
if (lib.startsWith("python3.9") && !foundPython) {
6768
throw new RuntimeException("Could not load any libpythonXXX.so");
6869
} else if (lib.startsWith("python")) {
6970
continue;

pythonforandroid/recipes/hostpython3/__init__.py

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

36-
version = '3.8.5'
36+
version = '3.9.0'
3737
name = 'hostpython3'
3838

3939
build_subdir = 'native-build'

pythonforandroid/recipes/python3/__init__.py

Lines changed: 6 additions & 4 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.8.5'
59+
version = '3.9.0'
6060
url = 'https://www.python.org/ftp/python/{version}/Python-{version}.tgz'
6161
name = 'python3'
6262

@@ -67,14 +67,16 @@ class Python3Recipe(TargetPythonRecipe):
6767
('patches/py3.7.1_fix-ctypes-util-find-library.patch', version_starts_with("3.7")),
6868
('patches/py3.7.1_fix-zlib-version.patch', version_starts_with("3.7")),
6969

70-
# Python 3.8.1
71-
('patches/py3.8.1.patch', version_starts_with("3.8"))
70+
# Python 3.8.1 & 3.9.0
71+
('patches/py3.8.1.patch', version_starts_with("3.8")),
72+
('patches/py3.8.1.patch', version_starts_with("3.9"))
7273
]
7374

7475
if sh.which('lld') is not None:
7576
patches = patches + [
7677
("patches/py3.7.1_fix_cortex_a8.patch", version_starts_with("3.7")),
77-
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.8"))
78+
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.8")),
79+
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.9"))
7880
]
7981

8082
depends = ['hostpython3', 'sqlite3', 'openssl', 'libffi']

0 commit comments

Comments
 (0)