Message2105
A patch that attempt to add some support for a
different deployment 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.
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.
|
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:18:13 | admin | link | issue442166 messages |
| 2008-02-20 17:18:13 | admin | create | |
|