---
 Cython/Utils.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Cython/Utils.py b/Cython/Utils.py
index 22f6db7..563989f 100644
--- a/Cython/Utils.py
+++ b/Cython/Utils.py
@@ -327,7 +327,8 @@ def get_cython_cache_dir():
     1. CYTHON_CACHE_DIR
     2. (OS X): ~/Library/Caches/Cython
        (posix not OS X): XDG_CACHE_HOME/cython if XDG_CACHE_HOME defined
-    3. ~/.cython
+    3. ~/.cache/cython
+    4. ~/.cython
 
     """
     if 'CYTHON_CACHE_DIR' in os.environ:
@@ -338,8 +339,8 @@ def get_cython_cache_dir():
         if sys.platform == 'darwin':
             parent = os.path.expanduser('~/Library/Caches')
         else:
-            # this could fallback on ~/.cache
-            parent = os.environ.get('XDG_CACHE_HOME')
+            parent = os.environ.get('XDG_CACHE_HOME',
+                os.path.join(os.path.expanduser('~'), '.cache'))
 
     if parent and os.path.isdir(parent):
         return os.path.join(parent, 'cython')
-- 
2.3.5

_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to