##// END OF EJS Templates
update zmq dependency to 2.1.4
MinRK -
Show More
@@ -1,25 +1,25
1 1 #-----------------------------------------------------------------------------
2 2 # Copyright (C) 2010 The IPython Development Team
3 3 #
4 4 # Distributed under the terms of the BSD License. The full license is in
5 5 # the file COPYING.txt, distributed as part of this software.
6 6 #-----------------------------------------------------------------------------
7 7
8 8 #-----------------------------------------------------------------------------
9 # Verify zmq version dependency >= 2.0.10-1
9 # Verify zmq version dependency >= 2.1.4
10 10 #-----------------------------------------------------------------------------
11 11
12 minimum_pyzmq_version = "2.0.10-1"
12 minimum_pyzmq_version = "2.1.4"
13 13
14 14 try:
15 15 import zmq
16 16 except ImportError:
17 17 raise ImportError("IPython.zmq requires pyzmq >= %s"%minimum_pyzmq_version)
18 18
19 19 pyzmq_version = zmq.__version__
20 20
21 21 if pyzmq_version < minimum_pyzmq_version:
22 22 raise ImportError("IPython.zmq requires pyzmq >= %s, but you have %s"%(
23 23 minimum_pyzmq_version, pyzmq_version))
24 24
25 25 del pyzmq_version
@@ -1,332 +1,331
1 1 Overview
2 2 ========
3 3
4 4 This document describes the steps required to install IPython. IPython is
5 5 organized into a number of subpackages, each of which has its own dependencies.
6 6 All of the subpackages come with IPython, so you don't need to download and
7 7 install them separately. However, to use a given subpackage, you will need to
8 8 install all of its dependencies.
9 9
10 10
11 11 Please let us know if you have problems installing IPython or any of its
12 12 dependencies. Officially, IPython requires Python version 2.6 or 2.7. There
13 13 is an experimental port of IPython for Python3 `on GitHub
14 14 <https://github.com/ipython/ipython-py3k>`_
15 15
16 16 .. warning::
17 17
18 18 Officially, IPython supports Python versions 2.6 and 2.7.
19 19
20 20 IPython 0.11 has a hard syntax dependency on 2.6, and will no longer work
21 21 on Python <= 2.5.
22 22
23 23 Some of the installation approaches use the :mod:`setuptools` package and its
24 24 :command:`easy_install` command line program. In many scenarios, this provides
25 25 the most simple method of installing IPython and its dependencies. It is not
26 26 required though. More information about :mod:`setuptools` can be found on its
27 27 website.
28 28
29 29 More general information about installing Python packages can be found in
30 30 Python's documentation at http://www.python.org/doc/.
31 31
32 32 Quickstart
33 33 ==========
34 34
35 35 If you have :mod:`setuptools` installed and you are on OS X or Linux (not
36 36 Windows), the following will download and install IPython *and* the main
37 37 optional dependencies:
38 38
39 39 .. code-block:: bash
40 40
41 41 $ easy_install ipython[zmq,test]
42 42
43 43 This will get pyzmq, which is needed for
44 44 IPython's parallel computing features as well as the nose package, which will
45 45 enable you to run IPython's test suite.
46 46
47 47 .. warning::
48 48
49 49 IPython's test system is being refactored and currently the
50 50 :command:`iptest` shown below does not work. More details about the
51 51 testing situation can be found :ref:`here <testing>`
52 52
53 53 To run IPython's test suite, use the :command:`iptest` command:
54 54
55 55 .. code-block:: bash
56 56
57 57 $ iptest
58 58
59 59 Read on for more specific details and instructions for Windows.
60 60
61 61 Installing IPython itself
62 62 =========================
63 63
64 64 Given a properly built Python, the basic interactive IPython shell will work
65 65 with no external dependencies. However, some Python distributions
66 66 (particularly on Windows and OS X), don't come with a working :mod:`readline`
67 67 module. The IPython shell will work without :mod:`readline`, but will lack
68 68 many features that users depend on, such as tab completion and command line
69 69 editing. If you install IPython with :mod:`setuptools`, (e.g. with `easy_install`),
70 70 then the appropriate :mod:`readline` for your platform will be installed.
71 71 See below for details of how to make sure you have a working :mod:`readline`.
72 72
73 73 Installation using easy_install
74 74 -------------------------------
75 75
76 76 If you have :mod:`setuptools` installed, the easiest way of getting IPython is
77 77 to simple use :command:`easy_install`:
78 78
79 79 .. code-block:: bash
80 80
81 81 $ easy_install ipython
82 82
83 83 That's it.
84 84
85 85 Installation from source
86 86 ------------------------
87 87
88 88 If you don't want to use :command:`easy_install`, or don't have it installed,
89 89 just grab the latest stable build of IPython from `here
90 90 <https://github.com/ipython/ipython/downloads>`_. Then do the following:
91 91
92 92 .. code-block:: bash
93 93
94 94 $ tar -xzf ipython.tar.gz
95 95 $ cd ipython
96 96 $ python setup.py install
97 97
98 98 If you are installing to a location (like ``/usr/local``) that requires higher
99 99 permissions, you may need to run the last command with :command:`sudo`.
100 100
101 101 Windows
102 102 -------
103 103
104 104 There are a few caveats for Windows users. The main issue is that a basic
105 105 ``python setup.py install`` approach won't create ``.bat`` file or Start Menu
106 106 shortcuts, which most users want. To get an installation with these, you can
107 107 use any of the following alternatives:
108 108
109 109 1. Install using :command:`easy_install`.
110 110
111 111 2. Install using our binary ``.exe`` Windows installer, which can be found
112 112 `here <http://ipython.scipy.org/dist/>`_
113 113
114 114 3. Install from source, but using :mod:`setuptools` (``python setupegg.py
115 115 install``).
116 116
117 117 IPython by default runs in a terminal window, but the normal terminal
118 118 application supplied by Microsoft Windows is very primitive. You may want to
119 119 download the excellent and free Console_ application instead, which is a far
120 120 superior tool. You can even configure Console to give you by default an
121 121 IPython tab, which is very convenient to create new IPython sessions directly
122 122 from the working terminal.
123 123
124 124 .. _Console: http://sourceforge.net/projects/console
125 125
126 126 Note for Windows 64 bit users: you may have difficulties with the stock
127 127 installer on 64 bit systems; in this case (since we currently do not have 64
128 128 bit builds of the Windows installer) your best bet is to install from source
129 129 with the setuptools method indicated in #3 above. See `this bug report`_ for
130 130 further details.
131 131
132 132 .. _this bug report: https://bugs.launchpad.net/ipython/+bug/382214
133 133
134 134
135 135 Installing the development version
136 136 ----------------------------------
137 137
138 138 It is also possible to install the development version of IPython from our
139 139 `Git <http://git-scm.com/>`_ source code repository. To do this you will
140 140 need to have Git installed on your system. Then just do:
141 141
142 142 .. code-block:: bash
143 143
144 144 $ git clone https://github.com/ipython/ipython.git
145 145 $ cd ipython
146 146 $ python setup.py install
147 147
148 148 Again, this last step on Windows won't create ``.bat`` files or Start Menu
149 149 shortcuts, so you will have to use one of the other approaches listed above.
150 150
151 151 Some users want to be able to follow the development branch as it changes. If
152 152 you have :mod:`setuptools` installed, this is easy. Simply replace the last
153 153 step by:
154 154
155 155 .. code-block:: bash
156 156
157 157 $ python setupegg.py develop
158 158
159 159 This creates links in the right places and installs the command line script to
160 160 the appropriate places. Then, if you want to update your IPython at any time,
161 161 just do:
162 162
163 163 .. code-block:: bash
164 164
165 165 $ git pull
166 166
167 167 Basic optional dependencies
168 168 ===========================
169 169
170 170 There are a number of basic optional dependencies that most users will want to
171 171 get. These are:
172 172
173 173 * readline (for command line editing, tab completion, etc.)
174 174 * nose (to run the IPython test suite)
175 175 * pexpect (to use things like irunner)
176 176
177 177 If you are comfortable installing these things yourself, have at it, otherwise
178 178 read on for more details.
179 179
180 180 readline
181 181 --------
182 182
183 183 In principle, all Python distributions should come with a working
184 184 :mod:`readline` module. But, reality is not quite that simple. There are two
185 185 common situations where you won't have a working :mod:`readline` module:
186 186
187 187 * If you are using the built-in Python on Mac OS X.
188 188
189 189 * If you are running Windows, which doesn't have a :mod:`readline` module.
190 190
191 191 When IPython is installed with :mod:`setuptools`, (e.g. with `easy_install`),
192 192 readline is added as a dependency on OS X, and PyReadline on Windows, and will
193 193 be installed on your system. However, if you do not use setuptools, you may
194 194 have to install one of these packages yourself.
195 195
196 196 On OS X, the built-in Python doesn't not have :mod:`readline` because of
197 197 license issues. Starting with OS X 10.5 (Leopard), Apple's built-in Python has
198 198 a BSD-licensed not-quite-compatible readline replacement. As of IPython 0.9,
199 199 many of the issues related to the differences between readline and libedit seem
200 200 to have been resolved. While you may find libedit sufficient, we have
201 201 occasional reports of bugs with it and several developers who use OS X as their
202 202 main environment consider libedit unacceptable for productive, regular use with
203 203 IPython.
204 204
205 205 Therefore, we *strongly* recommend that on OS X you get the full
206 206 :mod:`readline` module. We will *not* consider completion/history problems to
207 207 be bugs for IPython if you are using libedit.
208 208
209 209 To get a working :mod:`readline` module, just do (with :mod:`setuptools`
210 210 installed):
211 211
212 212 .. code-block:: bash
213 213
214 214 $ easy_install readline
215 215
216 216 .. note::
217 217
218 218 Other Python distributions on OS X (such as fink, MacPorts and the official
219 219 python.org binaries) already have readline installed so you likely don't
220 220 have to do this step.
221 221
222 222 If needed, the readline egg can be build and installed from source (see the
223 223 wiki page at http://ipython.scipy.org/moin/InstallationOSXLeopard).
224 224
225 225 On Windows, you will need the PyReadline module. PyReadline is a separate,
226 226 Windows only implementation of readline that uses native Windows calls through
227 227 :mod:`ctypes`. The easiest way of installing PyReadline is you use the binary
228 228 installer available `here <https://launchpad.net/pyreadline/+download>`_.
229 229
230 230 nose
231 231 ----
232 232
233 233 To run the IPython test suite you will need the :mod:`nose` package. Nose
234 234 provides a great way of sniffing out and running all of the IPython tests. The
235 235 simplest way of getting nose, is to use :command:`easy_install`:
236 236
237 237 .. code-block:: bash
238 238
239 239 $ easy_install nose
240 240
241 241 Another way of getting this is to do:
242 242
243 243 .. code-block:: bash
244 244
245 245 $ easy_install ipython[test]
246 246
247 247 For more installation options, see the `nose website
248 248 <http://somethingaboutorange.com/mrl/projects/nose/>`_.
249 249
250 250 .. warning::
251 251
252 252 As described above, the :command:`iptest` command currently doesn't work.
253 253
254 254 Once you have nose installed, you can run IPython's test suite using the
255 255 iptest command:
256 256
257 257 .. code-block:: bash
258 258
259 259 $ iptest
260 260
261 261 pexpect
262 262 -------
263 263
264 264 The pexpect package is used in IPython's :command:`irunner` script, as well as
265 265 for managing subprocesses [pexpect]_. IPython now includes a version of pexpect
266 266 in :mod:`IPython.external`, but if you have installed pexpect, IPython will use
267 267 that instead. On Unix platforms (including OS X), just do:
268 268
269 269 .. code-block:: bash
270 270
271 271 $ easy_install pexpect
272 272
273 273 Windows users are out of luck as pexpect does not run there.
274 274
275 275 Dependencies for IPython.parallel (parallel computing)
276 276 ======================================================
277 277
278 278 :mod:`IPython.kernel` has been replaced by :mod:`IPython.parallel`,
279 279 which uses ZeroMQ for all communication.
280 280
281 281 IPython.parallel provides a nice architecture for parallel computing. The
282 282 main focus of this architecture is on interactive parallel computing. These
283 283 features require just one package: pyzmq. See the next section for pyzmq
284 284 details.
285 285
286 286 On a Unix style platform (including OS X), if you want to use
287 287 :mod:`setuptools`, you can just do:
288 288
289 289 .. code-block:: bash
290 290
291 291 $ easy_install ipython[zmq] # will include pyzmq
292 292
293 293 Security in IPython.parallel is provided by SSH tunnels. By default, Linux
294 294 and OSX clients will use the shell ssh command, but on Windows, we also
295 295 support tunneling with paramiko [paramiko]_.
296 296
297 297 Dependencies for IPython.zmq
298 298 ============================
299 299
300 300 pyzmq
301 301 -----
302 302
303 303 IPython 0.11 introduced some new functionality, including a two-process
304 304 execution model using ZeroMQ for communication [ZeroMQ]_. The Python bindings
305 305 to ZeroMQ are found in the pyzmq project, which is easy_install-able once you
306 have ZeroMQ installed (or even if you don't).
306 have ZeroMQ installed. If you are on Python 2.6 or 2.7 on OSX, or 2.7 on Windows,
307 pyzmq has eggs that include ZeroMQ itself.
307 308
308 IPython.zmq depends on pyzmq >= 2.0.10.1, but IPython.parallel requires the more
309 recent 2.1.4. 2.1.4 also has binary releases for OSX and Windows, that do not
310 require prior installation of libzmq.
309 IPython.zmq depends on pyzmq >= 2.1.4.
311 310
312 311 Dependencies for ipython-qtconsole (new GUI)
313 312 ============================================
314 313
315 314 PyQt
316 315 ----
317 316
318 317 Also with 0.11, a new GUI was added using the work in :mod:`IPython.zmq`,
319 318 which can be launched with ``ipython-qtconsole``. The GUI is built on PyQt ,
320 319 which can be installed from the
321 320 `PyQt website <http://www.riverbankcomputing.co.uk/>`_.
322 321
323 322 pygments
324 323 --------
325 324
326 325 The syntax-highlighting in ``ipython-qtconsole`` is done with the pygments project,
327 326 which is easy_install-able [pygments]_.
328 327
329 328 .. [ZeroMQ] ZeroMQ. http://www.zeromq.org
330 329 .. [paramiko] paramiko. https://github.com/robey/paramiko
331 330 .. [pygments] Pygments syntax highlighting. http://pygments.org
332 331 .. [pexpect] Pexpect. http://www.noah.org/wiki/Pexpect
@@ -1,261 +1,261
1 1 #!/usr/bin/env python
2 2 # -*- coding: utf-8 -*-
3 3 """Setup script for IPython.
4 4
5 5 Under Posix environments it works like a typical setup.py script.
6 6 Under Windows, the command sdist is not supported, since IPython
7 7 requires utilities which are not available under Windows."""
8 8
9 9 #-----------------------------------------------------------------------------
10 10 # Copyright (c) 2008-2010, IPython Development Team.
11 11 # Copyright (c) 2001-2007, Fernando Perez <fernando.perez@colorado.edu>
12 12 # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>
13 13 # Copyright (c) 2001, Nathaniel Gray <n8gray@caltech.edu>
14 14 #
15 15 # Distributed under the terms of the Modified BSD License.
16 16 #
17 17 # The full license is in the file COPYING.txt, distributed with this software.
18 18 #-----------------------------------------------------------------------------
19 19
20 20 #-----------------------------------------------------------------------------
21 21 # Minimal Python version sanity check
22 22 #-----------------------------------------------------------------------------
23 23
24 24 import sys
25 25
26 26 # This check is also made in IPython/__init__, don't forget to update both when
27 27 # changing Python version requirements.
28 28 if sys.version[0:3] < '2.6':
29 29 error = """\
30 30 ERROR: 'IPython requires Python Version 2.6 or above.'
31 31 Exiting."""
32 32 print >> sys.stderr, error
33 33 sys.exit(1)
34 34
35 35 # At least we're on the python version we need, move on.
36 36
37 37 #-------------------------------------------------------------------------------
38 38 # Imports
39 39 #-------------------------------------------------------------------------------
40 40
41 41 # Stdlib imports
42 42 import os
43 43 import shutil
44 44
45 45 from glob import glob
46 46
47 47 # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
48 48 # update it when the contents of directories change.
49 49 if os.path.exists('MANIFEST'): os.remove('MANIFEST')
50 50
51 51 from distutils.core import setup
52 52
53 53 # Our own imports
54 54 from IPython.utils.path import target_update
55 55
56 56 from setupbase import (
57 57 setup_args,
58 58 find_packages,
59 59 find_package_data,
60 60 find_scripts,
61 61 find_data_files,
62 62 check_for_dependencies,
63 63 record_commit_info,
64 64 )
65 65 from setupext import setupext
66 66
67 67 isfile = os.path.isfile
68 68 pjoin = os.path.join
69 69
70 70 #-----------------------------------------------------------------------------
71 71 # Function definitions
72 72 #-----------------------------------------------------------------------------
73 73
74 74 def cleanup():
75 75 """Clean up the junk left around by the build process"""
76 76 if "develop" not in sys.argv:
77 77 try:
78 78 shutil.rmtree('ipython.egg-info')
79 79 except:
80 80 try:
81 81 os.unlink('ipython.egg-info')
82 82 except:
83 83 pass
84 84
85 85 #-------------------------------------------------------------------------------
86 86 # Handle OS specific things
87 87 #-------------------------------------------------------------------------------
88 88
89 89 if os.name == 'posix':
90 90 os_name = 'posix'
91 91 elif os.name in ['nt','dos']:
92 92 os_name = 'windows'
93 93 else:
94 94 print 'Unsupported operating system:',os.name
95 95 sys.exit(1)
96 96
97 97 # Under Windows, 'sdist' has not been supported. Now that the docs build with
98 98 # Sphinx it might work, but let's not turn it on until someone confirms that it
99 99 # actually works.
100 100 if os_name == 'windows' and 'sdist' in sys.argv:
101 101 print 'The sdist command is not available under Windows. Exiting.'
102 102 sys.exit(1)
103 103
104 104 #-------------------------------------------------------------------------------
105 105 # Things related to the IPython documentation
106 106 #-------------------------------------------------------------------------------
107 107
108 108 # update the manuals when building a source dist
109 109 if len(sys.argv) >= 2 and sys.argv[1] in ('sdist','bdist_rpm'):
110 110 import textwrap
111 111
112 112 # List of things to be updated. Each entry is a triplet of args for
113 113 # target_update()
114 114 to_update = [
115 115 # FIXME - Disabled for now: we need to redo an automatic way
116 116 # of generating the magic info inside the rst.
117 117 #('docs/magic.tex',
118 118 #['IPython/Magic.py'],
119 119 #"cd doc && ./update_magic.sh" ),
120 120
121 121 ('docs/man/ipcluster.1.gz',
122 122 ['docs/man/ipcluster.1'],
123 123 'cd docs/man && gzip -9c ipcluster.1 > ipcluster.1.gz'),
124 124
125 125 ('docs/man/ipcontroller.1.gz',
126 126 ['docs/man/ipcontroller.1'],
127 127 'cd docs/man && gzip -9c ipcontroller.1 > ipcontroller.1.gz'),
128 128
129 129 ('docs/man/ipengine.1.gz',
130 130 ['docs/man/ipengine.1'],
131 131 'cd docs/man && gzip -9c ipengine.1 > ipengine.1.gz'),
132 132
133 133 ('docs/man/ipython.1.gz',
134 134 ['docs/man/ipython.1'],
135 135 'cd docs/man && gzip -9c ipython.1 > ipython.1.gz'),
136 136
137 137 ('docs/man/ipython-wx.1.gz',
138 138 ['docs/man/ipython-wx.1'],
139 139 'cd docs/man && gzip -9c ipython-wx.1 > ipython-wx.1.gz'),
140 140
141 141 ('docs/man/ipythonx.1.gz',
142 142 ['docs/man/ipythonx.1'],
143 143 'cd docs/man && gzip -9c ipythonx.1 > ipythonx.1.gz'),
144 144
145 145 ('docs/man/irunner.1.gz',
146 146 ['docs/man/irunner.1'],
147 147 'cd docs/man && gzip -9c irunner.1 > irunner.1.gz'),
148 148
149 149 ('docs/man/pycolor.1.gz',
150 150 ['docs/man/pycolor.1'],
151 151 'cd docs/man && gzip -9c pycolor.1 > pycolor.1.gz'),
152 152 ]
153 153
154 154 # Only build the docs if sphinx is present
155 155 try:
156 156 import sphinx
157 157 except ImportError:
158 158 pass
159 159 else:
160 160 # The Makefile calls the do_sphinx scripts to build html and pdf, so
161 161 # just one target is enough to cover all manual generation
162 162
163 163 # First, compute all the dependencies that can force us to rebuild the
164 164 # docs. Start with the main release file that contains metadata
165 165 docdeps = ['IPython/core/release.py']
166 166 # Inculde all the reST sources
167 167 pjoin = os.path.join
168 168 for dirpath,dirnames,filenames in os.walk('docs/source'):
169 169 if dirpath in ['_static','_templates']:
170 170 continue
171 171 docdeps += [ pjoin(dirpath,f) for f in filenames
172 172 if f.endswith('.txt') ]
173 173 # and the examples
174 174 for dirpath,dirnames,filenames in os.walk('docs/example'):
175 175 docdeps += [ pjoin(dirpath,f) for f in filenames
176 176 if not f.endswith('~') ]
177 177 # then, make them all dependencies for the main PDF (the html will get
178 178 # auto-generated as well).
179 179 to_update.append(
180 180 ('docs/dist/ipython.pdf',
181 181 docdeps,
182 182 "cd docs && make dist")
183 183 )
184 184
185 185 [ target_update(*t) for t in to_update ]
186 186
187 187 #---------------------------------------------------------------------------
188 188 # Find all the packages, package data, and data_files
189 189 #---------------------------------------------------------------------------
190 190
191 191 packages = find_packages()
192 192 package_data = find_package_data()
193 193 data_files = find_data_files()
194 194
195 195 #---------------------------------------------------------------------------
196 196 # Handle scripts, dependencies, and setuptools specific things
197 197 #---------------------------------------------------------------------------
198 198
199 199 # For some commands, use setuptools. Note that we do NOT list install here!
200 200 # If you want a setuptools-enhanced install, just run 'setupegg.py install'
201 201 if len(set(('develop', 'sdist', 'release', 'bdist_egg', 'bdist_rpm',
202 202 'bdist', 'bdist_dumb', 'bdist_wininst', 'install_egg_info',
203 203 'build_sphinx', 'egg_info', 'easy_install', 'upload',
204 204 )).intersection(sys.argv)) > 0:
205 205 import setuptools
206 206
207 207 # This dict is used for passing extra arguments that are setuptools
208 208 # specific to setup
209 209 setuptools_extra_args = {}
210 210
211 211 if 'setuptools' in sys.modules:
212 212 setuptools_extra_args['zip_safe'] = False
213 213 setuptools_extra_args['entry_points'] = find_scripts(True)
214 214 setup_args['extras_require'] = dict(
215 215 parallel = 'pyzmq>=2.1.4',
216 zmq = 'pyzmq>=2.0.10.1',
216 zmq = 'pyzmq>=2.1.4',
217 217 doc='Sphinx>=0.3',
218 218 test='nose>=0.10.1',
219 219 )
220 220 requires = setup_args.setdefault('install_requires', [])
221 221 setupext.display_status = False
222 222 if not setupext.check_for_readline():
223 223 if sys.platform == 'darwin':
224 224 requires.append('readline')
225 225 elif sys.platform.startswith('win'):
226 226 requires.append('pyreadline')
227 227 else:
228 228 pass
229 229 # do we want to install readline here?
230 230
231 231 # Script to be run by the windows binary installer after the default setup
232 232 # routine, to add shortcuts and similar windows-only things. Windows
233 233 # post-install scripts MUST reside in the scripts/ dir, otherwise distutils
234 234 # doesn't find them.
235 235 if 'bdist_wininst' in sys.argv:
236 236 if len(sys.argv) > 2 and \
237 237 ('sdist' in sys.argv or 'bdist_rpm' in sys.argv):
238 238 print >> sys.stderr, "ERROR: bdist_wininst must be run alone. Exiting."
239 239 sys.exit(1)
240 240 setup_args['scripts'] = [pjoin('scripts','ipython_win_post_install.py')]
241 241 else:
242 242 # If we are running without setuptools, call this function which will
243 243 # check for dependencies an inform the user what is needed. This is
244 244 # just to make life easy for users.
245 245 check_for_dependencies()
246 246 setup_args['scripts'] = find_scripts(False)
247 247
248 248 #---------------------------------------------------------------------------
249 249 # Do the actual setup now
250 250 #---------------------------------------------------------------------------
251 251
252 252 setup_args['cmdclass'] = {'build_py': record_commit_info('IPython')}
253 253 setup_args['packages'] = packages
254 254 setup_args['package_data'] = package_data
255 255 setup_args['data_files'] = data_files
256 256 setup_args.update(setuptools_extra_args)
257 257
258 258
259 259 if __name__ == '__main__':
260 260 setup(**setup_args)
261 261 cleanup()
@@ -1,163 +1,164
1 1 # encoding: utf-8
2 2
3 3 __docformat__ = "restructuredtext en"
4 4
5 5 #-------------------------------------------------------------------------------
6 6 # Copyright (C) 2008 The IPython Development Team
7 7 #
8 8 # Distributed under the terms of the BSD License. The full license is in
9 9 # the file COPYING, distributed as part of this software.
10 10 #-------------------------------------------------------------------------------
11 11
12 12 #-------------------------------------------------------------------------------
13 13 # Imports
14 14 #-------------------------------------------------------------------------------
15 15
16 16 import sys, os
17 17 from textwrap import fill
18 18
19 19 display_status=True
20 20
21 21 def check_display(f):
22 22 """decorator to allow display methods to be muted by mod.display_status"""
23 23 def maybe_display(*args, **kwargs):
24 24 if display_status:
25 25 return f(*args, **kwargs)
26 26 return maybe_display
27 27
28 28 @check_display
29 29 def print_line(char='='):
30 30 print char * 76
31 31
32 32 @check_display
33 33 def print_status(package, status):
34 34 initial_indent = "%22s: " % package
35 35 indent = ' ' * 24
36 36 print fill(str(status), width=76,
37 37 initial_indent=initial_indent,
38 38 subsequent_indent=indent)
39 39
40 40 @check_display
41 41 def print_message(message):
42 42 indent = ' ' * 24 + "* "
43 43 print fill(str(message), width=76,
44 44 initial_indent=indent,
45 45 subsequent_indent=indent)
46 46
47 47 @check_display
48 48 def print_raw(section):
49 49 print section
50 50
51 51 #-------------------------------------------------------------------------------
52 52 # Tests for specific packages
53 53 #-------------------------------------------------------------------------------
54 54
55 55 def check_for_ipython():
56 56 try:
57 57 import IPython
58 58 except ImportError:
59 59 print_status("IPython", "Not found")
60 60 return False
61 61 else:
62 62 print_status("IPython", IPython.__version__)
63 63 return True
64 64
65 65 def check_for_sphinx():
66 66 try:
67 67 import sphinx
68 68 except ImportError:
69 69 print_status('sphinx', "Not found (required for building documentation)")
70 70 return False
71 71 else:
72 72 print_status('sphinx', sphinx.__version__)
73 73 return True
74 74
75 75 def check_for_pygments():
76 76 try:
77 77 import pygments
78 78 except ImportError:
79 79 print_status('pygments', "Not found (required for syntax highlighting documentation)")
80 80 return False
81 81 else:
82 82 print_status('pygments', pygments.__version__)
83 83 return True
84 84
85 85 def check_for_nose():
86 86 try:
87 87 import nose
88 88 except ImportError:
89 89 print_status('nose', "Not found (required for running the test suite)")
90 90 return False
91 91 else:
92 92 print_status('nose', nose.__version__)
93 93 return True
94 94
95 95 def check_for_pexpect():
96 96 try:
97 97 import pexpect
98 98 except ImportError:
99 99 print_status("pexpect", "no (required for running standalone doctests)")
100 100 return False
101 101 else:
102 102 print_status("pexpect", pexpect.__version__)
103 103 return True
104 104
105 105 def check_for_httplib2():
106 106 try:
107 107 import httplib2
108 108 except ImportError:
109 109 print_status("httplib2", "no (required for blocking http clients)")
110 110 return False
111 111 else:
112 112 print_status("httplib2","yes")
113 113 return True
114 114
115 115 def check_for_sqlalchemy():
116 116 try:
117 117 import sqlalchemy
118 118 except ImportError:
119 119 print_status("sqlalchemy", "no (required for the ipython1 notebook)")
120 120 return False
121 121 else:
122 122 print_status("sqlalchemy","yes")
123 123 return True
124 124
125 125 def check_for_simplejson():
126 126 try:
127 127 import simplejson
128 128 except ImportError:
129 129 print_status("simplejson", "no (required for the ipython1 notebook)")
130 130 return False
131 131 else:
132 132 print_status("simplejson","yes")
133 133 return True
134 134
135 135 def check_for_pyzmq():
136 136 try:
137 137 import zmq
138 138 except ImportError:
139 139 print_status('pyzmq', "no (required for qtconsole and parallel computing capabilities)")
140 140 return False
141 141 else:
142 if zmq.__version__ < '2.0.10':
143 print_status('pyzmq', "no (require >= 2.0.10 for qtconsole and parallel computing capabilities)")
142 if zmq.__version__ < '2.1.4':
143 print_status('pyzmq', "no (have %s, but require >= 2.1.4 for"
144 " qtconsole and parallel computing capabilities)"%zmq.__version__)
144 145
145 146 else:
146 147 print_status("pyzmq", zmq.__version__)
147 148 return True
148 149
149 150 def check_for_readline():
150 151 try:
151 152 import readline
152 153 except ImportError:
153 154 try:
154 155 import pyreadline
155 156 except ImportError:
156 157 print_status('readline', "no (required for good interactive behavior)")
157 158 return False
158 159 else:
159 160 print_status('readline', "yes pyreadline-"+pyreadline.release.version)
160 161 return True
161 162 else:
162 163 print_status('readline', "yes")
163 164 return True
General Comments 0
You need to be logged in to leave comments. Login now