File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ dependencies = [
3939 " cachetools" ,
4040 " structlog" ,
4141 " orjson" ,
42- " platformdirs"
4342]
4443
4544[project .urls ]
Original file line number Diff line number Diff line change 2121from typing import Optional
2222
2323import numpy as np
24- from platformdirs import user_cache_dir
2524
2625from pynxtools import get_nexus_version
2726
2827try :
28+ from nomad import config
2929 from nomad .metainfo .data_type import (
3030 Bytes ,
3131 Datetime ,
@@ -136,8 +136,7 @@ def get_quantity_base_name(quantity_name):
136136
137137
138138PACKAGE_DIR = Path (__file__ ).resolve ().parent
139- CACHE_DIR = Path (user_cache_dir ("pynxtools" )) / "metainfo"
140- CACHE_DIR .mkdir (parents = True , exist_ok = True )
139+ CACHE_DIR = Path (config .fs .tmp ) / "pynxtools"
141140
142141
143142def get_package_filepath () -> Path :
@@ -166,4 +165,6 @@ def get_package_filepath() -> Path:
166165 return packaged
167166
168167 # 3. Otherwise store in cache dir
168+ # create parent directory only if we need to write
169+ CACHE_DIR .mkdir (parents = True , exist_ok = True )
169170 return CACHE_DIR / filename
You can’t perform that action at this time.
0 commit comments