Skip to content

Commit

Permalink
prefer platformdirs if available
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Nov 2, 2021
1 parent 4981e37 commit a0d9fdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pytools/persistent_dict.py
Expand Up @@ -464,7 +464,11 @@ def __init__(self, identifier, key_builder=None, container_dir=None):

from os.path import join
if container_dir is None:
import appdirs
try:
import platformdirs as appdirs
except ImportError:
import appdirs

container_dir = join(
appdirs.user_cache_dir("pytools", "pytools"),
"pdict-v4-{}-py{}".format(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -37,7 +37,7 @@
python_requires="~=3.6",

install_requires=[
"appdirs>=1.4.0",
"platformdirs>=2.2.0",
"numpy>=1.6.0",
"dataclasses>=0.7;python_version<='3.6'"
],
Expand Down

0 comments on commit a0d9fdc

Please sign in to comment.