Move packages and mock packages to /var/spack

This commit is contained in:
Todd Gamblin
2014-03-16 16:03:49 -07:00
parent 566dc037e7
commit 81dc27bf41
39 changed files with 18 additions and 17 deletions

View File

@@ -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: