##// END OF EJS Templates
exesetup doc changes
vivainio -
Show More
@@ -1,101 +1,107 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
2 # -*- coding: utf-8 -*-
3 """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 - Create initial configuration by running:
19
20 mkdir dist\_ipython
21 touch dist/_ipython/ipythonrc.ini
22 echo "import ipy_profile_sh" > dist/ipy_user_conf.py
23
18 - Run ipython.exe to go.
24 - Run ipython.exe to go.
19
25
20 """
26 """
21
27
22 #*****************************************************************************
28 #*****************************************************************************
23 # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu>
29 # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu>
24 #
30 #
25 # Distributed under the terms of the BSD License. The full license is in
31 # Distributed under the terms of the BSD License. The full license is in
26 # the file COPYING, distributed as part of this software.
32 # the file COPYING, distributed as part of this software.
27 #*****************************************************************************
33 #*****************************************************************************
28
34
29 # Stdlib imports
35 # Stdlib imports
30 import os
36 import os
31 import sys
37 import sys
32
38
33 from glob import glob
39 from glob import glob
34
40
35
41
36 # A few handy globals
42 # A few handy globals
37 isfile = os.path.isfile
43 isfile = os.path.isfile
38 pjoin = os.path.join
44 pjoin = os.path.join
39
45
40 from distutils.core import setup
46 from distutils.core import setup
41 import py2exe
47 import py2exe
42
48
43 # update the manuals when building a source dist
49 # update the manuals when building a source dist
44 # Release.py contains version, authors, license, url, keywords, etc.
50 # Release.py contains version, authors, license, url, keywords, etc.
45 execfile(pjoin('IPython','Release.py'))
51 execfile(pjoin('IPython','Release.py'))
46
52
47 # A little utility we'll need below, since glob() does NOT allow you to do
53 # A little utility we'll need below, since glob() does NOT allow you to do
48 # exclusion on multiple endings!
54 # exclusion on multiple endings!
49 def file_doesnt_endwith(test,endings):
55 def file_doesnt_endwith(test,endings):
50 """Return true if test is a file and its name does NOT end with any
56 """Return true if test is a file and its name does NOT end with any
51 of the strings listed in endings."""
57 of the strings listed in endings."""
52 if not isfile(test):
58 if not isfile(test):
53 return False
59 return False
54 for e in endings:
60 for e in endings:
55 if test.endswith(e):
61 if test.endswith(e):
56 return False
62 return False
57 return True
63 return True
58
64
59
65
60 if 'setuptools' in sys.modules:
66 if 'setuptools' in sys.modules:
61 # setuptools config for egg building
67 # setuptools config for egg building
62 egg_extra_kwds = {
68 egg_extra_kwds = {
63 'entry_points': {
69 'entry_points': {
64 'console_scripts': [
70 'console_scripts': [
65 'ipython = IPython.ipapi:launch_new_instance',
71 'ipython = IPython.ipapi:launch_new_instance',
66 'pycolor = IPython.PyColorize:main'
72 'pycolor = IPython.PyColorize:main'
67 ]}
73 ]}
68 }
74 }
69 scriptfiles = []
75 scriptfiles = []
70 # eggs will lack docs, examples XXX not anymore
76 # eggs will lack docs, examples XXX not anymore
71 #datafiles = [('lib', 'IPython/UserConfig', cfgfiles)]
77 #datafiles = [('lib', 'IPython/UserConfig', cfgfiles)]
72 else:
78 else:
73 egg_extra_kwds = {}
79 egg_extra_kwds = {}
74
80
75 # Call the setup() routine which does most of the work
81 # Call the setup() routine which does most of the work
76 setup(name = name,
82 setup(name = name,
77 options = {
83 options = {
78 'py2exe': {
84 'py2exe': {
79 'packages' : ['IPython', 'IPython.Extensions', 'IPython.external','pyreadline'],
85 'packages' : ['IPython', 'IPython.Extensions', 'IPython.external','pyreadline'],
80 'excludes' : ["Tkconstants","Tkinter","tcl",'IPython.igrid','wx','wxPython','igrid']
86 'excludes' : ["Tkconstants","Tkinter","tcl",'IPython.igrid','wx','wxPython','igrid']
81
87
82 }
88 }
83 },
89 },
84 version = version,
90 version = version,
85 description = description,
91 description = description,
86 long_description = long_description,
92 long_description = long_description,
87 author = authors['Fernando'][0],
93 author = authors['Fernando'][0],
88 author_email = authors['Fernando'][1],
94 author_email = authors['Fernando'][1],
89 url = url,
95 url = url,
90 download_url = download_url,
96 download_url = download_url,
91 license = license,
97 license = license,
92 platforms = platforms,
98 platforms = platforms,
93 keywords = keywords,
99 keywords = keywords,
94 console = ['ipython.py'],
100 console = ['ipython.py'],
95
101
96 # extra params needed for eggs
102 # extra params needed for eggs
97 **egg_extra_kwds
103 **egg_extra_kwds
98 )
104 )
99
105
100
106
101
107
General Comments 0
You need to be logged in to leave comments. Login now