From 885808cc13d90a12a70e9ab082934b5222298004 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Sat, 6 Jun 2020 17:12:46 -0400 Subject: intel-tbb: Fix for #16938 add custom libs method (#16972) * intel-tbb: Fix for #16938 add custom libs method Override the libs method to look for libraries of form libtbb* (instead of inherited which looks for libintel-tbb*) * Fixing pre-existing flake8 issues --- var/spack/repos/builtin/packages/intel-tbb/package.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py index 94eec8a06e..c470e8933b 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-tbb/package.py @@ -132,22 +132,22 @@ class IntelTbb(Package): for f in fs: lines = open(f).readlines() of = open(f, "w") - for l in lines: - if l.strip().startswith("CPLUS ="): + for lin in lines: + if lin.strip().startswith("CPLUS ="): of.write("# coerced to spack\n") of.write("CPLUS = $(CXX)\n") - elif l.strip().startswith("CONLY ="): + elif lin.strip().startswith("CONLY ="): of.write("# coerced to spack\n") of.write("CONLY = $(CC)\n") else: - of.write(l) + of.write(lin) def install(self, spec, prefix): # Deactivate use of RTM with GCC when on an OS with a very old # assembler. if (spec.satisfies('%gcc@4.8.0: os=rhel6') - or spec.satisfies('%gcc@4.8.0: os=centos6') - or spec.satisfies('%gcc@4.8.0: os=scientific6')): + or spec.satisfies('%gcc@4.8.0: os=centos6') + or spec.satisfies('%gcc@4.8.0: os=scientific6')): filter_file(r'RTM_KEY.*=.*rtm.*', 'RTM_KEY =', join_path('build', 'linux.gcc.inc')) @@ -224,3 +224,9 @@ class IntelTbb(Package): # Replace @rpath in ids with full path if sys.platform == 'darwin': fix_darwin_install_name(self.prefix.lib) + + @property + def libs(self): + shared = True if '+shared' in self.spec else False + return find_libraries( + 'libtbb*', root=self.prefix, shared=shared, recursive=True) -- cgit v1.2.3-60-g2f50