Example #1
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    name = "spyder"
    ver = spyder.__version__
    try:
        imp.find_module('PyQt4')
        python_qt = 'pyqt'
    except ImportError:
        python_qt = 'pyside'
    dist.setup(name="Spyder", version=ver, script="spyder/spyder.py",
               description="Scientific PYthon Development EnviRonment",
               target_name="%s.exe" % name, icon="%s.ico" % name,
               target_dir="%s-win32-%s-sa-%s" % (name, python_qt, ver))
    spyder.add_to_distribution(dist)
    dist.add_modules('matplotlib', 'h5py', 'scipy.io', 'guidata', 'pygments')
    try:
        import guiqwt  # analysis:ignore
        dist.add_modules('guiqwt')
    except ImportError:
        pass
    dist.includes += ['spyder.scientific_startup',
                      'spyder.widgets.externalshell.sitecustomize']

    #XXX: ...until we are able to distribute them (see guidata.disthelpers)
    dist.excludes += ['sphinx', 'zmq', 'IPython']

    if osp.isfile("Spyderdoc.chm"):
        dist.add_data_file("Spyderdoc.chm")
    dist.add_data_file(osp.join("rope", "base", "default_config.py"))
    # Building executable
    dist.build('cx_Freeze')#, create_archive='move')
Example #2
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    head=os.path.join("..","swmm5ea")
    #lst=[glob(os.path.join(head,x)) for x in sc.LIST_OF_FILE_GLOBS]
    #lst=[item for sublist in lst for item in sublist]
    #data_files=[[dirname(x)[13:],[x]] for x in lst]
    
    cwd=os.path.abspath(os.path.join(os.getcwd(),"..","swmm5ea"))
    data_files=[[
        os.path.dirname(x[len(cwd)+1:]),
        [os.path.join("..","swmm5ea",x[len(cwd)+1:])]
        ] for x in sc.LIST_OF_FILE_GLOBS ]  
    
    for i in data_files:
        print i
    #raw_input()    
    dist = Distribution()
    dist.setup( name=sc.NAME, version=sc.VERSION,
               description=sc.DESCRIPTION,
               script="..\swmm5ea\swmm5ec_.pyw", target_name=sc.TARGET,
    icon="../res/DNA.ico",
    data_files=data_files)

    dist.add_modules('guidata', 'guiqwt')
    # Building executable
    dist.build('cx_Freeze')
Example #3
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    name = "spyder"
    ver = spyder.__version__
    try:
        imp.find_module('PyQt4')
        python_qt = 'pyqt'
    except ImportError:
        python_qt = 'pyside'
    dist.setup(name="Spyder", version=ver, script="spyder/spyder.py",
               description="Scientific PYthon Development EnviRonment",
               target_name="%s.exe" % name, icon="%s.ico" % name,
               target_dir="%s-win32-%s-sa-%s" % (name, python_qt, ver))
    spyder.add_to_distribution(dist)
    dist.add_modules('matplotlib', 'h5py', 'scipy.io', 'guidata', 'pygments')
    try:
        import guiqwt  # analysis:ignore
        dist.add_modules('guiqwt')
    except ImportError:
        pass
    dist.includes += ['spyder.utils.site.sitecustomize']

    #XXX: ...until we are able to distribute them (see guidata.disthelpers)
    dist.excludes += ['sphinx', 'zmq', 'IPython']

    if osp.isfile("Spyderdoc.chm"):
        dist.add_data_file("Spyderdoc.chm")
    dist.add_data_file(osp.join("rope", "base", "default_config.py"))
    # Building executable
    dist.build('cx_Freeze')#, create_archive='move')
