From 58317e1e8bbccbbb69265c68ace5f4ab3b4fc836 Mon Sep 17 00:00:00 2001 From: Gabriel Pettier Date: Mon, 30 Apr 2018 13:54:43 +0200 Subject: [PATCH 1/4] replace "java" import with jnius fixes #75 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf5b6069..3ca7037c 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ need. The previous example can be done manually as follows: ```python from time import sleep -from java import MetaJavaClass, JavaClass, JavaMethod, JavaStaticMethod +from jnius import MetaJavaClass, JavaClass, JavaMethod, JavaStaticMethod class Hardware(JavaClass): __metaclass__ = MetaJavaClass From 4d811e766ea715c66a2a52cb193505af53fb54bd Mon Sep 17 00:00:00 2001 From: Gabriel Pettier Date: Mon, 30 Apr 2018 14:32:57 +0200 Subject: [PATCH 2/4] expose JavaStaticMethod and JavaStaticField in jnius --- jnius/jnius.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jnius/jnius.pyx b/jnius/jnius.pyx index 41571bfa..de757fda 100644 --- a/jnius/jnius.pyx +++ b/jnius/jnius.pyx @@ -86,8 +86,9 @@ Python:: ''' __all__ = ('JavaObject', 'JavaClass', 'JavaMethod', 'JavaField', - 'MetaJavaClass', 'JavaException', 'cast', 'find_javaclass', - 'PythonJavaClass', 'java_method', 'detach') + 'JavaStaticMethod', 'JavaStaticField', 'MetaJavaClass', + 'JavaException', 'cast', 'find_javaclass', 'PythonJavaClass', + 'java_method', 'detach') from libc.stdlib cimport malloc, free from functools import partial From 82d872bbbe4d9435355533f1ebe98f92ed7491d3 Mon Sep 17 00:00:00 2001 From: Gabriel Pettier Date: Mon, 30 Apr 2018 14:34:15 +0200 Subject: [PATCH 3/4] also JavaMultipleMethod closes #327 --- jnius/jnius.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jnius/jnius.pyx b/jnius/jnius.pyx index de757fda..331f8524 100644 --- a/jnius/jnius.pyx +++ b/jnius/jnius.pyx @@ -86,9 +86,9 @@ Python:: ''' __all__ = ('JavaObject', 'JavaClass', 'JavaMethod', 'JavaField', - 'JavaStaticMethod', 'JavaStaticField', 'MetaJavaClass', - 'JavaException', 'cast', 'find_javaclass', 'PythonJavaClass', - 'java_method', 'detach') + 'JavaStaticMethod', 'JavaStaticField', 'JavaMultipleMethod', + 'MetaJavaClass', 'JavaException', 'cast', 'find_javaclass', + 'PythonJavaClass', 'java_method', 'detach') from libc.stdlib cimport malloc, free from functools import partial From d5468fb800d8dc150eeb39a80c9d0220d04ac034 Mon Sep 17 00:00:00 2001 From: Gabriel Pettier Date: Mon, 30 Apr 2018 14:34:58 +0200 Subject: [PATCH 4/4] remove a few end of line spaces --- Makefile | 2 +- jnius/jnius.pyx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7270012a..189c61f7 100644 --- a/Makefile +++ b/Makefile @@ -28,5 +28,5 @@ html: # for use in travis; tests whatever you got. # use PYTHON3=1 to force python3 in other environments. -tests: +tests: (cd tests; env CLASSPATH=../build/test-classes:../build/classes PYTHONPATH=..:$(PYTHONPATH) $(NOSETESTS) -v) diff --git a/jnius/jnius.pyx b/jnius/jnius.pyx index 331f8524..b3b1b3e5 100644 --- a/jnius/jnius.pyx +++ b/jnius/jnius.pyx @@ -100,7 +100,7 @@ include "config.pxi" IF JNIUS_PLATFORM == "android": include "jnius_jvm_android.pxi" -ELIF JNIUS_PLATFORM == "win32": +ELIF JNIUS_PLATFORM == "win32": include "jnius_jvm_desktop.pxi" ELSE: include "jnius_jvm_dlopen.pxi" @@ -111,7 +111,7 @@ include "jnius_conversion.pxi" include "jnius_localref.pxi" IF JNIUS_PYTHON3: include "jnius_nativetypes3.pxi" -ELSE: +ELSE: include "jnius_nativetypes.pxi" include "jnius_export_func.pxi"