Message6307

Author Sunng
Recipients Sunng
Date 2010-12-30.10:01:54
SpamBayes Score 5.1292304e-14
Marked as misclassified No
Message-id <1293703315.41.0.338580015553.issue1691@psf.upfronthosting.co.za>
In-reply-to
Content
When using jython, we often use python-java inter-operation. It's easy to manage python dependencies since we have virtualenv and pip, both of them work with jython perfectly, follow python's convention. To do things with Java, we can grab dependencies with ant/ivy, which I found is very easy to manage.

But it comes to the most difficult part, append these external jars to classpath. Everytime, we have do type commands like, `jython -Dpython.path=FOO:BAR` unless we do some dirty work on the original start script.

So my suggestion is to define a standard place as a convention to store external jars, for example, something called 'javalib'. Before jython runs, it will append all jars inside to python.path, automatically.

Also, it will be good for jython to ship some skeletons of ant build file and ivy xml. So that, the user can configure the dependencies and retrieve all jar by a simple ant command. This is especially useful for those using virtualenv with jython. 

The standard jython project will be created in such a way: 
1.created a new virtualenv with jython. then you have `bin/` `Lib/` `javalib/` `build.xml` `ivy.xml`
2.use pip to download and install python packages
3.edit ivy.xml, and run ant command to grab jars
4.everything is ready, run jython. python packages and java jars are right in the classpath, everything is so smooth.
History
Date User Action Args
2010-12-30 10:01:55Sunngsetrecipients: + Sunng
2010-12-30 10:01:55Sunngsetmessageid: <1293703315.41.0.338580015553.issue1691@psf.upfronthosting.co.za>
2010-12-30 10:01:55Sunnglinkissue1691 messages
2010-12-30 10:01:54Sunngcreate