-
-
Save kissgyorgy/01453b8149b56a69d6e2 to your computer and use it in GitHub Desktop.
This file contains 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
""" | |
setup.py | |
py2app setup script for creating a semi-standalone .app | |
around a Maya API based PyQt4 application. | |
Only bundled PyQt4 with the app, and references the Maya install | |
location for the python environment. | |
Allows for a portable GUI application that does not require | |
a PyQt4 dependency on the system. Only a Maya installation. | |
""" | |
import os | |
from setuptools import setup | |
ROOT = '/Applications/Autodesk/maya2012/Maya.app/Contents' | |
PYTHONHOME = os.path.join(ROOT, 'Frameworks/Python.framework/Versions/Current') | |
PYTHONPATH = os.path.join(PYTHONHOME, 'lib/python2.6/site-packages') | |
ENV = { | |
'MAYA_LOCATION' : ROOT, | |
'PYTHONHOME' : PYTHONHOME, | |
'PYTHONPATH' : PYTHONPATH, | |
'DYLD_LIBRARY_PATH' : os.path.join(ROOT, 'MacOS'), | |
'DYLD_FRAMEWORK_PATH' : os.path.join(ROOT, 'Frameworks'), | |
} | |
APP = ['myApp.py'] | |
OPTIONS = { | |
'excludes': [ | |
'PyQt4.QtDBus', | |
'PyQt4.QtDeclarative', | |
'PyQt4.QtDesigner', | |
'PyQt4.QtHelp', | |
'PyQt4.QtScript', | |
'PyQt4.QtScriptTools', | |
'PyQt4.QtTest', | |
'PyQt4.QtXml', | |
'PyQt4.QtXmlPatterns', | |
'PyQt4.QtOpenGL', | |
], | |
'semi_standalone' : True, | |
'site_packages' : True, | |
'use_pythonpath' : True, | |
'strip' : True, | |
'plist':{ | |
'LSEnvironment': ENV | |
}, | |
} | |
# | |
# Build .app | |
# | |
setup( | |
app=APP, | |
options={'py2app': OPTIONS}, | |
setup_requires=['py2app'], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment