How to use the py2app.__version__ 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 barry-scott / scm-workbench / Kit / macOS / build-app-py2app-setup.py View on Github external
# -*- coding: utf-8 -*-

#
#   build-app-py2app-setup.py
#
import wb_scm_version
import os
from setuptools import setup

import py2app

min_py2app = [0,11]     # 0.11

py2app_version = [int(part) for part in py2app.__version__.split('.')]
if py2app_version < min_py2app:
    raise ValueError( 'build requires at least version %d.%d of py2app' % tuple(min_py2app) )

v = wb_scm_version.__dict__

short_version = '%(major)d.%(minor)d.%(patch)d' % v
info_string = '%(APP_NAME)s-Devel %(major)d.%(minor)d.%(patch)d %(commit)s ©%(copyright_years)s Barry A. Scott. All Rights Reserved.' % v

setup(
    app =
        ['%s/Source/Scm/wb_scm_main.py' % (os.environ['BUILDER_TOP_DIR'],)],
    data_files =
        [],
    options =
        {'py2app':
            {
github metachris / py2app / py2app / apptemplate / plist_template.py View on Github external
'@executable_path/../Frameworks/Python.framework/Versions/%s/Python',
            '~/Library/Frameworks/Python.framework/Versions/%s/Python',
            '/Library/Frameworks/Python.framework/Versions/%s/Python',
            '/Network/Library/Frameworks/Python.framework/Versions/%s/Python',
            '/System/Library/Frameworks/Python.framework/Versions/%s/Python',
        ]],
    )
    pdict.update(plist)
    pythonInfo = pdict.setdefault('PythonInfoDict', {})
    pythonInfo.update(dict(
        PythonLongVersion=sys.version,
        PythonShortVersion=sys.version[:3],
        PythonExecutable=sys.executable,
    ))
    py2appInfo = pythonInfo.setdefault('py2app', {}).update(dict(
        version=py2app.__version__,
        template='app',
    ))
    return pdict
github metachris / py2app / py2app / bundletemplate / plist_template.py View on Github external
'@executable_path/../Frameworks/Python.framework/Versions/%s/Python',
            '~/Library/Frameworks/Python.framework/Versions/%s/Python',
            '/Library/Frameworks/Python.framework/Versions/%s/Python',
            '/Network/Library/Frameworks/Python.framework/Versions/%s/Python',
            '/System/Library/Frameworks/Python.framework/Versions/%s/Python',
        ]],
    )
    pdict.update(plist)
    pythonInfo = pdict.setdefault('PythonInfoDict', {})
    pythonInfo.update(dict(
        PythonLongVersion=sys.version,
        PythonShortVersion=sys.version[:3],
        PythonExecutable=sys.executable,
    ))
    py2appInfo = pythonInfo.setdefault('py2app', {}).update(dict(
        version=py2app.__version__,
        template='bundle',
    ))
    return pdict
github geraldspreer / the-maker / setup.py View on Github external
'CFBundleTypeRole': 'Editor',
                'LSTypeIsPackage': True,
            },
        ],
             "LSApplicationCategoryType" : "public.app-category.developer-tools",
             "CFBundleVersion" : makerVersion.appVersion, 
             "CFBundleDisplayName" : "TheMaker",
             "NSHumanReadableCopyright" : "Gerald Spreer"
  
}

if sys.platform == 'darwin':
    import py2app
    buildstyle = 'app'
    print "#---------------------------------------------------------"
    print "building with py2app version: ", py2app.__version__
    print "#---------------------------------------------------------"


setup(
      options=dict(py2app=dict(plist=plist)),
      name="TheMaker",
      **{buildstyle : ['maker.py']}
)
github kanzure / nanoengineer / Distribution / autoBuild.py View on Github external
def startup_warnings(self): #bruce 060420
        print "* * * WARNING: after most of this script has finished, we'll run a sudo chown root"
        print "command which might ask for your root password."
        print
        print "(making sure some required imports will succeed)"
        import py2app as _junk # required by 'python setup.py py2app'
            #e Note: we should print py2app path and version. For Mac Qt3, Ninad used py2app 0.1.5.
            # For Qt4, so far 0.1.5 and 0.3.5 were tried and didn't work. Bruce plans to try 0.3.6.
            # Some pathnames in the app have changed and will require compensation here and/or in Python sources.
        print "py2app.__version__ = %r (not controlled by autoBuild.py -- up to you whether it's right)" % (_junk.__version__,)
            #bruce 070427
        ##e should also make sure the files we'll later copy are there, e.g. gnuplot
        libaquaterm_path = os.path.join(self.currentPath, 'libaquaterm.1.0.0.dylib')
        its_md5 = self.get_md5( libaquaterm_path )
        assert its_md5 == self.LIBAQUA_MD5, "MD5 of %r should be %r but is %r" % ( libaquaterm_path, self.LIBAQUA_MD5, its_md5 )
        # see if PackageMaker is findable [bruce 070427]
        print 
        print "If the following says \"command not found\" rather than printing some"
        print "PackageMaker help info, abort this command and fix your shell path:"
        print
        try:
            system('export PATH=$PATH:/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS;'\
                   'PackageMaker -help')
        except NonZeroExitStatus:
            pass # it's usually exit status 1, so nevermind
        print
github SasView / sasview / deps.py View on Github external
try:
        import reportlab
        print "reportlab ", reportlab.Version
    except:
        print "No reportlab"
        
    try:
        import PIL
        print "PIL"
    except:
        print "No PIL"
        
    # The following is necessary to build an app
    try:
        import py2app
        print "py2app ", py2app.__version__
    except:
        print "No py2app: recommending version >= 0.6.4"
        
    try:
        import altgraph
        print "altgraph ", altgraph.__version__
    except:
        print "No altgraph"    
        
    try:
        import modulegraph
        print "modulegraph ", modulegraph.__version__
    except:
        print "No modulegraph: recommending version >= 0.9.1"
        
    try: