diff options
author | Pramod Kumbhar <pramod.s.kumbhar@gmail.com> | 2016-11-08 16:18:14 +0100 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-11-08 07:18:14 -0800 |
commit | ba58a9f30d9b15c006e22a96d1153f0d3496285d (patch) | |
tree | a99f4698b4856fd19544a3dd703deb4dd628a3aa /var | |
parent | 1f5ca241972bc2d6c7bdc5971dd00c2894da395c (diff) | |
download | spack-ba58a9f30d9b15c006e22a96d1153f0d3496285d.tar.gz spack-ba58a9f30d9b15c006e22a96d1153f0d3496285d.tar.bz2 spack-ba58a9f30d9b15c006e22a96d1153f0d3496285d.tar.xz spack-ba58a9f30d9b15c006e22a96d1153f0d3496285d.zip |
fix tau installation issue (#2269)
* fix tau installation issue : setup_environment() is
called before install phase when 'Makefile.*' doesn't
exist (causing list index out of range error).
* Added detailed comment suggested by @alalazo
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/tau/package.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index d6b0a98d67..991841f137 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -150,4 +150,11 @@ class Tau(Package): def setup_environment(self, spack_env, run_env): pattern = join_path(self.prefix.lib, 'Makefile.*') files = glob.glob(pattern) - run_env.set('TAU_MAKEFILE', files[0]) + + # This function is called both at install time to set up + # the build environment and after install to generate the associated + # module file. In the former case there is no `self.prefix.lib` + # directory to inspect. The conditional below will set `TAU_MAKEFILE` + # in the latter case. + if files: + run_env.set('TAU_MAKEFILE', files[0]) |