]> git.scottworley.com Git - pinch/blobdiff - pinch.py
Don't depend upon xdg
[pinch] / pinch.py
index 732a91f645c036a4692e6ea55083cad4427373d0..003ee70ee535d1c2b33071ceb07c096eb9830cfd 100644 (file)
--- a/pinch.py
+++ b/pinch.py
@@ -25,7 +25,17 @@ from typing import (
     Tuple,
 )
 
-import xdg
+# Use xdg module when it's less painful to have as a dependency
+
+
+class XDG(types.SimpleNamespace):
+    XDG_CACHE_HOME: str
+
+
+xdg = XDG(
+    XDG_CACHE_HOME=os.getenv(
+        'XDG_CACHE_HOME',
+        os.path.expanduser('~/.cache')))
 
 
 Digest16 = NewType('Digest16', str)