summaryrefslogtreecommitdiff
path: root/lib/spack/spack/spec.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/spec.py')
-rw-r--r--lib/spack/spack/spec.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index c6fe2da762..0b9500246a 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -2239,7 +2239,11 @@ class Spec(object):
for mod in compiler.modules:
md.load_module(mod)
- s.external_path = md.get_path_from_module(s.external_module)
+ # get the path from the module
+ # the package can override the default
+ s.external_path = getattr(s.package, 'external_prefix',
+ md.get_path_from_module(
+ s.external_module))
# Mark everything in the spec as concrete, as well.
self._mark_concrete()