Example #4
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    head = os.path.join("..", "swmm5ea")
    #lst=[glob(os.path.join(head,x)) for x in sc.LIST_OF_FILE_GLOBS]
    #lst=[item for sublist in lst for item in sublist]
    #data_files=[[dirname(x)[13:],[x]] for x in lst]

    cwd = os.path.abspath(os.path.join(os.getcwd(), "..", "swmm5ea"))
    data_files = [[
        os.path.dirname(x[len(cwd) + 1:]),
        [os.path.join("..", "swmm5ea", x[len(cwd) + 1:])]
    ] for x in sc.LIST_OF_FILE_GLOBS]

    for i in data_files:
        print i
    #raw_input()
    dist = Distribution()
    dist.setup(name=sc.NAME,
               version=sc.VERSION,
               description=sc.DESCRIPTION,
               script="..\swmm5ea\swmm5ec_.pyw",
               target_name=sc.TARGET,
               icon="../res/DNA.ico",
               data_files=data_files)

    dist.add_modules('guidata', 'guiqwt')
    # Building executable
    dist.build('cx_Freeze')
Example #5
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    dist.setup(name="Example", version="1.1",
               description="Embedding Spyder Qt shell",
               script="example.pyw", target_name="example.exe")
    spyderlib.add_to_distribution(dist)
    #dist.add_modules('matplotlib')  # Uncomment if you need matplotlib
    dist.excludes += ['IPython']
    # Building executable
    dist.build('cx_Freeze')
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    dist.setup(name="Example",
               version="1.1",
               description="Embedding Spyder Qt shell",
               script="example.pyw",
               target_name="example.exe")
    spyderlib.add_to_distribution(dist)
    #dist.add_modules('matplotlib')  # Uncomment if you need matplotlib
    dist.excludes += ['IPython']
    # Building executable
    dist.build('cx_Freeze')
Example #7
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    dist.setup(name="LM ratio", version="0.2",
               description=u"A gui for computing LM ratio",
               script="gui_LMratio.py", target_name="LMratio.exe")
    dist.add_data_file('dat')
    dist.add_data_file('lm_ratiorc.txt')
    dist.add_modules('guidata')
    dist.add_modules('guiqwt')
    dist.add_matplotlib()
    dist.includes += ['scipy.sparse.csgraph._validation']
    dist.includes += ['scipy.sparse.linalg.dsolve.umfpack']
    dist.excludes += ['IPython']
    # Building executable
    dist.build('cx_Freeze', cleanup=True)
Example #8
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    dist.setup(
        name="Sift",
        version=sift.VERSION,
        description="Signal and Image Filtering Tool",
        script="sift.pyw",
        target_name="sift.exe",
        target_dir="%s-%s" % ("Sift", sift.VERSION),
        icon="sift.ico",
    )
    dist.add_modules("guidata", "guiqwt")
    dist.excludes += ["IPython"]

    # Building executable
    dist.build("cx_Freeze", create_archive="move")
Example #9
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    dist.setup(
        name="birdsong",
        version="0.1",
        description=u"Simple bird song analysis program",
        script="gui.pyw",
        target_name="birdsong.exe",
    )

    spyderlib.add_to_distribution(dist)
    dist.add_data_file("gitInfo.txt")
    dist.add_modules("guidata")
    dist.excludes += ["IPython", "scipy", "guiqwt"]
    # Building executable
    dist.build("cx_Freeze")
Example #10
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    dist.setup(name="Sift", version=sift.VERSION,
               description="Signal and Image Filtering Tool",
               script="sift.pyw", target_name="sift.exe",
               target_dir="%s-%s" % ("Sift", sift.VERSION), icon="sift.ico")
    dist.add_modules('guidata', 'guiqwt')
    try:
        import spyderlib
        spyderlib.add_to_distribution(dist)
    except ImportError:
        pass
    dist.excludes += ['IPython']

    # Building executable
    dist.build('cx_Freeze', create_archive='move')
Example #11
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    #dist.includes += ['DatabaseWrapper', 'DataViewer', 'Utilities']
    dist.setup(name="Database", version="1.1",
               description=u"HDF5 database in a gui shell",
               script="guiMain.pyw", target_name="Database.exe")
               
    spyderlib.add_to_distribution(dist)
    dist.add_data_file('gitInfo.txt')
    dist.add_modules('guidata')
    dist.add_modules('guiqwt')
    dist.add_modules('scipy.io')
    dist.add_modules('h5py')
    dist.add_modules('spyderlib')
    dist.excludes += ['IPython']
    # Building executable
    dist.build('cx_Freeze')
Example #12
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    #dist.DEFAULT_EXCLUDES.remove('Tkinter')
    #dist.DEFAULT_EXCLUDES.remove('FixTk')
    del dist.DEFAULT_EXCLUDES[:]
    dist.setup(name="Example", version="1.1",
               description="Embedding Spyder Qt shell",
               script="retina.py", target_name="example.exe")
    spyderlib.add_to_distribution(dist)
    dist.add_modules('PyQt4')
    dist.add_modules('matplotlib')  # Uncomment if you need matplotlib
    dist.includes+=['matplotlib.backends.backend_qt4agg']
    #dist.add_modules('pyraf')
    #dist.add_modules('matplotlib.backends.backend_qt4agg')
    #dist.add_modules('backend_qt4')
    #dist.excludes += ['IPython']
    # Building executable
    dist.build('cx_Freeze')
Example #13
0
def create_executable():
    """Build executable using ``guidata.disthelpers``"""
    dist = Distribution()
    dist.setup(name="Sift",
               version=sift.VERSION,
               description="Signal and Image Filtering Tool",
               script="sift.pyw",
               target_name="sift.exe",
               target_dir="%s-%s" % ("Sift", sift.VERSION),
               icon="sift.ico")
    dist.add_modules('guidata', 'guiqwt')
    try:
        import spyderlib
        spyderlib.add_to_distribution(dist)
    except ImportError:
        pass
    dist.excludes += ['IPython']

    # Building executable
    dist.build('cx_Freeze', create_archive='move')
Example #14
0
# -*- coding: utf-8 -*-
#
# Copyright © 2011 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guidata/__init__.py for details)
"""
guidata.disthelpers demo

How to create an executable with py2exe or cx_Freeze with less efforts than
writing a complete setup script.
"""

SHOW = True  # Show test in GUI-based test launcher

import os.path as osp

from guidata.disthelpers import Distribution

if __name__ == '__main__':
    dist = Distribution()
    dist.setup(name="Application demo",
               version='1.0.0',
               description="Application demo based on editgroupbox.py",
               script=osp.join(osp.dirname(__file__), "editgroupbox.py"),
               target_name="demo.exe")
    dist.add_modules('guidata')
    dist.build('cx_Freeze')
Example #15
0
# -*- coding: utf-8 -*-
#
# Copyright © 2011 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guidata/__init__.py for details)

"""
guidata.disthelpers demo

How to create an executable with py2exe or cx_Freeze with less efforts than
writing a complete setup script.
"""

SHOW = True # Show test in GUI-based test launcher

from guidata.disthelpers import Distribution

if __name__ == '__main__':
    dist = Distribution()
    dist.setup(name="Application demo", version='1.0.0',
               description="Application demo based on editgroupbox.py",
               script="editgroupbox.py", target_name="demo.exe")
    dist.add_modules('guidata')
    dist.build('cx_Freeze')

Example #16
0
            'c:\Python27\lib\site-packages\PyQt4\plugins\imageformats\qjpeg4.dll',
            'c:\Python27\lib\site-packages\PyQt4\plugins\imageformats\qsvg4.dll',
            'c:\Python27\lib\site-packages\PyQt4\plugins\imageformats\qico4.dll',
            ])]

        dist.excludes += [
                  '_gtkagg',
                  '_tkagg',
                  '_agg2',
                  '_cairo',
                  '_cocoaagg',
                  '_fltkagg',
                  '_gtk',
                  '_gtkcairo', ]

        dist.build('py2exe')

        '''
            拷贝响应的图片皮肤和与项目有关的资源文件到打包目录
        '''
        for item in ['icons', 'images', 'skin', 'wavs']:
            shutil.copytree(os.getcwd() + os.sep + item, os.getcwd() + os.sep + os.sep.join(['dist', item]))

        library_zippath = os.getcwd() + os.sep + os.sep.join(['dist', 'library.zip'])
        library_path = os.getcwd() + os.sep + os.sep.join(['dist', 'library'])
        with zipfile.ZipFile(library_zippath, 'r') as zip_file:
            zip_file.extractall(path=library_path)
        shutil.rmtree(library_path + os.sep + 'pyqtgraph')
        for item in ['pyqtgraph']:
            package = __import__(item)
            package_path = os.path.dirname(package.__file__)