diff options
author | Sergei Trofimov <sergei.trofimov@arm.com> | 2018-07-13 15:27:09 +0100 |
---|---|---|
committer | Marc Bonnici <marc.bonnici@arm.com> | 2018-07-13 15:53:01 +0100 |
commit | 770d2b2f0e3530fb2317d507c4a573b449014bf6 (patch) | |
tree | 056c79bc0daacb5d5bdc005bd84d2052fe3dac9a /wa/framework | |
parent | 8a2c660fdd4cc781e0f9b6ff80d79e333e6efe17 (diff) |
fw: add cache subdir under $WA_USER_DIRECTORY
Add a sub-directory for caching stuff.
Diffstat (limited to 'wa/framework')
-rw-r--r-- | wa/framework/configuration/core.py | 4 | ||||
-rw-r--r-- | wa/framework/host.py | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/wa/framework/configuration/core.py b/wa/framework/configuration/core.py index edc3270c..93d03ffe 100644 --- a/wa/framework/configuration/core.py +++ b/wa/framework/configuration/core.py @@ -483,6 +483,10 @@ class MetaConfiguration(Configuration): return os.path.join(self.user_directory, 'plugins') @property + def cache_directory(self): + return os.path.join(self.user_directory, 'cache') + + @property def plugin_paths(self): return [self.plugins_directory] + (self.extra_plugin_paths or []) diff --git a/wa/framework/host.py b/wa/framework/host.py index cf5cceba..4d4bfb26 100644 --- a/wa/framework/host.py +++ b/wa/framework/host.py @@ -42,6 +42,7 @@ def init_user_directory(overwrite_existing=False): # pylint: disable=R0914 os.makedirs(settings.user_directory) os.makedirs(settings.dependencies_directory) os.makedirs(settings.plugins_directory) + os.makedirs(settings.cache_directory) generate_default_config(os.path.join(settings.user_directory, 'config.yaml')) |