Rép : [PyQt] Deploying PyQt4 application

Rémy HUBSCHER hubscher.remy at gmail.com
Wed Jan 30 12:18:32 GMT 2008


Hello,

I finally success in my Py2app Bundle.

That is my feedback :

Everything was working just with Py2App with this setup.py file :
"""
Script for building the example.

Usage:
     python setup.py py2app
"""
from distutils.core import setup
import py2app
import os
os.system("/bin/rm -rf dist")
os.system("/bin/rm -rf build")
os.system("/bin/rm -rf *.pyc")


APP = ["pytalk.py"]
DATA_FILES = ["images"]
OPTIONS = {'argv_emulation': True, 'iconfile': 'pytalk.icns',  
'includes': ['sip']}

setup(
     app=APP,
     data_files=DATA_FILES,
     options={'py2app': OPTIONS},
     setup_requires=['py2app'],
)

os.system("mv dist/pytalk.app dist/PyTalk.app")
os.system("cp __boot__.py dist/PyTalk.app/Contents/Resources/ 
__boot__.py")
os.system("cp Info.plist dist/PyTalk.app/Contents/Info.plist")

I just needed to change some little things :
First the Bundle Name,
Secondly add this line to the __boot__.py file :

     sys.path =[os.path.join(os.environ['RESOURCEPATH'], 'lib',  
'python2.5', 'lib-dynload')]+sys.path

And configure a Info.plist with my script version and some informations
Now everything seams to work well.

Thank you for your help

Natim



More information about the PyQt mailing list