##// END OF EJS Templates
Fix version string comparison, capitalisation and typos.
Matthias Bussonnier -
Show More
@@ -3,7 +3,7 b''
3 The cython magic has been integrated into Cython itself,
3 The cython magic has been integrated into Cython itself,
4 which is now released in version 0.21.
4 which is now released in version 0.21.
5
5
6 cf github `cython` organisation, `cython` repo, under the
6 cf github `Cython` organisation, `Cython` repo, under the
7 file `Cython/Build/IpythonMagic.py`
7 file `Cython/Build/IpythonMagic.py`
8 """
8 """
9 #-----------------------------------------------------------------------------
9 #-----------------------------------------------------------------------------
@@ -16,6 +16,8 b' file `Cython/Build/IpythonMagic.py`'
16
16
17 from __future__ import print_function
17 from __future__ import print_function
18
18
19 import IPython.utils.version as version
20
19 try:
21 try:
20 import Cython
22 import Cython
21 except:
23 except:
@@ -34,7 +36,7 b' def load_ipython_extension(ip):'
34 print("""The Cython magic has been move to the Cython package, hence """)
36 print("""The Cython magic has been move to the Cython package, hence """)
35 print("""`%load_ext cythonmagic` is deprecated; Please use `%load_ext Cython` instead.""")
37 print("""`%load_ext cythonmagic` is deprecated; Please use `%load_ext Cython` instead.""")
36
38
37 if Cython is None or tuple(map(int,Cython.__version__.split('.'))) < (0,21) :
39 if Cython is None or not version.check_version(Cython.__version__, "0.21"):
38 print("You need Cython version >=0.21 to use the Cython magic")
40 print("You need Cython version >=0.21 to use the Cython magic")
39 return
41 return
40 print("""\nThough, because I am nice, I'll still try to load it for you this time.""")
42 print("""\nThough, because I am nice, I'll still try to load it for you this time.""")
@@ -4,4 +4,4 b''
4 cythonmagic
4 cythonmagic
5 ===========
5 ===========
6
6
7 The `cython` magic has been moved in the `cython` package.
7 The `cython` magic has been moved in the `Cython` package.
@@ -1,1 +1,1 b''
1 * The ``%cython`` magic, is now part of the Cython module. Use `%load_ext Cython` with a version of Cython >= 0.21 to have acces to the magic now.
1 * The ``%cython`` magic, is now part of the Cython module. Use `%load_ext Cython` with a version of Cython >= 0.21 to have access to the magic now.
General Comments 0
You need to be logged in to leave comments. Login now