intel-parallel-studio: restrict patch to versions > 2016 (#6523)

Fixes #6522

Patch psxevars.sh and psxevars.csh only when year > 2016.
pxevars.csh does not exist for versions before 2017. psxevars.sh
does not appear to require this patch for versions before 2017.
This commit is contained in:
健美猫 2017-12-12 05:14:24 +08:00 committed by scheibelp
parent bd5d6b2bfa
commit e19aa80734

View file

@ -435,15 +435,16 @@ def rpath_configuration(self):
@run_after('install')
def fix_psxevars(self):
"""Newer versions of Intel Parallel Studio have a bug in the
"""Newer versions (>2016) of Intel Parallel Studio have a bug in the
``psxevars.sh`` script."""
bindir = glob.glob(join_path(
self.prefix, 'parallel_studio*', 'bin'))[0]
filter_file('^SCRIPTPATH=.*', 'SCRIPTPATH={0}'.format(self.prefix),
os.path.join(bindir, 'psxevars.sh'),
os.path.join(bindir, 'psxevars.csh'))
if self.version[1] > 2016:
filter_file('^SCRIPTPATH=.*', 'SCRIPTPATH={0}'.format(self.prefix),
os.path.join(bindir, 'psxevars.sh'),
os.path.join(bindir, 'psxevars.csh'))
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
if '+mpi' in self.spec: