Skip to content

Commit

Permalink
Merge pull request #2394 from obfusk/python3.9-support
Browse files Browse the repository at this point in the history
support Python 3.9
  • Loading branch information
AndreMiras authored Jan 2, 2021
2 parents 66a292c + 3d63a8d commit 3850b72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static ArrayList<String> getLibraries(File libsDir) {
libsList.add("python3.6m");
libsList.add("python3.7m");
libsList.add("python3.8");
libsList.add("python3.9");
libsList.add("main");
return libsList;
}
Expand All @@ -63,7 +64,7 @@ public static void loadLibraries(File filesDir, File libsDir) {
// load, and it has failed, give a more
// general error
Log.v(TAG, "Library loading error: " + e.getMessage());
if (lib.startsWith("python3.8") && !foundPython) {
if (lib.startsWith("python3.9") && !foundPython) {
throw new RuntimeException("Could not load any libpythonXXX.so");
} else if (lib.startsWith("python")) {
continue;
Expand Down
8 changes: 5 additions & 3 deletions pythonforandroid/recipes/python3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@ class Python3Recipe(TargetPythonRecipe):
('patches/py3.7.1_fix-ctypes-util-find-library.patch', version_starts_with("3.7")),
('patches/py3.7.1_fix-zlib-version.patch', version_starts_with("3.7")),

# Python 3.8.1
('patches/py3.8.1.patch', version_starts_with("3.8"))
# Python 3.8.1 & 3.9.X
('patches/py3.8.1.patch', version_starts_with("3.8")),
('patches/py3.8.1.patch', version_starts_with("3.9"))
]

if sh.which('lld') is not None:
patches = patches + [
("patches/py3.7.1_fix_cortex_a8.patch", version_starts_with("3.7")),
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.8"))
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.8")),
("patches/py3.8.1_fix_cortex_a8.patch", version_starts_with("3.9"))
]

depends = ['hostpython3', 'sqlite3', 'openssl', 'libffi']
Expand Down

0 comments on commit 3850b72

Please sign in to comment.