Commit b24ea416 authored by Robert Bradshaw's avatar Robert Bradshaw

Use default location ~/.cycache when cython cache is set to True.

parent 8931a015
......@@ -670,7 +670,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
if 'include_path' not in options:
options['include_path'] = ['.']
if 'common_utility_include_dir' in options:
if 'cache' in options:
if options.get('cache'):
raise NotImplementedError, "common_utility_include_dir does not yet work with caching"
if not os.path.exists(options['common_utility_include_dir']):
os.makedirs(options['common_utility_include_dir'])
......
......@@ -481,6 +481,11 @@ class CompilationOptions(object):
options['compiler_directives'] = directives
if 'language_level' in directives and 'language_level' not in kw:
options['language_level'] = int(directives['language_level'])
if 'cache' in options:
if options['cache'] is True:
options['cache'] = os.path.expanduser("~/.cycache")
elif options['cache'] in (False, None):
del options['cache']
self.__dict__.update(options)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment