@cached_function
def get_cython_cache_dir():
 if ('CYTHON_CACHE_DIR' in os.environ):
  return os.environ['CYTHON_CACHE_DIR']
 parent = None
 if (os.name == 'posix'):
  if (sys.platform == 'darwin'):
   parent = os.path.expanduser('~/Library/Caches')
  else:
   parent = os.environ.get('XDG_CACHE_HOME')
 if (parent and os.path.isdir(parent)):
  return os.path.join(parent, 'cython')
 return os.path.expanduser(os.path.join('~', '.cython'))

@ cached_function def get_cython_cache_dir ( ) : if ( 'CYTHON_CACHE_DIR' in os . environ ) : return os . environ [ 'CYTHON_CACHE_DIR' ] parent = None if ( os . name == 'posix' ) : if ( sys . platform == 'darwin' ) : parent = os . path . expanduser ( '~/Library/Caches' ) else : parent = os . environ . get ( 'XDG_CACHE_HOME' ) if ( parent and os . path . isdir ( parent ) ) : return os . path . join ( parent , 'cython' ) return os . path . expanduser ( os . path . join ( '~' , '.cython' ) )
get the cython cache dir priority: 1 .