Skip to content
Snippets Groups Projects
Commit 8e10b18f authored by Alexandru Fikl's avatar Alexandru Fikl Committed by Andreas Klöckner
Browse files

prefer platformdirs if available

parent 062c6a15
No related branches found
No related tags found
No related merge requests found
Pipeline #242304 failed
...@@ -325,7 +325,11 @@ def _create_built_program_from_source_cached(ctx, src, options_bytes, ...@@ -325,7 +325,11 @@ def _create_built_program_from_source_cached(ctx, src, options_bytes,
from os.path import join from os.path import join
if cache_dir is None: if cache_dir is None:
import appdirs try:
import platformdirs as appdirs
except ImportError:
import appdirs
cache_dir = join(appdirs.user_cache_dir("pyopencl", "pyopencl"), cache_dir = join(appdirs.user_cache_dir("pyopencl", "pyopencl"),
"pyopencl-compiler-cache-v2-py{}".format( "pyopencl-compiler-cache-v2-py{}".format(
".".join(str(i) for i in sys.version_info))) ".".join(str(i) for i in sys.version_info)))
......
...@@ -257,7 +257,7 @@ def main(): ...@@ -257,7 +257,7 @@ def main():
install_requires=[ install_requires=[
"numpy", "numpy",
"pytools>=2021.2.7", "pytools>=2021.2.7",
"appdirs>=1.4.0", "platformdirs>=2.2.0",
# "Mako>=0.3.6", # "Mako>=0.3.6",
], ],
extras_require={ extras_require={
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment