This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients ronaldoussoren
Date 2011-01-20.13:52:14
SpamBayes Score 4.2188475e-15
Marked as misclassified No
Message-id <1295531540.01.0.823019908764.issue10955@psf.upfronthosting.co.za>
In-reply-to
Content
I ran into this issue while debugging why py2app doesn't work with python 3.2rc2. The reason seems to be a regression w.r.t. having the stdlib inside a zipfile.

Note that I haven't tested this without going through py2app yet.

py2app basicly recreates a minimal sys.prefix that contains just the application python files and a minimal selection of files from the stdlib.

The file structure in the app bundle contains (for python3.2):

    .../Resources/
            lib/
               python32.zip   # Most compiled python files
               python3.2/     # Files that cannot be in the zip
                  lib-dynload # Extensions

This structure works fine with python2.7 (and earlier) and python3.1, with python 3.2rc2 I get a bootstrap error because the filesystem encoding codec cannot be located.

This can be worked around by moving the encodings package and the codecs module from the zipfile to the python3.2 directory. 

That however is not good enough, I also have to change the default search-path using Py_SetPath. The default path has python32.zip before the python3.2 directory, only when I switch those around the application loads fine.

All of this is on MacOSX 10.6.6 (where the filesystem encoding is UTF-8).

This is a regression because it is no longer possible to have a packaged python application where all python code is inside a zipfile. Some files must be outside of the file to bootstrap the interpreter.
History
Date User Action Args
2011-01-20 13:52:20ronaldoussorensetrecipients: + ronaldoussoren
2011-01-20 13:52:20ronaldoussorensetmessageid: <1295531540.01.0.823019908764.issue10955@psf.upfronthosting.co.za>
2011-01-20 13:52:14ronaldoussorenlinkissue10955 messages
2011-01-20 13:52:14ronaldoussorencreate