Skip to content

Commit 080e5d3

Browse files
committed
Bump pyjnius
1 parent 4178990 commit 080e5d3

3 files changed

Lines changed: 30 additions & 25 deletions

File tree

pythonforandroid/recipes/pyjnius/__init__.py

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

77

88
class PyjniusRecipe(CythonRecipe):
9-
version = 'master'
9+
# "6553ad4" is one commit after last release (1.2.0)
10+
# it fixes method resolution, required for resolving requestPermissions()
11+
version = '1.2.1'
1012
url = 'https://github.com/kivy/pyjnius/archive/{version}.zip'
1113
name = 'pyjnius'
12-
depends = [('python2', 'python3crystax'), ('genericndkbuild', 'sdl2', 'sdl'), 'six']
14+
depends = [('genericndkbuild', 'sdl2'), 'six']
1315
site_packages_name = 'jnius'
1416

1517
patches = [('sdl2_jnienv_getter.patch', will_build('sdl2')),

pythonforandroid/recipes/pyjnius/genericndkbuild_jnienv_getter.patch

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ index ac89fec..71daa43 100644
1010
cdef JNIEnv *get_platform_jnienv():
1111
- return SDL_ANDROID_GetJNIEnv()
1212
+ return <JNIEnv*>WebView_AndroidGetJNIEnv()
13-
diff --git a/setup.py b/setup.py
14-
index 740510f..0c8e55f 100644
15-
--- a/setup.py
16-
+++ b/setup.py
17-
@@ -53,7 +53,7 @@ except ImportError:
13+
diff --git a/jnius/env.py b/jnius/env.py
14+
--- a/jnius/env.py
15+
+++ b/jnius/env.py
16+
@@ -185,10 +185,10 @@ except ImportError:
1817

19-
if PLATFORM == 'android':
20-
# for android, we use SDL...
21-
- LIBRARIES = ['sdl', 'log']
22-
+ LIBRARIES = ['main', 'log']
23-
LIBRARY_DIRS = ['libs/' + getenv('ARCH')]
24-
elif PLATFORM == 'darwin':
25-
import subprocess
18+
def get_libraries(platform):
19+
if platform == 'android':
20+
# for android, we use SDL...
21+
- return ['sdl', 'log']
22+
+ return ['main', 'log']
23+
24+
elif platform == 'win32':
25+
return ['jvm']
26+

pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ index ac89fec..71daa43 100644
1010
cdef JNIEnv *get_platform_jnienv():
1111
- return SDL_ANDROID_GetJNIEnv()
1212
+ return <JNIEnv*>SDL_AndroidGetJNIEnv()
13-
diff --git a/setup.py b/setup.py
13+
diff --git a/env.py b/env.py
1414
index 740510f..0c8e55f 100644
15-
--- a/setup.py
16-
+++ b/setup.py
17-
@@ -53,7 +53,7 @@ except ImportError:
15+
--- a/jnius/env.py
16+
+++ b/jnius/env.py
17+
@@ -185,10 +185,10 @@ except ImportError:
1818

19-
if PLATFORM == 'android':
20-
# for android, we use SDL...
21-
- LIBRARIES = ['sdl', 'log']
22-
+ LIBRARIES = ['SDL2', 'log']
23-
LIBRARY_DIRS = ['libs/' + getenv('ARCH')]
24-
elif PLATFORM == 'darwin':
25-
import subprocess
19+
def get_libraries(platform):
20+
if platform == 'android':
21+
# for android, we use SDL...
22+
- return ['sdl', 'log']
23+
+ return ['SDL2', 'log']
24+
25+
elif platform == 'win32':
26+
return ['jvm']
27+

0 commit comments

Comments
 (0)