From: <bc...@wo...> - 2001-07-17 21:27:30
|
I have posted my attempt to add some support for a different deployment method of jython applications. Some of the ideas which have been discussed under the title of "poor man freezing" are included but the patch does not attempt to include everything. > http://sourceforge.net/tracker/index.php?func=detail&aid=442166&group_id=12867&atid=312867 Here is what the patch adds: - zip files can be added to sys.path. - The zipfile will be kept open by the sys.path list by replacing the string in sys.path with a string subclass (SyspathArchive). The zipfile is closed by GC and all imported modules are unloaded. - The zipfiles is scanned by the first import after adding the zip file to syspath and the result is always stored in cachedir. Saving the scan result on the zipfile in cachedir is somewhat controversial if the goal is to create a fully self-contained and self-executable jython application. OTOH I still don't think it is a big problem saving the scan-index in cachedir during development. For a deployed application we will have to somehow save the scan results for all the java .jar files inside the applications. When we do that, we can also add new main startup class which will look for the main python script name and other startup options in the manifest file. The patch does *not* attempt to: - avoid dynamic proxy creation. - allow importing .py files from classpath .jars - allow importing jythonc'ed modules in the interpreter. - etc. regards, finn |