Show More
@@ -24,9 +24,9 b' import threading' | |||||
24 | import webbrowser |
|
24 | import webbrowser | |
25 |
|
25 | |||
26 |
|
26 | |||
27 |
# check for pyzmq |
|
27 | # check for pyzmq | |
28 | from IPython.utils.zmqrelated import check_for_zmq |
|
28 | from IPython.utils.zmqrelated import check_for_zmq | |
29 |
check_for_zmq(' |
|
29 | check_for_zmq('13', 'IPython.html') | |
30 |
|
30 | |||
31 | from jinja2 import Environment, FileSystemLoader |
|
31 | from jinja2 import Environment, FileSystemLoader | |
32 |
|
32 |
@@ -1,17 +1,11 b'' | |||||
1 | #----------------------------------------------------------------------------- |
|
1 | # Copyright (c) IPython Development Team. | |
2 | # Copyright (C) 2013 The IPython Development Team |
|
2 | # Distributed under the terms of the Modified BSD License. | |
3 | # |
|
|||
4 | # Distributed under the terms of the BSD License. The full license is in |
|
|||
5 | # the file COPYING.txt, distributed as part of this software. |
|
|||
6 | #----------------------------------------------------------------------------- |
|
|||
7 |
|
3 | |||
8 | #----------------------------------------------------------------------------- |
|
4 | # Verify zmq version dependency | |
9 | # Verify zmq version dependency >= 2.1.11 |
|
|||
10 | #----------------------------------------------------------------------------- |
|
|||
11 |
|
5 | |||
12 | from IPython.utils.zmqrelated import check_for_zmq |
|
6 | from IPython.utils.zmqrelated import check_for_zmq | |
13 |
|
7 | |||
14 |
check_for_zmq(' |
|
8 | check_for_zmq('13', 'IPython.kernel.zmq') | |
15 |
|
9 | |||
16 | from .session import Session |
|
10 | from .session import Session | |
17 |
|
11 |
@@ -143,7 +143,7 b" have['casperjs'] = is_cmd_found('casperjs')" | |||||
143 | have['phantomjs'] = is_cmd_found('phantomjs') |
|
143 | have['phantomjs'] = is_cmd_found('phantomjs') | |
144 | have['slimerjs'] = is_cmd_found('slimerjs') |
|
144 | have['slimerjs'] = is_cmd_found('slimerjs') | |
145 |
|
145 | |||
146 |
min_zmq = ( |
|
146 | min_zmq = (13,) | |
147 |
|
147 | |||
148 | have['zmq'] = test_for('zmq.pyzmq_version_info', min_zmq, callback=lambda x: x()) |
|
148 | have['zmq'] = test_for('zmq.pyzmq_version_info', min_zmq, callback=lambda x: x()) | |
149 |
|
149 |
@@ -1,43 +1,16 b'' | |||||
1 | """Utilities for checking zmq versions.""" |
|
1 | """Utilities for checking zmq versions.""" | |
2 | #----------------------------------------------------------------------------- |
|
2 | # Copyright (c) IPython Development Team. | |
3 | # Copyright (C) 2013 The IPython Development Team |
|
3 | # Distributed under the terms of the Modified BSD License. | |
4 | # |
|
|||
5 | # Distributed under the terms of the BSD License. The full license is in |
|
|||
6 | # the file COPYING.txt, distributed as part of this software. |
|
|||
7 | #----------------------------------------------------------------------------- |
|
|||
8 |
|
||||
9 | #----------------------------------------------------------------------------- |
|
|||
10 | # Verify zmq version dependency >= 2.1.11 |
|
|||
11 | #----------------------------------------------------------------------------- |
|
|||
12 |
|
4 | |||
13 | from IPython.utils.version import check_version |
|
5 | from IPython.utils.version import check_version | |
14 |
|
6 | |||
15 |
|
7 | |||
16 | def patch_pyzmq(): |
|
|||
17 | """backport a few patches from newer pyzmq |
|
|||
18 |
|
||||
19 | These can be removed as we bump our minimum pyzmq version |
|
|||
20 | """ |
|
|||
21 |
|
||||
22 | import zmq |
|
|||
23 |
|
||||
24 | # fallback on stdlib json if jsonlib is selected, because jsonlib breaks things. |
|
|||
25 | # jsonlib support is removed from pyzmq >= 2.2.0 |
|
|||
26 |
|
||||
27 | from zmq.utils import jsonapi |
|
|||
28 | if jsonapi.jsonmod.__name__ == 'jsonlib': |
|
|||
29 | import json |
|
|||
30 | jsonapi.jsonmod = json |
|
|||
31 |
|
||||
32 |
|
||||
33 | def check_for_zmq(minimum_version, required_by='Someone'): |
|
8 | def check_for_zmq(minimum_version, required_by='Someone'): | |
34 | try: |
|
9 | try: | |
35 | import zmq |
|
10 | import zmq | |
36 | except ImportError: |
|
11 | except ImportError: | |
37 | raise ImportError("%s requires pyzmq >= %s"%(required_by, minimum_version)) |
|
12 | raise ImportError("%s requires pyzmq >= %s"%(required_by, minimum_version)) | |
38 |
|
13 | |||
39 | patch_pyzmq() |
|
|||
40 |
|
||||
41 | pyzmq_version = zmq.__version__ |
|
14 | pyzmq_version = zmq.__version__ | |
42 |
|
15 | |||
43 | if not check_version(pyzmq_version, minimum_version): |
|
16 | if not check_version(pyzmq_version, minimum_version): |
@@ -246,15 +246,16 b' setuptools_extra_args = {}' | |||||
246 |
|
246 | |||
247 | # setuptools requirements |
|
247 | # setuptools requirements | |
248 |
|
248 | |||
|
249 | pyzmq = 'pyzmq>=13' | |||
|
250 | ||||
249 | extras_require = dict( |
|
251 | extras_require = dict( | |
250 |
parallel = [ |
|
252 | parallel = [pyzmq], | |
251 |
qtconsole = [ |
|
253 | qtconsole = [pyzmq, 'pygments'], | |
252 | zmq = ['pyzmq>=2.1.11'], |
|
|||
253 | doc = ['Sphinx>=1.1', 'numpydoc'], |
|
254 | doc = ['Sphinx>=1.1', 'numpydoc'], | |
254 | test = ['nose>=0.10.1', 'requests'], |
|
255 | test = ['nose>=0.10.1', 'requests'], | |
255 | terminal = [], |
|
256 | terminal = [], | |
256 | nbformat = ['jsonschema>=2.0'], |
|
257 | nbformat = ['jsonschema>=2.0'], | |
257 |
notebook = ['tornado>=4.0', |
|
258 | notebook = ['tornado>=4.0', pyzmq, 'jinja2', 'pygments', 'mistune>=0.5'], | |
258 | nbconvert = ['pygments', 'jinja2', 'mistune>=0.3.1'] |
|
259 | nbconvert = ['pygments', 'jinja2', 'mistune>=0.3.1'] | |
259 | ) |
|
260 | ) | |
260 |
|
261 |
General Comments 0
You need to be logged in to leave comments.
Login now