Permalink
Browse files

use cache directory for cython files

closes #3009
  • Loading branch information...
1 parent 716d221 commit e9458887e39eb82db7dec8a61eac91cae417d0bc @juliantaylor committed Mar 11, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 IPython/extensions/cythonmagic.py
@@ -59,6 +59,7 @@
from IPython.core.magic import Magics, magics_class, cell_magic
from IPython.testing.skipdoctest import skip_doctest
from IPython.utils import py3compat
+from IPython.utils.path import get_ipython_cache_dir
import Cython
from Cython.Compiler.Errors import CompileError
@@ -192,7 +193,7 @@ def f(x):
"""
args = magic_arguments.parse_argstring(self.cython, line)
code = cell if cell.endswith('\n') else cell+'\n'
- lib_dir = os.path.join(self.shell.ipython_dir, 'cython')
+ lib_dir = os.path.join(get_ipython_cache_dir(), 'cython')
quiet = True
key = code, sys.version_info, sys.executable, Cython.__version__

0 comments on commit e945888

Please sign in to comment.