style: ensure that all packages pass spack style -a
- fix trailing whitespace and other issues uncovered by better flake8 checking. - fix extra whitespace printed by `spack style` command
This commit is contained in:
@@ -111,7 +111,7 @@ def lines(self):
|
|||||||
yield ' None'
|
yield ' None'
|
||||||
else:
|
else:
|
||||||
yield ' ' + self.fmt % self.headers
|
yield ' ' + self.fmt % self.headers
|
||||||
underline = tuple([l * "=" for l in self.column_widths])
|
underline = tuple([w * "=" for w in self.column_widths])
|
||||||
yield ' ' + self.fmt % underline
|
yield ' ' + self.fmt % underline
|
||||||
yield ''
|
yield ''
|
||||||
for k, v in sorted(self.variants.items()):
|
for k, v in sorted(self.variants.items()):
|
||||||
|
@@ -183,6 +183,8 @@ def cwd_relative(path):
|
|||||||
)
|
)
|
||||||
|
|
||||||
for line in output.split("\n"):
|
for line in output.split("\n"):
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
print(
|
print(
|
||||||
re_obj.sub(
|
re_obj.sub(
|
||||||
cwd_relative,
|
cwd_relative,
|
||||||
|
@@ -51,8 +51,11 @@ def test_direct_installed_dependencies(mock_packages, database):
|
|||||||
with color_when(False):
|
with color_when(False):
|
||||||
out = dependencies('--installed', 'mpileaks^mpich')
|
out = dependencies('--installed', 'mpileaks^mpich')
|
||||||
|
|
||||||
lines = [l for l in out.strip().split('\n') if not l.startswith('--')]
|
lines = [
|
||||||
hashes = set([re.split(r'\s+', l)[0] for l in lines])
|
line for line in out.strip().split('\n')
|
||||||
|
if not line.startswith('--')
|
||||||
|
]
|
||||||
|
hashes = set([re.split(r'\s+', line)[0] for line in lines])
|
||||||
|
|
||||||
expected = set([spack.store.db.query_one(s).dag_hash(7)
|
expected = set([spack.store.db.query_one(s).dag_hash(7)
|
||||||
for s in ['mpich', 'callpath^mpich']])
|
for s in ['mpich', 'callpath^mpich']])
|
||||||
@@ -65,8 +68,11 @@ def test_transitive_installed_dependencies(mock_packages, database):
|
|||||||
with color_when(False):
|
with color_when(False):
|
||||||
out = dependencies('--installed', '--transitive', 'mpileaks^zmpi')
|
out = dependencies('--installed', '--transitive', 'mpileaks^zmpi')
|
||||||
|
|
||||||
lines = [l for l in out.strip().split('\n') if not l.startswith('--')]
|
lines = [
|
||||||
hashes = set([re.split(r'\s+', l)[0] for l in lines])
|
line for line in out.strip().split('\n')
|
||||||
|
if not line.startswith('--')
|
||||||
|
]
|
||||||
|
hashes = set([re.split(r'\s+', line)[0] for line in lines])
|
||||||
|
|
||||||
expected = set([spack.store.db.query_one(s).dag_hash(7)
|
expected = set([spack.store.db.query_one(s).dag_hash(7)
|
||||||
for s in ['zmpi', 'callpath^zmpi', 'fake',
|
for s in ['zmpi', 'callpath^zmpi', 'fake',
|
||||||
|
@@ -47,6 +47,6 @@ def configure_args(self):
|
|||||||
|
|
||||||
if "+dumpi" in spec:
|
if "+dumpi" in spec:
|
||||||
config_args.extend([
|
config_args.extend([
|
||||||
'--with-dumpi=%s'.format(spec['sst-dumpi'].prefix)])
|
'--with-dumpi=%s' % spec['sst-dumpi'].prefix])
|
||||||
|
|
||||||
return config_args
|
return config_args
|
||||||
|
@@ -445,9 +445,8 @@ class Rust(Package):
|
|||||||
),
|
),
|
||||||
sha256=rust_sha256,
|
sha256=rust_sha256,
|
||||||
destination='spack_bootstrap_stage',
|
destination='spack_bootstrap_stage',
|
||||||
when='@{version} platform={platform} target={target}'\
|
when='@{ver} platform={platform} target={target}'.format(
|
||||||
.format(
|
ver=rust_version,
|
||||||
version=rust_version,
|
|
||||||
platform=rust_arch['platform'],
|
platform=rust_arch['platform'],
|
||||||
target=rust_arch['target']
|
target=rust_arch['target']
|
||||||
)
|
)
|
||||||
|
@@ -35,9 +35,10 @@ def cmake_args(self):
|
|||||||
args = []
|
args = []
|
||||||
|
|
||||||
if int(variants['local'].value) > int(variants['global'].value):
|
if int(variants['local'].value) > int(variants['global'].value):
|
||||||
raise InstallError('The global index space (%d bits) must be at least as large\
|
msg = ('The global index space (%d bits) must be at least as '
|
||||||
as the local index space (% bits)' % (variants['global'].value,
|
'large as the local index space (% bits)')
|
||||||
variants['local'].value))
|
raise InstallError(
|
||||||
|
msg % (variants['global'].value, variants['local'].value))
|
||||||
|
|
||||||
if variants['precision'].value == '32':
|
if variants['precision'].value == '32':
|
||||||
args.append('-DFUNCTION_TYPE=float')
|
args.append('-DFUNCTION_TYPE=float')
|
||||||
|
@@ -17,8 +17,8 @@ class Typhonio(CMakePackage):
|
|||||||
version('develop', branch='cmake_build')
|
version('develop', branch='cmake_build')
|
||||||
version('1.6_CMake', sha256='c9b7b2a7f4fa0b786f6b69c6426b67f42efc4ea6871323139d52cd44f4d0ff7c')
|
version('1.6_CMake', sha256='c9b7b2a7f4fa0b786f6b69c6426b67f42efc4ea6871323139d52cd44f4d0ff7c')
|
||||||
|
|
||||||
variant('build_type', default='Release', description='The build type to build',
|
variant('build_type', default='Release', values=('Debug', 'Release'),
|
||||||
values=('Debug', 'Release'))
|
description='The build type to build')
|
||||||
variant('fortran', default=False, description='Enable Fortran support')
|
variant('fortran', default=False, description='Enable Fortran support')
|
||||||
variant('shared', default=False, description='Build shared libraries')
|
variant('shared', default=False, description='Build shared libraries')
|
||||||
variant('doc', default=False, description='Build user guide and doxygen documentation')
|
variant('doc', default=False, description='Build user guide and doxygen documentation')
|
||||||
|
Reference in New Issue
Block a user