Skip to content

@Stewori Stewori released this Jun 14, 2017 · 75 commits to master since this release

Welcome to JyNI v2.7-alpha.4!

Among plenty bugfixes, the most notable new feature is support for NumPy (>= 1.12). Not everything is working already, but it is possible to import numpy, create nd-arrays, apply arithmetics to them, do eigenvalue decompositions and things alike. We still observe issues with subclassing nd-array and also the lack of buffer protocol support locks out various features.
For details and examples, follow the discussion at #2.

Another important new milestone in this release is support for new-style classes.
In combination with improved ctypes support this allows to use PyOpenGL in Jython. We still observe issues on OSX, but most test-demos work on Linux. Note that on first run Jython will prompt you to create some .pyc-files using CPython. This is Jython's current way to handle Python functions that exceed JVM size limits; PyOpenGL contains several of them.

Extensions generated via Cython are mostly workable (e.g. mtrand from NumPy). However, cythonizing pyx-files is not yet feasible with Jython, but can be done with CPython to build native libraries initially. Once the .so files are compiled, make sure Jython has them in its sys.path, then JyNI can load them into the JVM.

For a more detailed write-up of some usability demos and implementation techniques, especially regarding garbage collection and weak references, see the publication

Garbage Collection in JyNI – How to bridge Mark/Sweep and Reference Counting GC., Proceedings of the 8th European Conference on Python in Science (EuroSciPy 2015), CoRR abs/1607.00825 (2016)

It features a NumPy example and also shows how to embed Python calls seamlessly into Java code (Tkinter demo).

Some improvements to Jython were triggered by work on this JyNI release. Most notably, it is now possible to control how platform detection values and sys.platform are presented to specific extensions.
Improving support for oversized functions like mentioned above was also motivated partly with native extensions in mind.

JyNI v2.7-alpha.4 requires Jython 2.7.1.

JyNI v2.7-alpha.4 was tested with Java 7 and 8 on

Binaries are provided for Linux (32 bit and 64 bit) and OS-X.

Thank you

Thanks go to

Assets 6
You can’t perform that action at this time.