I'm not sure if it'll help, but I managed to set semi-standalone working by doing something like this (I've trimmed my actual usage, but I think this is all the important stuff):
PLIST = {\ 'PyResourcePackages': [ 'lib/python2.4', 'lib/python2.4/lib-dynload', 'lib/python2.4/site-packages.zip', ], } OPTIONS = { 'argv_emulation': True, 'plist': PLIST, 'semi_standalone': True, 'use_pythonpath': True, } ...this got it to automatically include wxPython (which I wanted), but not to include python itself. It was a long time ago when I did this (so I only vaguely remember), but I believe that the "PyResourcePackages" was absolutely critical. Good luck! -Doug --- On Jul 20, 2007, at 11:43 AM, Ivan Vilata i Balaguer wrote: > Hi people, > > I'm attaching an utterly trivial project (the hello world example from > the PyQt tutorial) which shows that py2app-generated *semi-standalone* > apps using Qt fail to run, apparently because of the path to the Qt > libs > included in the appdir not being placed in ``sys.path``. > > To check this yourselves, simply place ``MyApp.py`` and > ``setup.py`` in > the same directory, run ``python setup.py py2app`` and try to open the > resulting app bundle which is left in the ``dist`` directory with > Finder. > > > This is the error dialog that I get:: > > MyApp Error > > MyApp Error > An unexpected error has occurred during execution of the main > script > > ImportError: '/Library/Frameworks/Python.framework/Versions/2.5/ > lib/ > python2.5/lib-dynload/qt.so' not found > > And these are the console messages:: > > Traceback (most recent call last): > File "/Users/ivan/MyApp/dist/MyApp.app/Contents/Resources/ > __boot__.py", > line 31, in <module> > _run('MyApp.py') > File "/Users/ivan/MyApp/dist/MyApp.app/Contents/Resources/ > __boot__.py", > line 28, in _run > execfile(path, globals(), globals()) > File "/Users/ivan/MyApp/dist/MyApp.app/Contents/Resources/ > MyApp.py", > line 6, in <module> > import qt > File "qt.pyc", line 18, in <module> > File "qt.pyc", line 15, in __load > ImportError: '/Library/Frameworks/Python.framework/Versions/2.5/ > lib/ > python2.5/lib-dynload/qt.so' not found > 2007-07-20 20:11:48.233 MyApp[286] MyApp Error > 2007-07-20 20:11:48.235 MyApp[286] MyApp Error > An unexpected error has occurred during execution of the main > script > > ImportError: '/Library/Frameworks/Python.framework/Versions/2.5/ > lib/ > python2.5/lib-dynload/qt.so' not found > > > Please note how the app is trying to load ``qt.so`` *from the system* > instead of from the appdir. Running ``python MyApp.py`` works fine. > > I'm using Universal MacPython 2.5, PyQt 3.17 and py2app 0.3.6. > > :: > > Ivan Vilata i Balaguer >qo< http://www.carabos.com/ > Cárabos Coop. V. V V Enjoy Data > "" > <MyApp.py> > <setup.py> > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig