Created
March 13, 2010 03:23
-
-
Save brantfaircloth/331080 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin | |
""" | |
setup.py - script for building MyApplication | |
Usage: | |
% python setup.py py2app | |
""" | |
from setuptools import setup | |
import os, sys, shutil | |
# remember to add sys.path = [os.path.join(os.environ['RESOURCEPATH'], 'lib', 'python2.6', 'lib-dynload')] + sys.path | |
# to dist/yourApplication.app/Contents/Resources/__boot__.py | |
# remove build directories | |
print 'Deleting build dirs...' | |
shutil.rmtree('./build') | |
shutil.rmtree('./dist') | |
print 'Building app...' | |
if os.name == 'posix': | |
setup( | |
name='yourApp Name', | |
version='0.0.0', | |
description='your fancy descripton', | |
author='Your Name', | |
author_email='Your Email', | |
license='Some License', | |
app=['main.py'], | |
setup_requires=['py2app'], | |
options=dict(py2app=dict( | |
includes=['PyQt4', 'PyQt4.QtCore', 'PyQt4.QtGui', 'sip'], | |
packages=[], | |
resources=[], | |
excludes=['PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtSql', 'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml', 'PyQt4.phonon'] | |
)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment