~ubuntu-branches/debian/experimental/spyder/experimental

« back to all changes in this revision

Viewing changes to app_example/create_exe.py

  • Committer: Package Import Robot
  • Author(s): Picca Frédéric-Emmanuel
  • Date: 2013-01-20 12:19:54 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20130120121954-1jt1xa924bshhvh0
Tags: 2.2.0~beta1+dfsg-2
fix typo ipython-qtconsol -> ipython-qtconsole

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
#
3
 
# Copyright © 2011 Pierre Raybaut
4
 
# Licensed under the terms of the MIT License
5
 
# (see spyderlib/__init__.py for details)
6
 
 
7
 
"""Create a stand-alone executable"""
8
 
 
9
 
try:
10
 
    from guidata.disthelpers import Distribution
11
 
except ImportError:
12
 
    raise ImportError, "This script requires guidata 1.4+"
13
 
 
14
 
import spyderlib
15
 
 
16
 
 
17
 
def create_executable():
18
 
    """Build executable using ``guidata.disthelpers``"""
19
 
    dist = Distribution()
20
 
    dist.setup(name="Example", version="1.1",
21
 
               description=u"Embedding Spyder Qt shell",
22
 
               script="example.pyw", target_name="example.exe")
23
 
    spyderlib.add_to_distribution(dist)
24
 
    #dist.add_modules('matplotlib')  # Uncomment if you need matplotlib
25
 
    dist.excludes += ['IPython']
26
 
    # Building executable
27
 
    dist.build('cx_Freeze')
28
 
 
29
 
 
30
 
if __name__ == '__main__':
31
 
    create_executable()
 
1
# -*- coding: utf-8 -*-
 
2
#
 
3
# Copyright © 2011 Pierre Raybaut
 
4
# Licensed under the terms of the MIT License
 
5
# (see spyderlib/__init__.py for details)
 
6
 
 
7
"""Create a stand-alone executable"""
 
8
 
 
9
try:
 
10
    from guidata.disthelpers import Distribution
 
11
except ImportError:
 
12
    raise ImportError, "This script requires guidata 1.4+"
 
13
 
 
14
import spyderlib
 
15
 
 
16
 
 
17
def create_executable():
 
18
    """Build executable using ``guidata.disthelpers``"""
 
19
    dist = Distribution()
 
20
    dist.setup(name="Example", version="1.1",
 
21
               description=u"Embedding Spyder Qt shell",
 
22
               script="example.pyw", target_name="example.exe")
 
23
    spyderlib.add_to_distribution(dist)
 
24
    #dist.add_modules('matplotlib')  # Uncomment if you need matplotlib
 
25
    dist.excludes += ['IPython']
 
26
    # Building executable
 
27
    dist.build('cx_Freeze')
 
28
 
 
29
 
 
30
if __name__ == '__main__':
 
31
    create_executable()