Skip to content

Instantly share code, notes, and snippets.

@brantfaircloth
Created March 13, 2010 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brantfaircloth/331080 to your computer and use it in GitHub Desktop.
Save brantfaircloth/331080 to your computer and use it in GitHub Desktop.
#!/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