Issue442166

classification
Title: zipfiles on syspath.
Type: Severity: normal
Components: None Versions:
Milestone:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: bckfnn
Priority: normal Keywords: patch

Created on 2001-07-17.21:25:00 by bckfnn, last changed 2001-07-27.18:54:07 by bckfnn.

Files
File name Uploaded Description Edit Remove
patch_zipsyspath bckfnn, 2001-07-17.21:25:01 The patch
patch_zipsyspath2 bckfnn, 2001-07-22.12:54:01 New version
Messages
msg2105 (view) Author: Finn Bock (bckfnn) Date: 2001-07-17.21:25:00
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.
msg2106 (view) Author: Finn Bock (bckfnn) Date: 2001-07-22.12:54:01
Logged In: YES 
user_id=4201

A new version of the patch which adds support the paths 
like "myjar.jar!foo/bar". This syntax is now also used for 
the __path__ field in subpackages.
msg2107 (view) Author: Finn Bock (bckfnn) Date: 2001-07-27.18:54:07
Logged In: YES 
user_id=4201

Applied to 2.1a3.
History
Date User Action Args
2001-07-17 21:25:00bckfnncreate