I also ran into this recently.
I was trying to wrap a PyQt application on Snow Leopard, and I wanted a 64-bit 
application as a result.

The first issue you ran into involves macholib, and is easy enough to correct; 
here is the patch file.

Attachment: macholib.diff
Description: Binary data


Also, py2app builds a 32-bit bootstrap executable in 
dist/ApplicationName.app/Contents/MacOS/ApplicationName ; so it will still 
start in 32 bits. To correct that, the py2app templates have to be rebuilt. 
Code patch below, and then do the following:

cd {sowewhere}/py2app/py2app/apptemplate
rm prebuilt/main
python setup.py build
cd ../bundletemplate
rm prebuilt/main
python setup.py build

Note that the patch involves bumping the minimum system version from 10.3 to 
10.4; Ideally this should be parametrized. Another issue that requires more 
thought, that Kevin also identified, is the argvemulation not working in 64 
bits. My patch just hides the failure at this point, something better has to be 
done.

Attachment: py2app.diff
Description: Binary data


Another issue, finally:
If you're wrapping Qt4, the sip recipe omits the Qt plugins. I adjust it by 
hand, with the following operations (in bash):

cat > dist/ApplicationName.app/Contents/Resources/qt.conf <<EOF
[Paths]
qt_plugpath=plugins
EOF

cp -r /Developer/Applications/Qt/plugins dist/ApplicationName.app/Contents
strip dist/ApplicationName.app/Contents/plugins/*/*.dylib
for lib in phonon QtCore QtDBus QtGui QtNetwork QtSvg QtWebKit QtXml 
QtXmlPatterns;
do
  find dist/ApplicationName.app/Contents/plugins -type f -exec 
install_name_tool -change $lib.framework/Versions/4/$lib 
@executable_path/../Frameworks/$lib.framework/Versions/4/$lib  {} ';';
done

Again, some work should be done on the recipe, but this should allow people to 
progress.
Cheers,

Marc-Antoine Parent

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to