[ python-Bugs-841800 ] -O breaks bundlebuilder --standalone
SourceForge.net
noreply at sourceforge.net
Thu Nov 13 18:00:51 EST 2003
Bugs item #841800, was opened at 2003-11-13 18:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=841800&group_id=5470
Category: Macintosh
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Bob Swerdlow (swerdlow)
Assigned to: Jack Jansen (jackjansen)
Summary: -O breaks bundlebuilder --standalone
Initial Comment:
Just van Rossum suggested I file this bug report:
When building with
python -O buildapp.py -v --standalone --
package=encodings --package=_strpTime --packag
e=urllib2 build
I got these errors:
'import site' failed; use -v for traceback
Traceback(most recent call last):
file "./build/MyApp.app/Contents/Resources/myapp.py",
line 6, in ?
import copy
ImportError: No module named copy
The "import copy" problem is simply cascaded off
the "import site" problem. A site.pyo file was generated
in the /build/MyApp.app/Contents/Resources/folder, but
it is obviously not being used properly.
To get it to work, I first built the application without
the -O flag, saved the site.pyc file, then built it again
with the -O flag and restored the site.pyc file. With this
hack, the application works fine.
Just responded:
I think you need to hack the bootstrap script by adding
sys.argv.insert(1, "-O")
after this line:
sys.argv.insert(1, mainprogram)
He also asked if -O was really worth the trouble, but
that should be the programmer's decision, not the
framework's. bundlebuilder should support --standalone
with -O.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=841800&group_id=5470
More information about the Python-bugs-list
mailing list