Skip to content

Commit e945888

Browse files
committed
use cache directory for cython files
closes ipython#3009
1 parent 716d221 commit e945888

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IPython/extensions/cythonmagic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
from IPython.core.magic import Magics, magics_class, cell_magic
6060
from IPython.testing.skipdoctest import skip_doctest
6161
from IPython.utils import py3compat
62+
from IPython.utils.path import get_ipython_cache_dir
6263

6364
import Cython
6465
from Cython.Compiler.Errors import CompileError
@@ -192,7 +193,7 @@ def f(x):
192193
"""
193194
args = magic_arguments.parse_argstring(self.cython, line)
194195
code = cell if cell.endswith('\n') else cell+'\n'
195-
lib_dir = os.path.join(self.shell.ipython_dir, 'cython')
196+
lib_dir = os.path.join(get_ipython_cache_dir(), 'cython')
196197
quiet = True
197198
key = code, sys.version_info, sys.executable, Cython.__version__
198199

0 commit comments

Comments
 (0)