Tuesday, May 5, 2009

How to compile jython-dev under Gentoo?

Jython is an implementation of Python written in 100% Pure Java. It uses "ant" to manage the project.
Why compile jython instead of getting a pre-compile version? Oooo. I suggest that you are interested in jython and want to contribute your code to open source project. Another reason, you may install the newest jython, however, a simple solution can address this purpose.
In windows, you can easily compile the whole project with "ant" and "sun-java". But in Gentoo, something just changes the situation. Followed the Developer Guide of Jython, I install "ant" with its default USE flag:
#emerge -av ant
So this will install "bsf" and "ant-apache-bsf". All of the two packages must enable USE="python" which depends the package "jython". However, the problem comes. If you compile the source code which you check out of subversion may collide with "jython" which is installed by portage. It will complain that the namespace is collision with the library that "jython" provides.
A straightforward solution is changing the classpath, but it did work for "ant". So I try to find how the "ant" works. Good luck for me, I get it.
$export ANT_TASKS="none"
The world is beautiful again.

No comments: