Flake8
This commit is contained in:
parent
be407f531e
commit
aa86488fd9
@ -112,6 +112,7 @@ def __call__(self, *args, **kwargs):
|
|||||||
|
|
||||||
return super(MakeExecutable, self).__call__(*args, **kwargs)
|
return super(MakeExecutable, self).__call__(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def load_module(mod):
|
def load_module(mod):
|
||||||
"""Takes a module name and removes modules until it is possible to
|
"""Takes a module name and removes modules until it is possible to
|
||||||
load that module. It then loads the provided module. Depends on the
|
load that module. It then loads the provided module. Depends on the
|
||||||
@ -128,11 +129,13 @@ def load_module(mod):
|
|||||||
text = modulecmd('show', mod, output=str, error=str).split()
|
text = modulecmd('show', mod, output=str, error=str).split()
|
||||||
for i, word in enumerate(text):
|
for i, word in enumerate(text):
|
||||||
if word == 'conflict':
|
if word == 'conflict':
|
||||||
exec(compile(modulecmd('unload', text[i+1], output=str, error=str), '<string>', 'exec'))
|
exec(compile(modulecmd('unload', text[i + 1], output=str,
|
||||||
|
error=str), '<string>', 'exec'))
|
||||||
# Load the module now that there are no conflicts
|
# Load the module now that there are no conflicts
|
||||||
load = modulecmd('load', mod, output=str, error=str)
|
load = modulecmd('load', mod, output=str, error=str)
|
||||||
exec(compile(load, '<string>', 'exec'))
|
exec(compile(load, '<string>', 'exec'))
|
||||||
|
|
||||||
|
|
||||||
def get_path_from_module(mod):
|
def get_path_from_module(mod):
|
||||||
"""Inspects a TCL module for entries that indicate the absolute path
|
"""Inspects a TCL module for entries that indicate the absolute path
|
||||||
at which the library supported by said module can be found.
|
at which the library supported by said module can be found.
|
||||||
@ -170,6 +173,7 @@ def get_path_from_module(mod):
|
|||||||
# Unable to find module path
|
# Unable to find module path
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def set_compiler_environment_variables(pkg, env):
|
def set_compiler_environment_variables(pkg, env):
|
||||||
assert(pkg.spec.concrete)
|
assert(pkg.spec.concrete)
|
||||||
compiler = pkg.compiler
|
compiler = pkg.compiler
|
||||||
@ -281,7 +285,6 @@ def set_build_environment_variables(pkg, env):
|
|||||||
for directory in ('lib', 'lib64', 'share'):
|
for directory in ('lib', 'lib64', 'share'):
|
||||||
pcdir = join_path(pre, directory, 'pkgconfig')
|
pcdir = join_path(pre, directory, 'pkgconfig')
|
||||||
if os.path.isdir(pcdir):
|
if os.path.isdir(pcdir):
|
||||||
#pkg_config_dirs.append(pcdir)
|
|
||||||
env.prepend_path('PKG_CONFIG_PATH', pcdir)
|
env.prepend_path('PKG_CONFIG_PATH', pcdir)
|
||||||
|
|
||||||
if pkg.spec.architecture.target.module_name:
|
if pkg.spec.architecture.target.module_name:
|
||||||
@ -398,6 +401,7 @@ def load_external_modules(pkg):
|
|||||||
if dep.external_module:
|
if dep.external_module:
|
||||||
load_module(dep.external_module)
|
load_module(dep.external_module)
|
||||||
|
|
||||||
|
|
||||||
def setup_package(pkg):
|
def setup_package(pkg):
|
||||||
"""Execute all environment setup routines."""
|
"""Execute all environment setup routines."""
|
||||||
spack_env = EnvironmentModifications()
|
spack_env = EnvironmentModifications()
|
||||||
|
Loading…
Reference in New Issue
Block a user