Commit Graph

34 Commits

Author SHA1 Message Date
Craig Macdonald fd748e5db4
Support both Cython >3 and Cython < 3 (#669)
* Remove .pxi include files from setup.py

* show pip list

* dont allow cython 3

* Revert "show pip list"

This reverts commit b3f88b0443.

* separate FILES into PYX_FILES and PXI_FILES

* testing for cython 3

* fixes __cls_storage in Cython 3

* detect Cython 3 at compile time, compile appropriately

* force cython version using sed. expected to fail on windows.

* i think this will work on the Windows sed on GHA

* cleanup __cls_storage name consistently

* migrate to getattr() to make code more elegant

* fix GHA for macos by separating seds

* add actual extension!

* access all CLS_STORAGE through the cdef 'constant'
2023-09-16 13:57:15 +02:00
Mirko Galimberti 714f30e71a
Removes some Python2-era complexity (#641) 2022-11-20 16:51:10 +01:00
Peter Badida d1647b6952 Create compat file to handle basestring issues and more 2019-01-05 15:09:26 +01:00
Gabriel Pettier 1845a3d7a9
Merge branch 'master' into python-implementing-interface-fixes 2018-04-30 14:44:44 +02:00
Gabriel Pettier d5468fb800 remove a few end of line spaces 2018-04-30 14:34:58 +02:00
Gabriel Pettier 82d872bbbe also JavaMultipleMethod
closes #327
2018-04-30 14:34:15 +02:00
Gabriel Pettier 4d811e766e expose JavaStaticMethod and JavaStaticField in jnius 2018-04-30 14:32:57 +02:00
Dan 8d66f198db Add tests for isinstance, fix edge cases. 2017-12-11 14:04:32 -05:00
Benson Margulies fa9f4531c0 Use dlopen instead of linking -ljvn. 2015-05-03 11:24:32 -04:00
Benson Margulies e1070965cc Support Python 3.4
see if we can't make travis happy.
2015-05-03 11:24:27 -04:00
Mathieu Virbel 857e4c762a add a jnius.detach() method to detach a thread that used some jni.
This cannot be automatic as jnius do not control the thread creation, so it cannot add a callabck to autocall this method.
It must be added by the user before the thread leave, if it used pyjnius inside.

Ref #107
Ref #97
2015-02-07 19:33:19 +01:00
Mathieu Virbel 693275fe48 new ByteArray native class, used to transport [B in python, instead of using Python list + integer.
ByteArray have .tostring() + .tolist(), and support slices / item lookup / size, but everything is readonly.
2013-09-11 17:18:49 +02:00
Mathieu Virbel 21d365df24 XXX avoid to switch between thread when invoke0 is called / new push_jnienv/pop_jnienv. Without it, if another thread use pyjnius = crash. (i have explored TLS storage for storing j_env, but it seems not available on Android. 2013-06-25 00:08:24 +02:00
Mathieu Virbel 5bf97da477 jnius: refactor to not save jni env, and use the current pushed/pop env. This resolve few issues when pyjnius is called from a proxy (error such as E/dalvikvm( 6036): JNI ERROR: env->self != thread-self (0x68415860 vs. 0x400bb010); auto-correcting) 2013-06-24 17:58:20 +02:00
Mathieu Virbel 2a95adc674 cleanup proxy code 2013-03-13 21:38:10 +01:00
tshirtman e10ed056bb move testImpl to tests/test_proxy.py and move NativeInvocationHandler
adapt jnius_jvm_desktop to have access to java jnius package
2013-01-03 12:57:46 +01:00
Mathieu Virbel 77f2928e0b fixes for subclasses. closes #3 2012-08-20 10:34:14 +02:00
Mathieu Virbel 7bd35411bf split jnius.pyx 2012-08-20 09:35:14 +02:00
gabriel.pettier 6aa4760721 Merge branch 'master' of github.com:kivy/pyjnius 2012-08-18 19:35:26 +02:00
gabriel.pettier 6d2df26f0b small grammar fix 2012-08-18 19:34:16 +02:00
gabriel.pettier 9ec504dfd6 change to getMethods and getFields to get inherited methods/fields too
and small doc fix
2012-08-18 19:32:15 +02:00
Mathieu Virbel f8fc0e714a Merge branch 'master' of github.com:kivy/pyjnius 2012-08-18 12:59:32 +02:00
Mathieu Virbel 60ee14ed6f add the previous tests from python-for-android/javawrapper branch.
+ fix findclass (need cleaning)
+ fix array return with chars
+ export reflect module by default (it's already used in jnius so..)
2012-08-18 12:59:15 +02:00
gabriel.pettier 2eea0f45d3 fix grammar errors in some comments 2012-08-18 11:21:14 +02:00
Mathieu Virbel bb0923d77d fix System.out.println('hello') crash due to a race condition: the instancatied JavaClass for "out" was deallocated before the __call__ of the println. >_< 2012-08-18 04:14:53 +02:00
Dominik Kozaczko d3f948bf30 __doc__ fixed :) 2012-08-16 14:12:10 +02:00
Mathieu Virbel 774fc295e9 add cast(classname, obj) method to be able to use an instance from another class def 2012-08-16 00:16:17 +02:00
Mathieu Virbel 2c2adefb6a lazy methods and fields loading. 2012-08-15 23:28:53 +02:00
Mathieu Virbel 77139529ad add support for multiple signatures on constructors and methods. 2012-08-15 19:16:39 +02:00
Mathieu Virbel 69fe77c403 refactor the conversion functions, move them into jnius_conversion.pxi, and factorize the jobject conversion. 2012-08-15 17:26:24 +02:00
Mathieu Virbel a4af093aa1 raise exception correctly now + add more unittests 2012-08-15 16:31:22 +02:00
Mathieu Virbel 6047d60192 add DeleteLocalRef where it seem the best place. 2012-08-14 18:20:35 +02:00
Mathieu Virbel 7319fab9e5 fix package import, make tests work again. 2012-08-14 15:12:34 +02:00
Mathieu Virbel 162d011912 add autoclass/ensureclass, auto reflection for JavaObject, and fixes around j_self 2012-08-14 15:09:48 +02:00