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
This commit is contained in:
parent
1f5ca24197
commit
ba58a9f30d
@ -150,4 +150,11 @@ def link_tau_arch_dirs(self):
|
|||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
pattern = join_path(self.prefix.lib, 'Makefile.*')
|
pattern = join_path(self.prefix.lib, 'Makefile.*')
|
||||||
files = glob.glob(pattern)
|
files = glob.glob(pattern)
|
||||||
|
|
||||||
|
# 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])
|
run_env.set('TAU_MAKEFILE', files[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user