summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2015-10-15 09:27:05 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2015-10-15 09:27:05 -0400
commit3ce85b22708769ff9d8b2b0ba79e4157dac46d74 (patch)
tree240efa6cd120c24f5a202f51d7c34f5bcc4edb26 /lib
parentd16095c8560cbaae1020a8e84494b8877bfe36f5 (diff)
downloadspack-3ce85b22708769ff9d8b2b0ba79e4157dac46d74.tar.gz
spack-3ce85b22708769ff9d8b2b0ba79e4157dac46d74.tar.bz2
spack-3ce85b22708769ff9d8b2b0ba79e4157dac46d74.tar.xz
spack-3ce85b22708769ff9d8b2b0ba79e4157dac46d74.zip
spack: split spack_root from prefix
A foundation for allowing runtime configuring of the prefix.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/__init__.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py
index caa09eb6e0..6e8d41895f 100644
--- a/lib/spack/spack/__init__.py
+++ b/lib/spack/spack/__init__.py
@@ -27,24 +27,26 @@ import tempfile
from llnl.util.filesystem import *
# This lives in $prefix/lib/spack/spack/__file__
-prefix = ancestor(__file__, 4)
+spack_root = ancestor(__file__, 4)
# The spack script itself
-spack_file = join_path(prefix, "bin", "spack")
+spack_file = join_path(spack_root, "bin", "spack")
# spack directory hierarchy
-etc_path = join_path(prefix, "etc")
-lib_path = join_path(prefix, "lib", "spack")
+lib_path = join_path(spack_root, "lib", "spack")
build_env_path = join_path(lib_path, "env")
module_path = join_path(lib_path, "spack")
compilers_path = join_path(module_path, "compilers")
test_path = join_path(module_path, "test")
hooks_path = join_path(module_path, "hooks")
-var_path = join_path(prefix, "var", "spack")
+var_path = join_path(spack_root, "var", "spack")
stage_path = join_path(var_path, "stage")
+share_path = join_path(spack_root, "share", "spack")
+
+prefix = spack_root
opt_path = join_path(prefix, "opt")
install_path = join_path(opt_path, "spack")
-share_path = join_path(prefix, "share", "spack")
+etc_path = join_path(prefix, "etc")
#
# Set up the packages database.