Show More
@@ -1,34 +1,35 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | """Script to auto-generate our API docs. |
|
2 | """Script to auto-generate our API docs. | |
3 | """ |
|
3 | """ | |
4 | # stdlib imports |
|
4 | # stdlib imports | |
5 | import os |
|
5 | import os | |
6 | import sys |
|
6 | import sys | |
7 |
|
7 | |||
8 | # local imports |
|
8 | # local imports | |
9 | sys.path.append(os.path.abspath('sphinxext')) |
|
9 | sys.path.append(os.path.abspath('sphinxext')) | |
10 | from apigen import ApiDocWriter |
|
10 | from apigen import ApiDocWriter | |
11 |
|
11 | |||
12 | #***************************************************************************** |
|
12 | #***************************************************************************** | |
13 | if __name__ == '__main__': |
|
13 | if __name__ == '__main__': | |
14 | pjoin = os.path.join |
|
14 | pjoin = os.path.join | |
15 | package = 'IPython' |
|
15 | package = 'IPython' | |
16 | outdir = pjoin('source','api','generated') |
|
16 | outdir = pjoin('source','api','generated') | |
17 | docwriter = ApiDocWriter(package,rst_extension='.txt') |
|
17 | docwriter = ApiDocWriter(package,rst_extension='.txt') | |
18 | docwriter.package_skip_patterns += [r'\.fixes$', |
|
18 | docwriter.package_skip_patterns += [r'\.fixes$', | |
19 | r'\.externals$', |
|
19 | r'\.externals$', | |
20 | r'\.Extensions', |
|
20 | r'\.Extensions', | |
21 | r'\.kernel.config', |
|
21 | r'\.kernel.config', | |
22 | r'\.attic', |
|
22 | r'\.attic', | |
23 | ] |
|
23 | ] | |
24 | docwriter.module_skip_patterns += [ r'\.FakeModule', |
|
24 | docwriter.module_skip_patterns += [ r'\.FakeModule', | |
|
25 | r'\.gui.wx.wxIPython', | |||
25 | r'\.cocoa', |
|
26 | r'\.cocoa', | |
26 | r'\.ipdoctest', |
|
27 | r'\.ipdoctest', | |
27 | r'\.Gnuplot', |
|
28 | r'\.Gnuplot', | |
28 | r'\.frontend.process.winprocess', |
|
29 | r'\.frontend.process.winprocess', | |
29 | ] |
|
30 | ] | |
30 | docwriter.write_api_docs(outdir) |
|
31 | docwriter.write_api_docs(outdir) | |
31 | docwriter.write_index(outdir, 'gen', |
|
32 | docwriter.write_index(outdir, 'gen', | |
32 | relative_to = pjoin('source','api') |
|
33 | relative_to = pjoin('source','api') | |
33 | ) |
|
34 | ) | |
34 | print '%d files written' % len(docwriter.written_modules) |
|
35 | print '%d files written' % len(docwriter.written_modules) |
@@ -1,13 +1,18 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | """Wrapper to run setup.py using setuptools.""" |
|
2 | """Wrapper to run setup.py using setuptools.""" | |
3 |
|
3 | |||
4 | import os |
|
4 | import os | |
|
5 | import shutil | |||
5 | import sys |
|
6 | import sys | |
6 |
|
7 | |||
7 | # now, import setuptools and call the actual setup |
|
8 | # now, import setuptools and call the actual setup | |
8 | import setuptools |
|
9 | import setuptools | |
9 | execfile('setup.py') |
|
10 | execfile('setup.py') | |
10 |
|
11 | |||
11 | # clean up the junk left around by setuptools |
|
12 | # clean up the junk left around by setuptools | |
12 | if "develop" not in sys.argv: |
|
13 | if "develop" not in sys.argv: | |
13 |
|
|
14 | egg_info = 'ipython.egg-info' | |
|
15 | if os.path.isdir(egg_info): | |||
|
16 | shutil.rmtree(egg_info) | |||
|
17 | else: | |||
|
18 | os.unlink(egg_info) |
@@ -1,178 +1,177 b'' | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 |
|
2 | |||
3 | __docformat__ = "restructuredtext en" |
|
3 | __docformat__ = "restructuredtext en" | |
4 |
|
4 | |||
5 | #------------------------------------------------------------------------------- |
|
5 | #------------------------------------------------------------------------------- | |
6 | # Copyright (C) 2008 The IPython Development Team |
|
6 | # Copyright (C) 2008 The IPython Development Team | |
7 | # |
|
7 | # | |
8 | # Distributed under the terms of the BSD License. The full license is in |
|
8 | # Distributed under the terms of the BSD License. The full license is in | |
9 | # the file COPYING, distributed as part of this software. |
|
9 | # the file COPYING, distributed as part of this software. | |
10 | #------------------------------------------------------------------------------- |
|
10 | #------------------------------------------------------------------------------- | |
11 |
|
11 | |||
12 | #------------------------------------------------------------------------------- |
|
12 | #------------------------------------------------------------------------------- | |
13 | # Imports |
|
13 | # Imports | |
14 | #------------------------------------------------------------------------------- |
|
14 | #------------------------------------------------------------------------------- | |
15 |
|
15 | |||
16 | import sys, os |
|
16 | import sys, os | |
17 | from textwrap import fill |
|
17 | from textwrap import fill | |
18 |
|
18 | |||
19 | display_status=True |
|
19 | display_status=True | |
20 |
|
20 | |||
21 | if display_status: |
|
21 | if display_status: | |
22 | def print_line(char='='): |
|
22 | def print_line(char='='): | |
23 | print char * 76 |
|
23 | print char * 76 | |
24 |
|
24 | |||
25 | def print_status(package, status): |
|
25 | def print_status(package, status): | |
26 | initial_indent = "%22s: " % package |
|
26 | initial_indent = "%22s: " % package | |
27 | indent = ' ' * 24 |
|
27 | indent = ' ' * 24 | |
28 | print fill(str(status), width=76, |
|
28 | print fill(str(status), width=76, | |
29 | initial_indent=initial_indent, |
|
29 | initial_indent=initial_indent, | |
30 | subsequent_indent=indent) |
|
30 | subsequent_indent=indent) | |
31 |
|
31 | |||
32 | def print_message(message): |
|
32 | def print_message(message): | |
33 | indent = ' ' * 24 + "* " |
|
33 | indent = ' ' * 24 + "* " | |
34 | print fill(str(message), width=76, |
|
34 | print fill(str(message), width=76, | |
35 | initial_indent=indent, |
|
35 | initial_indent=indent, | |
36 | subsequent_indent=indent) |
|
36 | subsequent_indent=indent) | |
37 |
|
37 | |||
38 | def print_raw(section): |
|
38 | def print_raw(section): | |
39 | print section |
|
39 | print section | |
40 | else: |
|
40 | else: | |
41 | def print_line(*args, **kwargs): |
|
41 | def print_line(*args, **kwargs): | |
42 | pass |
|
42 | pass | |
43 | print_status = print_message = print_raw = print_line |
|
43 | print_status = print_message = print_raw = print_line | |
44 |
|
44 | |||
45 | #------------------------------------------------------------------------------- |
|
45 | #------------------------------------------------------------------------------- | |
46 | # Tests for specific packages |
|
46 | # Tests for specific packages | |
47 | #------------------------------------------------------------------------------- |
|
47 | #------------------------------------------------------------------------------- | |
48 |
|
48 | |||
49 | def check_for_ipython(): |
|
49 | def check_for_ipython(): | |
50 | try: |
|
50 | try: | |
51 | import IPython |
|
51 | import IPython | |
52 | except ImportError: |
|
52 | except ImportError: | |
53 | print_status("IPython", "Not found") |
|
53 | print_status("IPython", "Not found") | |
54 | return False |
|
54 | return False | |
55 | else: |
|
55 | else: | |
56 | print_status("IPython", IPython.__version__) |
|
56 | print_status("IPython", IPython.__version__) | |
57 | return True |
|
57 | return True | |
58 |
|
58 | |||
59 | def check_for_zopeinterface(): |
|
59 | def check_for_zopeinterface(): | |
60 | try: |
|
60 | try: | |
61 | import zope.interface |
|
61 | import zope.interface | |
62 | except ImportError: |
|
62 | except ImportError: | |
63 | print_status("zope.Interface", "Not found (required for parallel computing capabilities)") |
|
63 | print_status("zope.Interface", "Not found (required for parallel computing capabilities)") | |
64 | return False |
|
64 | return False | |
65 | else: |
|
65 | else: | |
66 | print_status("Zope.Interface","yes") |
|
66 | print_status("Zope.Interface","yes") | |
67 | return True |
|
67 | return True | |
68 |
|
68 | |||
69 | def check_for_twisted(): |
|
69 | def check_for_twisted(): | |
70 | try: |
|
70 | try: | |
71 | import twisted |
|
71 | import twisted | |
72 | except ImportError: |
|
72 | except ImportError: | |
73 | print_status("Twisted", "Not found (required for parallel computing capabilities)") |
|
73 | print_status("Twisted", "Not found (required for parallel computing capabilities)") | |
74 | return False |
|
74 | return False | |
75 | else: |
|
75 | else: | |
76 | major = twisted.version.major |
|
76 | major = twisted.version.major | |
77 | minor = twisted.version.minor |
|
77 | minor = twisted.version.minor | |
78 | micro = twisted.version.micro |
|
78 | micro = twisted.version.micro | |
79 | print_status("Twisted", twisted.version.short()) |
|
79 | print_status("Twisted", twisted.version.short()) | |
80 | if not ((major==2 and minor>=5 and micro>=0) or \ |
|
80 | if not ((major==2 and minor>=5 and micro>=0) or \ | |
81 | major>=8): |
|
81 | major>=8): | |
82 | print_message("WARNING: IPython requires Twisted 2.5.0 or greater, you have version %s"%twisted.version.short()) |
|
82 | print_message("WARNING: IPython requires Twisted 2.5.0 or greater, you have version %s"%twisted.version.short()) | |
83 | print_message("Twisted is required for parallel computing capabilities") |
|
83 | print_message("Twisted is required for parallel computing capabilities") | |
84 | return False |
|
84 | return False | |
85 | else: |
|
85 | else: | |
86 | return True |
|
86 | return True | |
87 |
|
87 | |||
88 | def check_for_foolscap(): |
|
88 | def check_for_foolscap(): | |
89 | try: |
|
89 | try: | |
90 | import foolscap |
|
90 | import foolscap | |
91 | except ImportError: |
|
91 | except ImportError: | |
92 | print_status('Foolscap', "Not found (required for parallel computing capabilities)") |
|
92 | print_status('Foolscap', "Not found (required for parallel computing capabilities)") | |
93 | return False |
|
93 | return False | |
94 | else: |
|
94 | else: | |
95 | print_status('Foolscap', foolscap.__version__) |
|
95 | print_status('Foolscap', foolscap.__version__) | |
96 | return True |
|
96 | return True | |
97 |
|
97 | |||
98 | def check_for_pyopenssl(): |
|
98 | def check_for_pyopenssl(): | |
99 | try: |
|
99 | try: | |
100 | import OpenSSL |
|
100 | import OpenSSL | |
101 | except ImportError: |
|
101 | except ImportError: | |
102 | print_status('OpenSSL', "Not found (required if you want security in the parallel computing capabilities)") |
|
102 | print_status('OpenSSL', "Not found (required if you want security in the parallel computing capabilities)") | |
103 | return False |
|
103 | return False | |
104 | else: |
|
104 | else: | |
105 | print_status('OpenSSL', OpenSSL.__version__) |
|
105 | print_status('OpenSSL', OpenSSL.__version__) | |
106 | return True |
|
106 | return True | |
107 |
|
107 | |||
108 | def check_for_sphinx(): |
|
108 | def check_for_sphinx(): | |
109 | try: |
|
109 | try: | |
110 | import sphinx |
|
110 | import sphinx | |
111 | except ImportError: |
|
111 | except ImportError: | |
112 | print_status('sphinx', "Not found (required for building documentation)") |
|
112 | print_status('sphinx', "Not found (required for building documentation)") | |
113 | return False |
|
113 | return False | |
114 | else: |
|
114 | else: | |
115 | print_status('sphinx', sphinx.__version__) |
|
115 | print_status('sphinx', sphinx.__version__) | |
116 | return True |
|
116 | return True | |
117 |
|
117 | |||
118 | def check_for_pygments(): |
|
118 | def check_for_pygments(): | |
119 | try: |
|
119 | try: | |
120 | import pygments |
|
120 | import pygments | |
121 | except ImportError: |
|
121 | except ImportError: | |
122 | print_status('pygments', "Not found (required for syntax highlighting documentation)") |
|
122 | print_status('pygments', "Not found (required for syntax highlighting documentation)") | |
123 | return False |
|
123 | return False | |
124 | else: |
|
124 | else: | |
125 | print_status('pygments', pygments.__version__) |
|
125 | print_status('pygments', pygments.__version__) | |
126 | return True |
|
126 | return True | |
127 |
|
127 | |||
128 | def check_for_nose(): |
|
128 | def check_for_nose(): | |
129 | try: |
|
129 | try: | |
130 | import nose |
|
130 | import nose | |
131 | except ImportError: |
|
131 | except ImportError: | |
132 | print_status('nose', "Not found (required for running the test suite)") |
|
132 | print_status('nose', "Not found (required for running the test suite)") | |
133 | return False |
|
133 | return False | |
134 | else: |
|
134 | else: | |
135 | print_status('nose', nose.__version__) |
|
135 | print_status('nose', nose.__version__) | |
136 | return True |
|
136 | return True | |
137 |
|
137 | |||
138 | def check_for_pexpect(): |
|
138 | def check_for_pexpect(): | |
139 | try: |
|
139 | try: | |
140 | import pexpect |
|
140 | import pexpect | |
141 | except ImportError: |
|
141 | except ImportError: | |
142 | print_status("pexpect", "no (required for running standalone doctests)") |
|
142 | print_status("pexpect", "no (required for running standalone doctests)") | |
143 | return False |
|
143 | return False | |
144 | else: |
|
144 | else: | |
145 | print_status("pexpect", pexpect.__version__) |
|
145 | print_status("pexpect", pexpect.__version__) | |
146 | return True |
|
146 | return True | |
147 |
|
147 | |||
148 | def check_for_httplib2(): |
|
148 | def check_for_httplib2(): | |
149 | try: |
|
149 | try: | |
150 | import httplib2 |
|
150 | import httplib2 | |
151 | except ImportError: |
|
151 | except ImportError: | |
152 | print_status("httplib2", "no (required for blocking http clients)") |
|
152 | print_status("httplib2", "no (required for blocking http clients)") | |
153 | return False |
|
153 | return False | |
154 | else: |
|
154 | else: | |
155 | print_status("httplib2","yes") |
|
155 | print_status("httplib2","yes") | |
156 | return True |
|
156 | return True | |
157 |
|
157 | |||
158 | def check_for_sqlalchemy(): |
|
158 | def check_for_sqlalchemy(): | |
159 | try: |
|
159 | try: | |
160 | import sqlalchemy |
|
160 | import sqlalchemy | |
161 | except ImportError: |
|
161 | except ImportError: | |
162 | print_status("sqlalchemy", "no (required for the ipython1 notebook)") |
|
162 | print_status("sqlalchemy", "no (required for the ipython1 notebook)") | |
163 | return False |
|
163 | return False | |
164 | else: |
|
164 | else: | |
165 | print_status("sqlalchemy","yes") |
|
165 | print_status("sqlalchemy","yes") | |
166 | return True |
|
166 | return True | |
167 |
|
167 | |||
168 | def check_for_simplejson(): |
|
168 | def check_for_simplejson(): | |
169 | try: |
|
169 | try: | |
170 | import simplejson |
|
170 | import simplejson | |
171 | except ImportError: |
|
171 | except ImportError: | |
172 | print_status("simplejson", "no (required for the ipython1 notebook)") |
|
172 | print_status("simplejson", "no (required for the ipython1 notebook)") | |
173 | return False |
|
173 | return False | |
174 | else: |
|
174 | else: | |
175 | print_status("simplejson","yes") |
|
175 | print_status("simplejson","yes") | |
176 | return True |
|
176 | return True | |
177 |
|
177 | |||
178 | No newline at end of file |
|
@@ -1,34 +1,35 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | """IPython release build script. |
|
2 | """IPython release build script. | |
3 | """ |
|
3 | """ | |
4 | from toollib import * |
|
4 | from toollib import * | |
5 |
|
5 | |||
6 | # Get main ipython dir, this will raise if it doesn't pass some checks |
|
6 | # Get main ipython dir, this will raise if it doesn't pass some checks | |
7 | ipdir = get_ipdir() |
|
7 | ipdir = get_ipdir() | |
8 | cd(ipdir) |
|
8 | cd(ipdir) | |
9 |
|
9 | |||
10 | # Load release info |
|
10 | # Load release info | |
11 | execfile(pjoin('IPython','Release.py')) |
|
11 | execfile(pjoin('IPython','Release.py')) | |
12 |
|
12 | |||
13 | # Check that everything compiles |
|
13 | # Check that everything compiles | |
14 | compile_tree() |
|
14 | compile_tree() | |
15 |
|
15 | |||
16 | # Cleanup |
|
16 | # Cleanup | |
17 | for d in ['build','dist',pjoin('docs','build'),pjoin('docs','dist')]: |
|
17 | for d in ['build','dist',pjoin('docs','build'),pjoin('docs','dist')]: | |
18 | if os.path.isdir(d): |
|
18 | if os.path.isdir(d): | |
19 | remove_tree(d) |
|
19 | remove_tree(d) | |
20 |
|
20 | |||
21 | # Build source and binary distros |
|
21 | # Build source and binary distros | |
22 | c('./setup.py sdist --formats=gztar,zip') |
|
22 | c('./setup.py sdist --formats=gztar,zip') | |
23 |
|
23 | |||
24 | # Build eggs |
|
24 | # Build eggs | |
25 | c('python2.5 ./setupegg.py bdist_egg') |
|
25 | c('python2.5 ./setupegg.py bdist_egg') | |
26 | c('python2.6 ./setupegg.py bdist_egg') |
|
26 | c('python2.6 ./setupegg.py bdist_egg') | |
27 |
|
27 | |||
28 | # Call the windows build separately, so that the extra Windows scripts don't |
|
28 | # Call the windows build separately, so that the extra Windows scripts don't | |
29 | # get pulled into Unix builds (setup.py has code which checks for |
|
29 | # get pulled into Unix builds (setup.py has code which checks for | |
30 | # bdist_wininst) |
|
30 | # bdist_wininst) | |
31 | c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py") |
|
31 | c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py") | |
32 |
|
32 | |||
33 | # Change name so retarded Vista runs the installer correctly |
|
33 | # Change name so retarded Vista runs the installer correctly | |
34 | c("rename 's/linux-i686/win32-setup/' dist/*.exe") |
|
34 | c("rename 's/linux-i686/win32-setup/' dist/*.exe") | |
|
35 | c("rename 's/linux-x86_64/win32-setup/' dist/*.exe") |
General Comments 0
You need to be logged in to leave comments.
Login now