Moved check of SYSTEM_CACHE_DIR accessibility to before it is used.
This commit is contained in:
parent
267d06a997
commit
d5712120df
@ -505,8 +505,6 @@ if 'TOOLS' in config:
|
|||||||
env = Environment(tools = tools, variables = vars, ENV = os.environ)
|
env = Environment(tools = tools, variables = vars, ENV = os.environ)
|
||||||
env['RECIPES_FOLDERS'] = [Dir('recipes')]
|
env['RECIPES_FOLDERS'] = [Dir('recipes')]
|
||||||
env['SYSTEM_CACHE_DIR'] = os.path.join(_find_system_cache_dir(), 'spp_cache')
|
env['SYSTEM_CACHE_DIR'] = os.path.join(_find_system_cache_dir(), 'spp_cache')
|
||||||
env['CLONE_DIR'] = os.path.join(env['SYSTEM_CACHE_DIR'], 'cloned')
|
|
||||||
env['DOWNLOAD_DIR'] = os.path.join(env['SYSTEM_CACHE_DIR'], 'downloaded')
|
|
||||||
env['UPDATE_REPOSITORIES'] = update_repositories
|
env['UPDATE_REPOSITORIES'] = update_repositories
|
||||||
env['CXX_STANDARD'] = config['CXX_STANDARD'] # make it available to everyone
|
env['CXX_STANDARD'] = config['CXX_STANDARD'] # make it available to everyone
|
||||||
env['DEPS_CFLAGS'] = []
|
env['DEPS_CFLAGS'] = []
|
||||||
@ -518,9 +516,11 @@ try:
|
|||||||
os.makedirs(env['SYSTEM_CACHE_DIR'], exist_ok=True)
|
os.makedirs(env['SYSTEM_CACHE_DIR'], exist_ok=True)
|
||||||
except:
|
except:
|
||||||
env['SYSTEM_CACHE_DIR'] = os.path.join(_get_fallback_cache_dir(), 'spp_cache')
|
env['SYSTEM_CACHE_DIR'] = os.path.join(_get_fallback_cache_dir(), 'spp_cache')
|
||||||
env['CLONE_DIR'] = os.path.join(env['SYSTEM_CACHE_DIR'], 'cloned')
|
|
||||||
print(f'Creating spp cache dir failed, using fallback: {env["SYSTEM_CACHE_DIR"]}.')
|
print(f'Creating spp cache dir failed, using fallback: {env["SYSTEM_CACHE_DIR"]}.')
|
||||||
os.makedirs(env['SYSTEM_CACHE_DIR'], exist_ok=True) # no more safeguards!
|
os.makedirs(env['SYSTEM_CACHE_DIR'], exist_ok=True) # no more safeguards!
|
||||||
|
env['CLONE_DIR'] = os.path.join(env['SYSTEM_CACHE_DIR'], 'cloned')
|
||||||
|
env['DOWNLOAD_DIR'] = os.path.join(env['SYSTEM_CACHE_DIR'], 'downloaded')
|
||||||
|
|
||||||
|
|
||||||
env['SHARED_CACHE_DIR'] = Dir(f'#cache').abspath
|
env['SHARED_CACHE_DIR'] = Dir(f'#cache').abspath
|
||||||
# allow compiling to variant directories (each gets their own bin/lib/cache dirs)
|
# allow compiling to variant directories (each gets their own bin/lib/cache dirs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user