##// END OF EJS Templates
bunch of modules to ignore in exesetup.py
vivainio -
Show More
@@ -1,102 +1,105 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
2 # -*- coding: utf-8 -*-
3 r"""Setup script for exe distribution of IPython (does not require python).
3 r"""Setup script for exe distribution of IPython (does not require python).
4
4
5 - Requires py2exe
5 - Requires py2exe
6
6
7 - install pyreadline *package dir* in ipython root directory by running:
7 - install pyreadline *package dir* in ipython root directory by running:
8
8
9 svn co http://ipython.scipy.org/svn/ipython/pyreadline/branches/maintenance_1.3/pyreadline/
9 svn co http://ipython.scipy.org/svn/ipython/pyreadline/branches/maintenance_1.3/pyreadline/
10 wget http://ipython.scipy.org/svn/ipython/pyreadline/branches/maintenance_1.3/readline.py
10 wget http://ipython.scipy.org/svn/ipython/pyreadline/branches/maintenance_1.3/readline.py
11
11
12 OR (if you want the latest trunk):
12 OR (if you want the latest trunk):
13
13
14 svn co http://ipython.scipy.org/svn/ipython/pyreadline/trunk/pyreadline
14 svn co http://ipython.scipy.org/svn/ipython/pyreadline/trunk/pyreadline
15
15
16 - Create the distribution in 'dist' by running "python exesetup.py py2exe"
16 - Create the distribution in 'dist' by running "python exesetup.py py2exe"
17
17
18 - Run ipython.exe to go.
18 - Run ipython.exe to go.
19
19
20 """
20 """
21
21
22 #*****************************************************************************
22 #*****************************************************************************
23 # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu>
23 # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu>
24 #
24 #
25 # Distributed under the terms of the BSD License. The full license is in
25 # Distributed under the terms of the BSD License. The full license is in
26 # the file COPYING, distributed as part of this software.
26 # the file COPYING, distributed as part of this software.
27 #*****************************************************************************
27 #*****************************************************************************
28
28
29 # Stdlib imports
29 # Stdlib imports
30 import os
30 import os
31 import sys
31 import sys
32
32
33 from glob import glob
33 from glob import glob
34
34
35
35
36 # A few handy globals
36 # A few handy globals
37 isfile = os.path.isfile
37 isfile = os.path.isfile
38 pjoin = os.path.join
38 pjoin = os.path.join
39
39
40 from distutils.core import setup
40 from distutils.core import setup
41 from distutils import dir_util
41 from distutils import dir_util
42 import py2exe
42 import py2exe
43
43
44 # update the manuals when building a source dist
44 # update the manuals when building a source dist
45 # Release.py contains version, authors, license, url, keywords, etc.
45 # Release.py contains version, authors, license, url, keywords, etc.
46 execfile(pjoin('IPython','Release.py'))
46 execfile(pjoin('IPython','Release.py'))
47
47
48 # A little utility we'll need below, since glob() does NOT allow you to do
48 # A little utility we'll need below, since glob() does NOT allow you to do
49 # exclusion on multiple endings!
49 # exclusion on multiple endings!
50 def file_doesnt_endwith(test,endings):
50 def file_doesnt_endwith(test,endings):
51 """Return true if test is a file and its name does NOT end with any
51 """Return true if test is a file and its name does NOT end with any
52 of the strings listed in endings."""
52 of the strings listed in endings."""
53 if not isfile(test):
53 if not isfile(test):
54 return False
54 return False
55 for e in endings:
55 for e in endings:
56 if test.endswith(e):
56 if test.endswith(e):
57 return False
57 return False
58 return True
58 return True
59
59
60
60
61 egg_extra_kwds = {}
61 egg_extra_kwds = {}
62
62
63 # Call the setup() routine which does most of the work
63 # Call the setup() routine which does most of the work
64 setup(name = name,
64 setup(name = name,
65 options = {
65 options = {
66 'py2exe': {
66 'py2exe': {
67 'packages' : ['IPython', 'IPython.Extensions', 'IPython.external','pyreadline'],
67 'packages' : ['IPython', 'IPython.Extensions', 'IPython.external',
68 'excludes' : ["Tkconstants","Tkinter","tcl",'IPython.igrid','wx','wxPython','igrid']
68 'pyreadline'],
69 'excludes' : ["Tkconstants","Tkinter","tcl",'IPython.igrid','wx',
70 'wxPython','igrid', 'PyQt4', 'zope', 'Zope', 'Zope2',
71 '_curses','enthought.traits','gtk','qt']
69
72
70 }
73 }
71 },
74 },
72 version = version,
75 version = version,
73 description = description,
76 description = description,
74 long_description = long_description,
77 long_description = long_description,
75 author = authors['Fernando'][0],
78 author = authors['Fernando'][0],
76 author_email = authors['Fernando'][1],
79 author_email = authors['Fernando'][1],
77 url = url,
80 url = url,
78 download_url = download_url,
81 download_url = download_url,
79 license = license,
82 license = license,
80 platforms = platforms,
83 platforms = platforms,
81 keywords = keywords,
84 keywords = keywords,
82 console = ['ipykit.py'],
85 console = ['ipykit.py'],
83
86
84 # extra params needed for eggs
87 # extra params needed for eggs
85 **egg_extra_kwds
88 **egg_extra_kwds
86 )
89 )
87
90
88 minimal_conf = """
91 minimal_conf = """
89 import IPython.ipapi
92 import IPython.ipapi
90 ip = IPython.ipapi.get()
93 ip = IPython.ipapi.get()
91 import ipy_profile_sh
94 import ipy_profile_sh
92 ip.load('ipy_kitcfg')
95 ip.load('ipy_kitcfg')
93
96
94 """
97 """
95
98
96 if not os.path.isdir("dist/_ipython"):
99 if not os.path.isdir("dist/_ipython"):
97 print "Creating simple _ipython dir"
100 print "Creating simple _ipython dir"
98 os.mkdir("dist/_ipython")
101 os.mkdir("dist/_ipython")
99 open("dist/_ipython/ipythonrc.ini","w").write("# intentionally blank\n")
102 open("dist/_ipython/ipythonrc.ini","w").write("# intentionally blank\n")
100 open("dist/_ipython/ipy_user_conf.py","w").write(minimal_conf)
103 open("dist/_ipython/ipy_user_conf.py","w").write(minimal_conf)
101 if os.path.isdir('bin'):
104 if os.path.isdir('bin'):
102 dir_util.copy_tree('bin','dist/_ipython/bin')
105 dir_util.copy_tree('bin','dist/_ipython/bin')
General Comments 0
You need to be logged in to leave comments. Login now