Ejemplo n.º 1
0
def main():
    scripts = sys.argv[1:]
    if not scripts:
        print "Version: %s (Python %s)" % (version, ".".join([str(x) for x in sys.version_info]))
        print "Usage: bbfreeze SCRIPT1 [SCRIPT2...]"
        print "   creates standalone executables from python scripts SCRIPT1,..."
        print

        sys.exit(0)

    f = Freezer()
    for x in scripts:
        f.addScript(x)
    f()
Ejemplo n.º 2
0
def main():
    scripts = sys.argv[1:]
    if not scripts:
        print "Version: %s (Python %s)" % (version, ".".join([str(x) for x in sys.version_info]))
        print "Usage: bbfreeze SCRIPT1 [SCRIPT2...]"
        print "   creates standalone executables from python scripts SCRIPT1,..."
        print

        sys.exit(0)

    f = Freezer()
    for x in scripts:
        f.addScript(x)
    f()
Ejemplo n.º 3
0
includes = [ 'neural.api', 'neural.runner.api',
             'neural_experiments.digits.api' ]
excludes = [ 'apptools', 'ets', 'etsdevtools', 'pyface', 'PIL', 
             'PyQt4', 'PySide', 'sip', 'wx' ]

# Include MKL shared libraries that cannot be detected automatically.
try:
    import mkl
except ImportError:
    pass
else:
    def add_shared_library(mf, m, filename):
        n = mf.createNode(SharedLibrary, os.path.basename(filename))
        n.filename = filename
        mf.createReference(m, n)

    def recipe_mkl(mf):
        m = mf.findNode('mkl')
        deps = getDependencies(m.filename)
        mkl_libs = filter(lambda lib: 'libmkl' in lib, deps)
        mkl_dir = os.path.split(mkl_libs[0])[0]
        for lib in ['libmkl_def.so', 'libmkl_mc.so']:
            add_shared_library(mf, m, os.path.join(mkl_dir, lib))
        
    includes.append('mkl')
    bbfreeze.recipes.recipe_mkl = recipe_mkl

freezer = Freezer('neural-0.1', includes=includes, excludes=excludes)
freezer.addScript('runner.py')
freezer()