|
From: Frank W. <fwi...@gm...> - 2007-09-03 14:20:27
|
On 9/2/07, Philip Jenvey <pj...@gr...> wrote: > Charles Nutter has made some major headway on implementing chmod/ > chown on JRuby (and that's just the beginning) via JNA's trunk build: > > http://headius.blogspot.com/2007/09/java-native-access-jruby-true- > posix.html > > JNA could let Jython implement a full suite of POSIX functions (like > Finn Bock's jnios or jtux), but without the headaches of JNI/ > compiling native code. JNA appears to "just work" out of the box for > the most popular platforms (win32, osx, linux, solaris, freebsd), so > we could include this potential suite with our normal Jython > distribution, by just shipping it with the JNA jar. This does sound very promising. > It's licensed under the LGPL. That sounds compatible enough; would > the Jython/PSF lawyers approve? =] I know the answer is easy for GPL (no) and the answer is easy for APL and other BSD style licenses (yes), but the LGPL might be a gray area. Since we can ship the jar separately, this is probably worth trying out -- we could implement os.py similarly to the way CPython does it so that the runtime imports what it can based on the os is on, and we could make jna optional the way we do with readline. This way, if jna is present then we get chmod, etc, but if it is not we don't (just like CPython does it) If we make it pluggable the way we do with readline, I'd say we can just see where it goes and give it a try. If it turns out that we can't distribute jna.jar -- we can hopefully have simple instructions (much simpler than the readline instructions since there is no compile step). Also, if it is written in a pluggable style, we might eventually find a BSD licensed jar that we could use instead so that distribution ability is unambiguous. -Frank |