Skip to content

Commit

Permalink
replace appdirs with platformdirs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener authored and inducer committed Apr 3, 2024
1 parent 70b6e61 commit e767dbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 3 additions & 10 deletions pycuda/compiler.py
Expand Up @@ -267,21 +267,14 @@ def compile(
cache_dir = False

if cache_dir is None:
import appdirs
import platformdirs

cache_dir = os.path.join(
appdirs.user_cache_dir("pycuda", "pycuda"), "compiler-cache-v1"
platformdirs.user_cache_dir("pycuda", "pycuda"), "compiler-cache-v1"
)

from os import makedirs

try:
makedirs(cache_dir)
except OSError as e:
from errno import EEXIST

if e.errno != EEXIST:
raise
makedirs(cache_dir, exist_ok=True)

if arch is not None:
options.extend(["-arch", arch])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -223,7 +223,7 @@ def main():
python_requires="~=3.8",
install_requires=[
"pytools>=2011.2",
"appdirs>=1.4.0",
"platformdirs>=2.2.0",
"mako",
],
test_requires=[
Expand Down

0 comments on commit e767dbc

Please sign in to comment.