Resolve (post-cherry-picking) flake8 errors

This commit is contained in:
Tamara Dahlgren 2021-02-19 11:05:53 -08:00
parent 3256f018eb
commit d0798160cf
4 changed files with 12 additions and 6 deletions

View file

@ -1120,7 +1120,8 @@ def relocate_package(spec, allow_root):
if old_sbang_install_path: if old_sbang_install_path:
import spack.hooks.sbang as sbang import spack.hooks.sbang as sbang
prefix_to_prefix_text[old_sbang_install_path] = sbang.sbang_install_path() prefix_to_prefix_text[old_sbang_install_path] = \
sbang.sbang_install_path()
prefix_to_prefix_text[old_prefix] = new_prefix prefix_to_prefix_text[old_prefix] = new_prefix
prefix_to_prefix_bin[old_prefix] = new_prefix prefix_to_prefix_bin[old_prefix] = new_prefix

View file

@ -412,7 +412,8 @@ def set_build_environment_variables(pkg, env, dirty):
# directory. Add that to the path too. # directory. Add that to the path too.
env_paths = [] env_paths = []
compiler_specific = os.path.join( compiler_specific = os.path.join(
spack.paths.build_env_path, os.path.dirname(pkg.compiler.link_paths['cc'])) spack.paths.build_env_path,
os.path.dirname(pkg.compiler.link_paths['cc']))
for item in [spack.paths.build_env_path, compiler_specific]: for item in [spack.paths.build_env_path, compiler_specific]:
env_paths.append(item) env_paths.append(item)
ci = os.path.join(item, 'case-insensitive') ci = os.path.join(item, 'case-insensitive')

View file

@ -741,11 +741,13 @@ def test_update_sbang(tmpdir, install_mockery, function_mirror):
{1} {1}
'''.format(sbang.sbang_shebang_line(), sspec.prefix.bin) '''.format(sbang.sbang_shebang_line(), sspec.prefix.bin)
installed_script_style_1_path = sspec.prefix.bin.join('sbang-style-1.sh') installed_script_style_1_path = \
sspec.prefix.bin.join('sbang-style-1.sh')
assert sbang_style_1_expected == \ assert sbang_style_1_expected == \
open(str(installed_script_style_1_path)).read() open(str(installed_script_style_1_path)).read()
installed_script_style_2_path = sspec.prefix.bin.join('sbang-style-2.sh') installed_script_style_2_path = \
sspec.prefix.bin.join('sbang-style-2.sh')
assert sbang_style_2_expected == \ assert sbang_style_2_expected == \
open(str(installed_script_style_2_path)).read() open(str(installed_script_style_2_path)).read()

View file

@ -50,8 +50,10 @@ def setup_dependent_build_environment(self, env, dependent_spec):
def libs(self): def libs(self):
libs = [] libs = []
for dir in ['lib/release_mt', 'lib', 'libfabric/lib']: for dir in ['lib/release_mt', 'lib', 'libfabric/lib']:
lib_path = '{0}/{1}/latest/{2}'.format(self.prefix, self._dir_name, dir) lib_path = '{0}/{1}/latest/{2}'.format(self.prefix, self._dir_name,
ldir = find_libraries('*', root=lib_path, shared=True, recursive=False) dir)
ldir = find_libraries('*', root=lib_path, shared=True,
recursive=False)
libs += ldir libs += ldir
return libs return libs