black: clean up noqa comments from most of the code
Many noqa's in the code are no longer necessary now that the column limit is 99 characters. Others can easily be eliminated, and still more can just be made more specific if they do not have to do with line length. The only E501's still in the code are in the tests for `spack.util.path` and the tests for `spack style`.
This commit is contained in:
@@ -26,5 +26,5 @@ class DepDiamondPatchMid2(Package):
|
||||
# single patch file in repo
|
||||
depends_on('patch', patches=[
|
||||
patch('http://example.com/urlpatch.patch',
|
||||
sha256='mid21234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234'), # noqa: E501
|
||||
sha256='mid21234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234'),
|
||||
])
|
||||
|
@@ -138,7 +138,7 @@ def install(self, spec, prefix):
|
||||
make('test')
|
||||
make('install')
|
||||
|
||||
@when('@3.3.0') # noqa
|
||||
@when('@3.3.0')
|
||||
def install(self, spec, prefix):
|
||||
# Apparently autotools are not bootstrapped
|
||||
which('libtoolize')()
|
||||
|
@@ -80,14 +80,19 @@ def patch(self):
|
||||
kwargs = {'ignore_absent': False, 'backup': False, 'string': True}
|
||||
|
||||
mf = FileFilter('Makefile-libbz2_so')
|
||||
mf.filter('$(CC) -shared -Wl,-soname -Wl,libbz2.so.{0} -o libbz2.so.{1} $(OBJS)' # noqa
|
||||
.format(v2, v3),
|
||||
'$(CC) -dynamiclib -Wl,-install_name -Wl,@rpath/libbz2.{0}.dylib -current_version {1} -compatibility_version {2} -o libbz2.{3}.dylib $(OBJS)' # noqa
|
||||
.format(v1, v2, v3, v3),
|
||||
**kwargs)
|
||||
mf.filter(
|
||||
'$(CC) -shared -Wl,-soname -Wl,libbz2.so.{0} -o libbz2.so.{1} $(OBJS)'.format(
|
||||
v2, v3
|
||||
),
|
||||
(
|
||||
'$(CC) -dynamiclib -Wl,-install_name -Wl,@rpath/libbz2.{0}.dylib '
|
||||
'-current_version {1} -compatibility_version {2} -o libbz2.{3}.dylib $(OBJS)'
|
||||
) .format(v1, v2, v3, v3),
|
||||
**kwargs
|
||||
)
|
||||
|
||||
mf.filter(
|
||||
'$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.{0}'.format(v3), # noqa
|
||||
'$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.{0}'.format(v3),
|
||||
'$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.{0}.dylib'
|
||||
.format(v3), **kwargs)
|
||||
mf.filter(
|
||||
|
@@ -51,7 +51,7 @@ class Cctools(AutotoolsPackage):
|
||||
# This is a belt and suspenders solution to the problem.
|
||||
def patch(self):
|
||||
before = '#if defined(__linux__) && defined(SYS_memfd_create)'
|
||||
after = '#if defined(__linux__) && defined(SYS_memfd_create) && defined(__NR_memfd_create)' # noqa: E501
|
||||
after = '#if defined(__linux__) && defined(SYS_memfd_create) && defined(__NR_memfd_create)'
|
||||
f = 'dttools/src/memfdexe.c'
|
||||
kwargs = {'ignore_absent': False, 'backup': True, 'string': True}
|
||||
filter_file(before, after, f, **kwargs)
|
||||
|
@@ -221,8 +221,14 @@ class Dealii(CMakePackage, CudaPackage):
|
||||
# See https://github.com/symengine/symengine/issues/1516
|
||||
# TODO: uncomment when the following is fixed
|
||||
# https://github.com/spack/spack/issues/11160
|
||||
# depends_on("symengine@0.4: build_type=Release", when="@9.1:+symengine+trilinos^trilinos~debug") # NOQA: ignore=E501
|
||||
# depends_on("symengine@0.4: build_type=Debug", when="@9.1:+symengine+trilinos^trilinos+debug") # NOQA: ignore=E501
|
||||
# depends_on(
|
||||
# "symengine@0.4: build_type=Release",
|
||||
# when="@9.1:+symengine+trilinos^trilinos~debug"
|
||||
# )
|
||||
# depends_on(
|
||||
# "symengine@0.4: build_type=Debug",
|
||||
# when="@9.1:+symengine+trilinos^trilinos+debug"
|
||||
# )
|
||||
depends_on('symengine@0.4:', when='@9.1:+symengine')
|
||||
depends_on('symengine@0.6:', when='@9.2:+symengine')
|
||||
depends_on('tbb', when='+threads')
|
||||
|
@@ -76,9 +76,13 @@ def chmod_scripts(self):
|
||||
|
||||
def url_for_version(self, version):
|
||||
if version < Version('8.0.0'):
|
||||
return "http://www.earthsystemmodeling.org/esmf_releases/public/ESMF_{0}/esmf_{0}_src.tar.gz".format(version.underscored)
|
||||
return "http://www.earthsystemmodeling.org/esmf_releases/public/ESMF_{0}/esmf_{0}_src.tar.gz".format(
|
||||
version.underscored
|
||||
)
|
||||
else:
|
||||
return "https://github.com/esmf-org/esmf/archive/ESMF_{0}.tar.gz".format(version.underscored)
|
||||
return "https://github.com/esmf-org/esmf/archive/ESMF_{0}.tar.gz".format(
|
||||
version.underscored
|
||||
)
|
||||
|
||||
def edit(self, spec, prefix):
|
||||
# Installation instructions can be found at:
|
||||
@@ -217,7 +221,7 @@ def edit(self, spec, prefix):
|
||||
|
||||
# Specifies the linker directive needed to link the LAPACK library
|
||||
# to the application.
|
||||
os.environ['ESMF_LAPACK_LIBS'] = spec['lapack'].libs.link_flags # noqa
|
||||
os.environ['ESMF_LAPACK_LIBS'] = spec['lapack'].libs.link_flags
|
||||
else:
|
||||
os.environ['ESMF_LAPACK'] = 'internal'
|
||||
|
||||
|
@@ -219,27 +219,34 @@ def patch(self):
|
||||
# Adjust ParMGridGen - this is still a mess
|
||||
files = [
|
||||
'src/dbns/Make/options',
|
||||
'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options' # noqa: E501
|
||||
'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options'
|
||||
]
|
||||
for f in files:
|
||||
filter_file(r'-lMGridGen', r'-lmgrid', f, backup=False)
|
||||
|
||||
# Adjust for flex version check
|
||||
files = [
|
||||
'src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L', # noqa: E501
|
||||
'src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L', # noqa: E501
|
||||
'src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L', # noqa: E501
|
||||
'applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L', # noqa: E501
|
||||
'applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L', # noqa: E501
|
||||
'applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L', # noqa: E501
|
||||
'applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L', # noqa: E501
|
||||
'applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L', # noqa: E501
|
||||
'applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L' # noqa: E501
|
||||
(
|
||||
'src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/'
|
||||
'chemkinLexer.L'
|
||||
),
|
||||
'src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L',
|
||||
'src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L',
|
||||
'applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L',
|
||||
'applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L',
|
||||
'applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L',
|
||||
'applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L',
|
||||
'applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L',
|
||||
'applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L'
|
||||
]
|
||||
for f in files:
|
||||
filter_file(
|
||||
r'#if YY_FLEX_SUBMINOR_VERSION < 34',
|
||||
r'#if YY_FLEX_MAJOR_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && YY_FLEX_SUBMINOR_VERSION < 34', # noqa: E501
|
||||
(
|
||||
r'#if YY_FLEX_MAJOR_VERSION <= 2 '
|
||||
r'&& YY_FLEX_MINOR_VERSION <= 5 '
|
||||
r'&& YY_FLEX_SUBMINOR_VERSION < 34'
|
||||
),
|
||||
f, backup=False)
|
||||
|
||||
def configure(self, spec, prefix):
|
||||
|
@@ -50,7 +50,7 @@ class Gnuplot(AutotoolsPackage):
|
||||
variant('libcerf', default=True,
|
||||
description='Build with libcerf support')
|
||||
variant('pbm', default=False,
|
||||
description='Enable PBM (Portable Bit Map) and other older bitmap terminals') # NOQA: ignore=E501
|
||||
description='Enable PBM (Portable Bit Map) and other older bitmap terminals')
|
||||
variant('qt', default=False,
|
||||
description='Build with QT')
|
||||
|
||||
|
@@ -35,7 +35,9 @@ class Grackle(Package):
|
||||
def install(self, spec, prefix):
|
||||
template_name = '{0.architecture}-{0.compiler.name}'
|
||||
grackle_architecture = template_name.format(spec)
|
||||
link_variables = 'MACH_AR = ar' if spec.version < Version(2.2) else 'MACH_LIBTOOL = libtool' # NOQA: ignore=E501
|
||||
link_variables = (
|
||||
'MACH_AR = ar' if spec.version < Version(2.2) else 'MACH_LIBTOOL = libtool'
|
||||
)
|
||||
substitutions = {
|
||||
'@ARCHITECTURE': grackle_architecture,
|
||||
'@CC': spec['mpi'].mpicc,
|
||||
|
@@ -23,6 +23,6 @@ class Luit(AutotoolsPackage, XorgPackage):
|
||||
depends_on('pkgconfig', type='build')
|
||||
depends_on('util-macros', type='build')
|
||||
|
||||
# see https://www.linuxquestions.org/questions/linux-from-scratch-13/can't-compile-luit-xorg-applications-4175476308/ # noqa
|
||||
# see https://www.linuxquestions.org/questions/linux-from-scratch-13/can't-compile-luit-xorg-applications-4175476308/
|
||||
def configure_args(self):
|
||||
return ['CFLAGS=-U_XOPEN_SOURCE -D_XOPEN_SOURCE=600']
|
||||
|
@@ -55,7 +55,7 @@ def configure(self, spec, prefix):
|
||||
with open(config, 'w') as out:
|
||||
out.write(
|
||||
"""# Local tweaks for building
|
||||
CPLUS_INCLUDE_PATH="{precice_dir}/include/precice${{CPLUS_INCLUDE_PATH:+:}}$CPLUS_INCLUDE_PATH" ## noqa: E501
|
||||
CPLUS_INCLUDE_PATH="{precice_dir}/include/precice${{CPLUS_INCLUDE_PATH:+:}}$CPLUS_INCLUDE_PATH"
|
||||
export CPLUS_INCLUDE_PATH
|
||||
# Local build (for user appbin, libbin)
|
||||
. ./change-userdir.sh $PWD/{user_dir}
|
||||
|
@@ -33,9 +33,9 @@ class Parmetis(CMakePackage):
|
||||
|
||||
patch('enable_external_metis.patch')
|
||||
# bug fixes from PETSc developers
|
||||
# https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ # NOQA: E501
|
||||
# https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/
|
||||
patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch')
|
||||
# https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ # NOQA: E501
|
||||
# https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/
|
||||
patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch')
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
|
@@ -19,7 +19,14 @@ class PyCvxopt(PythonPackage):
|
||||
variant('gsl', default=False, description='Use GSL random number generators for constructing random matrices')
|
||||
variant('fftw', default=False, description='Install the cvxopt.fftw interface to FFTW')
|
||||
variant('glpk', default=False, description='Enable support for the linear programming solver GLPK')
|
||||
# variant('mosek', default=False, description='Enable support for the linear, second-order cone, and quadratic programming solvers in MOSEK') # noqa
|
||||
# variant(
|
||||
# 'mosek',
|
||||
# default=False,
|
||||
# description=(
|
||||
# 'Enable support for the linear, second-order cone, and quadratic '
|
||||
# 'programming solvers in MOSEK'
|
||||
# ),
|
||||
# )
|
||||
variant('dsdp', default=False, description='Enable support for the semidefinite programming solver DSDP')
|
||||
|
||||
# Required dependencies
|
||||
|
@@ -638,7 +638,7 @@ def protobuf_deps():
|
||||
filter_file(
|
||||
'"//third_party/systemlibs:protobuf.bzl": "protobuf.bzl",',
|
||||
'"//third_party/systemlibs:protobuf.bzl": "protobuf.bzl",\n'
|
||||
'"//third_party/systemlibs:protobuf_deps.bzl": "protobuf_deps.bzl",', # noqa: E501
|
||||
'"//third_party/systemlibs:protobuf_deps.bzl": "protobuf_deps.bzl",',
|
||||
file_to_patch,
|
||||
string=True)
|
||||
|
||||
|
@@ -42,7 +42,11 @@ class Tcsh(AutotoolsPackage):
|
||||
fedora_patch('8a6066c901fb4fc75013dd488ba958387f00c74d', 'tcsh-6.20.00-009-fix-regexp-for-backlash-quoting-tests.patch', when='@6.20.00', sha256='d2358c930d5ab89e5965204dded499591b42a22d0a865e2149b8c0f1446fac34')
|
||||
|
||||
# Downstream patches
|
||||
fedora_patch('8a6066c901fb4fc75013dd488ba958387f00c74d', 'tcsh-6.20.00-manpage-memoryuse.patch', sha256='3a4e60fe56a450632140c48acbf14d22850c1d72835bf441e3f8514d6c617a9f') # noqa: E501
|
||||
fedora_patch(
|
||||
'8a6066c901fb4fc75013dd488ba958387f00c74d',
|
||||
'tcsh-6.20.00-manpage-memoryuse.patch',
|
||||
sha256='3a4e60fe56a450632140c48acbf14d22850c1d72835bf441e3f8514d6c617a9f',
|
||||
)
|
||||
|
||||
depends_on('ncurses+termlib')
|
||||
|
||||
|
@@ -32,7 +32,7 @@ class Yambo(AutotoolsPackage):
|
||||
|
||||
variant(
|
||||
'io', values=any_combination_of('iotk', 'etsf-io'),
|
||||
description='Activate support for different io formats (requires network access)', # noqa
|
||||
description='Activate support for different io formats (requires network access)',
|
||||
)
|
||||
|
||||
# MPI + OpenMP parallelism
|
||||
@@ -76,10 +76,10 @@ def filter_configure(self):
|
||||
filter_file('config/report', report_abspath, 'configure')
|
||||
|
||||
def enable_or_disable_time(self, activated):
|
||||
return '--enable-time-profile' if activated else '--disable-time-profile' # noqa: E501
|
||||
return '--enable-time-profile' if activated else '--disable-time-profile'
|
||||
|
||||
def enable_or_disable_memory(self, activated):
|
||||
return '--enable-memory-profile' if activated else '--disable-memory-profile' # noqa: E501
|
||||
return '--enable-memory-profile' if activated else '--disable-memory-profile'
|
||||
|
||||
def enable_or_disable_openmp(self, activated):
|
||||
return '--enable-open-mp' if activated else '--disable-open-mp'
|
||||
|
Reference in New Issue
Block a user