Module Expr Str Import alias Import alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore BinOpMod Str Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body TryExcept body Import alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad TryExcept body Import alias handlers ExceptHandler type NameLoad body Expr Call NameLoad Num Assign NameStore BoolOpOr NameLoad NameLoad Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Assign NameStore ListLoad Str Assign NameStore ListLoad Str NameLoad NameLoad Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str If NameLoad body Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore ListLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad Str attr ListLoad NameLoad NameLoad keyword NameLoad keyword BinOpMod Str NameLoad Assign NameStore ListLoad TupleLoad Str ListLoad Str FunctionDef arguments args defaults body Assign NameStore ListLoad Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword Str keyword Str keyword Str keyword ListLoad Str keyword Str keyword Str keyword ListLoad NameLoad keyword Call AttributeLoad NameLoad attr keyword TupleLoad Str keyword NameLoad keyword Dict Str Call NameLoad keyword NameLoad decorator_list Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str BinOpMod Str Call AttributeLoad NameLoad attr Str Str FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Str FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad Expr Call NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore BinOpAdd Str Str AugAssignAdd NameStore BinOpAdd BinOpAdd Str Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num If CompareLt Call NameLoad NameLoad Num body Expr Call NameLoad orelse If BoolOpAnd CompareEq SubscriptLoad NameLoad Index Num Str CompareEq SubscriptLoad NameLoad Index Num Str body Expr Call NameLoad orelse Expr Call NameLoad
N/A N/A 
Mac OS X app package maker script

FIRST OF ALL, READ THERE:

 * http://stackoverflow.com/questions/885906/enabling-jpeg-support-for-qimage-in-py2exe-compiled-python-scripts
 * http://www.thetoryparty.com/2009/08/27/pyqt-and-py2app-seriously-i-dont-know-what-to-do-with-you-when-youre-like-this/

Requirements:

    [altgraph](https://bitbucket.org/ronaldoussoren/altgraph/) is a fork of graphlib:
     a graph (network) package for constructing graphs, BFS and DFS traversals,
     topological sort, shortest paths, etc. with graphviz output.

    [macholib](https://bitbucket.org/ronaldoussoren/macholib/)
    is typically used as a dependency analysis tool,
    and also to rewrite dylib references in Mach-O headers to be @executable_path relative.

    [modulegraph](http://bitbucket.org/ronaldoussoren/modulegraph/)
    determines a dependency graph between Python modules primarily by bytecode analysis for import statements.

    [py2app](https://bitbucket.org/ronaldoussoren/py2app/) is a Python setuptools command which
    will allow you to make standalone Mac OS X application bundles and plugins from Python scripts.

NOTE: you **have to** install Python 2.7, PySide and qt4-mac by MacPorts,
		install py2app and its requirements by **manual**

Tested environment:
    Mac OS X 10.6.8


TODO: strip dist/$APP_NAME.app/Contents/Frameworks

 N/A compileall N/A os N/A setuptools N/A shutil N/A sys N/A PWD N/A N/A N/A os path dirname N/A N/A N/A os path realpath __file__ N/A APP_NAME foo N/A APP_VERSION 1.0 N/A APP_SCRIPT_NAME N/A %s.py N/A N/A APP_NAME lower get_py2app_options N/A N/A N/A N/A N/A N/A N/A PySide N/A PyQt4 None N/A N/A N/A ImportError N/A N/A PySide None N/A N/A N/A PyQt4 N/A N/A N/A ImportError N/A N/A N/A exit -1 N/A python_qt N/A PySide PyQt4 N/A qt_gui N/A %s.QtGui N/A python_qt __name__ N/A qt_core N/A %s.QtCore N/A python_qt __name__ N/A packages N/A PIL N/A includes N/A sip qt_gui qt_core N/A excludes N/A bz2 psycopg2 xml Tkinter Tix turtle pydoc decimal pickletools mailbox optparse idlelib distutils Carbon unittest N/A PyQt4 N/A N/A pyqt_excludes N/A PyQt4.QtCLucene PyQt4.QtDeclarative PyQt4.QtDesigner PyQt4.QtHelp PyQt4.QtMultimedia PyQt4.QtNetwork PyQt4.QtOpenGL PyQt4.QtScript PyQt4.QtSql PyQt4.QtSvg PyQt4.QtTest PyQt4.QtWebKit PyQt4.QtXml PyQt4.QtXmlPatterns PyQt4.QtScriptTools N/A N/A N/A excludes extend pyqt_excludes N/A N/A pyside_excludes N/A PyQt4 N/A N/A N/A excludes extend pyside_excludes N/A frameworks N/A /opt/local/lib/libxml2.2.dylib N/A py2app_options N/A packages includes excludes frameworks packages includes excludes frameworks N/A py2app_options N/A N/A plist N/A dict CFBundleName APP_NAME CFBundleShortVersionString APP_VERSION CFBundleGetInfoString N/A N/A join N/A APP_NAME APP_VERSION CFBundleExecutable APP_NAME CFBundleIdentifier N/A org.shuge-lab.%s APP_NAME N/A data_files N/A N/A N/A /opt/local/lib/Resources/qt_menu.nib _create_app N/A N/A N/A N/A N/A app_option N/A N/A script plist APP_SCRIPT_NAME plist N/A N/A N/A setuptools setup name APP_NAME version APP_VERSION description blah blah author Shuge Lee author_email shuge.lee@gmail.com platforms N/A Mac OS X license MIT License url http://foo.shuge-lab.org scripts N/A APP_SCRIPT_NAME packages N/A N/A setuptools find_packages exclude N/A demos app app_option options N/A py2app N/A get_py2app_options data_files data_files N/A N/A APP_RESOURCES_PATH N/A N/A N/A os path join PWD dist N/A %s.app N/A N/A APP_NAME lower Contents Resources delete_old_app N/A N/A N/A N/A N/A BUILD_PATH N/A N/A N/A os path join PWD build N/A DIST_PATH N/A N/A N/A os path join PWD dist N/A N/A N/A N/A os path exists BUILD_PATH N/A N/A N/A N/A shutil rmtree BUILD_PATH N/A N/A N/A N/A os path exists DIST_PATH N/A N/A N/A N/A shutil rmtree DIST_PATH N/A compile_py N/A N/A N/A N/A N/A N/A N/A compileall compile_dir PWD N/A N/A _QT_CONF_TPL patch_qt_conf N/A N/A N/A N/A N/A dst N/A N/A N/A os path join APP_RESOURCES_PATH qt.conf N/A f N/A file dst w N/A N/A N/A f write _QT_CONF_TPL N/A N/A N/A f close N/A package_app_for_mac N/A N/A N/A N/A N/A N/A delete_old_app N/A N/A compile_py N/A N/A _create_app N/A N/A patch_qt_conf N/A print_help N/A N/A N/A N/A N/A msg N/A Usage:  N/A msg N/A N/A python setup.py py2app build N/A N/A N/A N/A sys stdout write msg N/A N/A N/A __name__ __main__ N/A N/A args N/A N/A sys argv N/A 1 N/A N/A N/A len args 2 N/A N/A N/A print_help N/A N/A N/A N/A N/A args N/A 0 py2app N/A N/A args N/A 1 build N/A N/A N/A package_app_for_mac N/A N/A N/A print_help