def get_py2app_options():
    try:
        import PySide
        PyQt4 = None
    except ImportError:
        PySide = None
        try:
            import PyQt4
        except ImportError:
            exit(-1)

    python_qt = PySide or PyQt4

    qt_gui = python_qt.__name__ % "%s.QtGui"
    qt_core = "%s.QtCore" % python_qt.__name__

    # specify third part python packages
#    packages = ["lxml", "PIL"]
    packages = ["PIL"]

#    includes = ["sip", qt_gui, qt_core, "web", "BeautifulSoup"]
    includes = ["sip", qt_gui, qt_core]
    excludes = ["bz2", "psycopg2", "xml", "Tkinter", "Tix", "turtle", "pydoc",
                "decimal", "pickletools", "mailbox", "optparse", "idlelib",
                "distutils", "Carbon", "unittest"]

    if PyQt4:
        pyqt_excludes = ["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"]
        excludes.extend(pyqt_excludes)
    else:
        pyside_excludes = ["PyQt4"]
        excludes.extend(pyside_excludes)

    frameworks = [
        "/opt/local/lib/libxml2.2.dylib",
        ]


    py2app_options = {
        "packages" : packages,
        "includes" : includes,
        "excludes" : excludes,
        "frameworks" : frameworks,
        }

    return py2app_options
dataset/ETHPy150Open shuge/Qt-Python-Binding-Examples/package_maker/py2app/with_image/setup.py/get_py2app_options/swapped operands of `%`