Pierre, do you know what the other JAR bundling methods referenced in that Jython book are?
This is only one such technique used to make a JAR file for containing your applications. There are other ways to perform such techniques, but this seems to be the most straight forward and easiest to do.
Can anyone enlighten me as to what these other methods are, specifically with how third-party packages could be included in a standalone JAR? What about packages with zip_safe=True?
I attempted the following, but to no avail:
1. Grab a fresh jython.jar
2. Create a temporary Jython virtualenv.
3. jython setup.py install on my package
4. Add the contents of virtualenv/Lib/site-packages to Lib/site-packages in jython.jar
Running "java -cp jython.jar org.python.util.jython -c "import mypackage" results in an ImportError.
On 2011-04-14, at 8:00 AM, Pierre Thibault wrote:
2011/4/14 Andreas Johnsen <firstname.lastname@example.org>
2: We want to bundle Jython with our game in a single .jar file. The purpose would be for people to be able to "play" the game without having python installed on their computer. This would mean that we also would have to have the python standard library in the bundle. How do I make Jython look inside the jar when it is looking for .py files on import? I've been looking at sys.path and such, am I right in assuming that I will have to make my own module loader thingy, and add it somewhere? Does perhaps such a loader already exist?
My blog and profile (http://pierrethibault.posterous.com)
YouTube page (http://www.youtube.com/user/tubetib)