init: initialize spack.store lazily
- spack.store was previously initialized at the spack.store module level, but this means the store has to be initialized on every spack call. - this moves the state in spack.store to a singleton so that the store is only initialized when needed.
This commit is contained in:
@@ -197,7 +197,8 @@ def set_CrayLoginNode_cmakeOptions(self, spec, cmakeOptions):
|
||||
# spec['cbtf'].prefix is the login node value for this build, as
|
||||
# we only get here when building the login node components and
|
||||
# that is all that is known to spack.
|
||||
be_ck = spack.store.db.query_one('cbtf-krell arch=cray-CNL-haswell')
|
||||
store = spack.store.store()
|
||||
be_ck = store.db.query_one('cbtf-krell arch=cray-CNL-haswell')
|
||||
|
||||
# Equivalent to install-tool cmake arg:
|
||||
# '-DCBTF_KRELL_CN_RUNTIME_DIR=%s'
|
||||
|
Reference in New Issue
Block a user