How to use the py2app.util.skipscm function in py2app

To help you get started, we’ve selected a few py2app examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github metachris / py2app / py2app / create_pluginbundle.py View on Github external
def create_pluginbundle(destdir, name, extension='.plugin', module=py2app.bundletemplate,
        platform='MacOS', copy=mergecopy, mergetree=mergetree,
        condition=skipscm, plist={}, arch=None):
    kw = module.plist_template.infoPlistDict(
        plist.get('CFBundleExecutable', name), plist)
    plugin = os.path.join(destdir, kw['CFBundleName'] + extension)
    if os.path.exists(plugin):
        # Remove any existing build artifacts to ensure
        # we're getting a clean build
        shutil.rmtree(plugin)
    contents = os.path.join(plugin, 'Contents')
    resources = os.path.join(contents, 'Resources')
    platdir = os.path.join(contents, platform)
    dirs = [contents, resources, platdir]
    plist = plistlib.Plist()
    plist.update(kw)
    plistPath = os.path.join(contents, 'Info.plist')
    if os.path.exists(plistPath):
        if plist != plistlib.Plist.fromFile(plistPath):
github metachris / py2app / py2app / build_app.py View on Github external
def framework_copy_condition(src):
    # Skip Headers, .svn, and CVS dirs
    return skipscm(src) and os.path.basename(src) != 'Headers'
github metachris / py2app / py2app / create_appbundle.py View on Github external
def create_appbundle(destdir, name, extension='.app', module=py2app.apptemplate,
        platform='MacOS', copy=mergecopy, mergetree=mergetree,
        condition=skipscm, plist={}, arch=None):
    kw = module.plist_template.infoPlistDict(
        plist.get('CFBundleExecutable', name), plist)
    app = os.path.join(destdir, kw['CFBundleName'] + extension)
    if os.path.exists(app):
        # Remove any existing build artifacts to ensure that
        # we're getting a clean build
        shutil.rmtree(app)
    contents = os.path.join(app, 'Contents')
    resources = os.path.join(contents, 'Resources')
    platdir = os.path.join(contents, platform)
    dirs = [contents, resources, platdir]
    plist = plistlib.Plist()
    plist.update(kw)
    plistPath = os.path.join(contents, 'Info.plist')
    if os.path.exists(plistPath):
        if plist != plistlib.Plist.fromFile(plistPath):