##// END OF EJS Templates
ctx is ignored by Cython > 0.13.
Bradley M. Froehle -
Show More
@@ -34,7 +34,6 b' from IPython.utils import py3compat'
34 34
35 35 import Cython
36 36 from Cython.Compiler.Errors import CompileError
37 from Cython.Compiler.Main import Context, default_options
38 37 from Cython.Build.Dependencies import cythonize
39 38
40 39
@@ -138,10 +137,8 b' class CythonMagics(Magics):'
138 137 args = magic_arguments.parse_argstring(self.cython, line)
139 138 code = cell if cell.endswith('\n') else cell+'\n'
140 139 lib_dir = os.path.join(self.shell.ipython_dir, 'cython')
141 cython_include_dirs = ['.']
142 140 force = args.force
143 141 quiet = True
144 ctx = Context(cython_include_dirs, default_options)
145 142 key = code, sys.version_info, sys.executable, Cython.__version__
146 143 module_name = "_cython_magic_" + hashlib.md5(str(key).encode('utf-8')).hexdigest()
147 144 so_ext = [ ext for ext,_,mod_type in imp.get_suffixes() if mod_type == imp.C_EXTENSION ][0]
@@ -176,7 +173,7 b' class CythonMagics(Magics):'
176 173 build_extension = build_ext(dist)
177 174 build_extension.finalize_options()
178 175 try:
179 build_extension.extensions = cythonize([extension], ctx=ctx, quiet=quiet)
176 build_extension.extensions = cythonize([extension], quiet=quiet)
180 177 except CompileError:
181 178 return
182 179 build_extension.build_temp = os.path.dirname(pyx_file)
General Comments 0
You need to be logged in to leave comments. Login now