Move packages and mock packages to /var/spack
This commit is contained in:
10
bin/spack
10
bin/spack
@@ -39,6 +39,12 @@ SPACK_PREFIX = os.path.dirname(os.path.dirname(SPACK_FILE))
|
||||
SPACK_LIB_PATH = os.path.join(SPACK_PREFIX, "lib", "spack")
|
||||
sys.path.insert(0, SPACK_LIB_PATH)
|
||||
|
||||
# If there is no working directory, use the spack prefix.
|
||||
try:
|
||||
os.getcwd()
|
||||
except OSError:
|
||||
os.chdir(SPACK_PREFIX)
|
||||
|
||||
# clean up the scope and start using spack package instead.
|
||||
del SPACK_FILE, SPACK_PREFIX, SPACK_LIB_PATH
|
||||
import llnl.util.tty as tty
|
||||
@@ -74,10 +80,8 @@ args = parser.parse_args()
|
||||
spack.verbose = args.verbose
|
||||
spack.debug = args.debug
|
||||
if args.mock:
|
||||
from llnl.util.filesystem import join_path
|
||||
from spack.packages import PackageDB
|
||||
mock_path = join_path(spack.module_path, 'test', 'mock_packages')
|
||||
spack.db = PackageDB(mock_path)
|
||||
spack.db = PackageDB(spack.mock_packages_path)
|
||||
|
||||
# If the user asked for it, don't check ssl certs.
|
||||
if args.insecure:
|
||||
|
Reference in New Issue
Block a user