summaryrefslogtreecommitdiff
path: root/lib/spack/spack/repository.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/repository.py')
-rw-r--r--lib/spack/spack/repository.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/spack/spack/repository.py b/lib/spack/spack/repository.py
index 4696d1d5bc..47d6df85b3 100644
--- a/lib/spack/spack/repository.py
+++ b/lib/spack/spack/repository.py
@@ -44,6 +44,7 @@ import spack
import spack.error
import spack.spec
from spack.provider_index import ProviderIndex
+from spack.util.path import canonicalize_path
from spack.util.naming import *
#
@@ -93,19 +94,6 @@ class SpackNamespace(ModuleType):
return getattr(self, name)
-def substitute_spack_prefix(path):
- """Replaces instances of $spack with Spack's prefix."""
- return re.sub(r'^\$spack', spack.prefix, path)
-
-
-def canonicalize_path(path):
- """Substitute $spack, expand user home, take abspath."""
- path = substitute_spack_prefix(path)
- path = os.path.expanduser(path)
- path = os.path.abspath(path)
- return path
-
-
class RepoPath(object):
"""A RepoPath is a list of repos that function as one.