From 85e35d872867afd1a20f0667af4d791afde07cd1 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 1 Apr 2025 10:33:10 +0200 Subject: [PATCH 1/5] Remove Python2 style super()-calls --- easybuild/easyblocks/a/abaqus.py | 8 +++---- easybuild/easyblocks/a/adf.py | 8 +++---- easybuild/easyblocks/a/advisor.py | 6 ++--- easybuild/easyblocks/a/aedt.py | 6 ++--- easybuild/easyblocks/a/amber.py | 18 +++++++-------- easybuild/easyblocks/a/anaconda.py | 2 +- easybuild/easyblocks/a/ansys.py | 6 ++--- easybuild/easyblocks/a/aocc.py | 10 ++++----- easybuild/easyblocks/a/aomp.py | 6 ++--- easybuild/easyblocks/a/armadillo.py | 4 ++-- easybuild/easyblocks/b/bazel.py | 6 ++--- easybuild/easyblocks/b/berkeleygw.py | 10 ++++----- easybuild/easyblocks/b/binutils.py | 8 +++---- easybuild/easyblocks/b/blat.py | 2 +- easybuild/easyblocks/b/boost.py | 10 ++++----- easybuild/easyblocks/b/bowtie.py | 4 ++-- easybuild/easyblocks/b/bowtie2.py | 8 +++---- easybuild/easyblocks/b/bwa.py | 6 ++--- easybuild/easyblocks/b/bzip2.py | 4 ++-- easybuild/easyblocks/c/cblas.py | 2 +- easybuild/easyblocks/c/cgal.py | 4 ++-- easybuild/easyblocks/c/clang.py | 20 ++++++++--------- easybuild/easyblocks/c/clang_aomp.py | 6 ++--- easybuild/easyblocks/c/cmake.py | 8 +++---- easybuild/easyblocks/c/code_server.py | 6 ++--- easybuild/easyblocks/c/comsol.py | 6 ++--- easybuild/easyblocks/c/cp2k.py | 6 ++--- easybuild/easyblocks/c/cplex.py | 8 +++---- easybuild/easyblocks/c/crispr_dav.py | 6 ++--- easybuild/easyblocks/c/cryptography.py | 4 ++-- easybuild/easyblocks/c/cuda.py | 10 ++++----- easybuild/easyblocks/c/cudacompat.py | 10 ++++----- easybuild/easyblocks/c/cudnn.py | 4 ++-- easybuild/easyblocks/c/cufflinks.py | 4 ++-- easybuild/easyblocks/d/db.py | 2 +- easybuild/easyblocks/d/dm_reverb.py | 4 ++-- easybuild/easyblocks/d/dualsphysics.py | 12 +++++----- easybuild/easyblocks/e/easybuildmeta.py | 14 ++++++------ easybuild/easyblocks/e/eigen.py | 2 +- easybuild/easyblocks/e/elpa.py | 10 ++++----- easybuild/easyblocks/e/elsi.py | 6 ++--- easybuild/easyblocks/e/esmf.py | 6 ++--- easybuild/easyblocks/e/extrae.py | 4 ++-- easybuild/easyblocks/f/faststructure.py | 6 ++--- easybuild/easyblocks/f/fdtd_solutions.py | 6 ++--- easybuild/easyblocks/f/ferret.py | 2 +- easybuild/easyblocks/f/fftw.py | 8 +++---- easybuild/easyblocks/f/fftwmpi.py | 6 ++--- easybuild/easyblocks/f/flex.py | 4 ++-- easybuild/easyblocks/f/flexiblas.py | 8 +++---- easybuild/easyblocks/f/flook.py | 6 ++--- easybuild/easyblocks/f/fluent.py | 4 ++-- easybuild/easyblocks/f/freesurfer.py | 8 +++---- easybuild/easyblocks/f/freetype.py | 4 ++-- easybuild/easyblocks/f/fsl.py | 6 ++--- easybuild/easyblocks/g/g2clib.py | 4 ++-- easybuild/easyblocks/g/g2lib.py | 4 ++-- easybuild/easyblocks/g/gamess_us.py | 8 +++---- easybuild/easyblocks/g/gate.py | 12 +++++----- easybuild/easyblocks/g/gcc.py | 22 +++++++++---------- easybuild/easyblocks/g/gctf.py | 6 ++--- easybuild/easyblocks/g/geant4.py | 4 ++-- easybuild/easyblocks/g/ghc.py | 2 +- easybuild/easyblocks/g/gromacs.py | 18 +++++++-------- easybuild/easyblocks/g/gurobi.py | 8 +++---- easybuild/easyblocks/generic/binary.py | 8 +++---- easybuild/easyblocks/generic/buildenv.py | 2 +- easybuild/easyblocks/generic/bundle.py | 8 +++---- easybuild/easyblocks/generic/cargo.py | 4 ++-- .../easyblocks/generic/cargopythonbundle.py | 2 +- easybuild/easyblocks/generic/cmakemake.py | 4 ++-- easybuild/easyblocks/generic/conda.py | 4 ++-- easybuild/easyblocks/generic/configuremake.py | 4 ++-- easybuild/easyblocks/generic/craytoolchain.py | 2 +- easybuild/easyblocks/generic/gopackage.py | 6 ++--- easybuild/easyblocks/generic/intelbase.py | 8 +++---- easybuild/easyblocks/generic/jar.py | 2 +- easybuild/easyblocks/generic/juliabundle.py | 8 +++---- easybuild/easyblocks/generic/juliapackage.py | 4 ++-- easybuild/easyblocks/generic/makecp.py | 2 +- easybuild/easyblocks/generic/octavepackage.py | 2 +- easybuild/easyblocks/generic/perlbundle.py | 8 +++---- easybuild/easyblocks/generic/perlmodule.py | 2 +- easybuild/easyblocks/generic/pythonbundle.py | 12 +++++----- easybuild/easyblocks/generic/pythonpackage.py | 16 +++++++------- easybuild/easyblocks/generic/rpackage.py | 10 ++++----- easybuild/easyblocks/generic/rpm.py | 4 ++-- easybuild/easyblocks/generic/rubygem.py | 8 +++---- easybuild/easyblocks/generic/systemmpi.py | 6 ++--- easybuild/easyblocks/generic/toolchain.py | 2 +- .../versionindependentpythonpackage.py | 2 +- .../easyblocks/generic/vscpythonpackage.py | 4 ++-- easybuild/easyblocks/h/hadoop.py | 8 +++---- easybuild/easyblocks/h/hdf5.py | 10 ++++----- easybuild/easyblocks/h/hpcc.py | 6 ++--- easybuild/easyblocks/h/hpcg.py | 2 +- easybuild/easyblocks/h/hpl.py | 4 ++-- easybuild/easyblocks/h/hypre.py | 6 ++--- easybuild/easyblocks/i/icc.py | 6 ++--- easybuild/easyblocks/i/iccifort.py | 2 +- easybuild/easyblocks/i/imkl.py | 12 +++++----- easybuild/easyblocks/i/imkl_fftw.py | 8 +++---- easybuild/easyblocks/i/impi.py | 14 ++++++------ easybuild/easyblocks/i/inspector.py | 6 ++--- easybuild/easyblocks/i/intel_compilers.py | 11 +++++----- easybuild/easyblocks/i/itac.py | 12 +++++----- easybuild/easyblocks/j/java.py | 6 ++--- easybuild/easyblocks/j/jaxlib.py | 2 +- easybuild/easyblocks/l/lammps.py | 10 ++++----- easybuild/easyblocks/l/lapack.py | 10 ++++----- easybuild/easyblocks/l/libdrm.py | 2 +- easybuild/easyblocks/l/libint.py | 8 +++---- easybuild/easyblocks/l/libqglviewer.py | 2 +- easybuild/easyblocks/l/libxml2.py | 2 +- easybuild/easyblocks/l/llvm.py | 14 ++++++------ easybuild/easyblocks/l/lua.py | 4 ++-- easybuild/easyblocks/m/mamba.py | 2 +- easybuild/easyblocks/m/maple.py | 2 +- easybuild/easyblocks/m/mathematica.py | 6 ++--- easybuild/easyblocks/m/matlab.py | 6 ++--- easybuild/easyblocks/m/mcr.py | 6 ++--- easybuild/easyblocks/m/mesa.py | 10 ++++----- easybuild/easyblocks/m/metagenome_atlas.py | 2 +- easybuild/easyblocks/m/metalwalls.py | 8 +++---- easybuild/easyblocks/m/metis.py | 8 +++---- easybuild/easyblocks/m/molpro.py | 8 +++---- easybuild/easyblocks/m/motioncor2.py | 6 ++--- easybuild/easyblocks/m/mpich.py | 6 ++--- easybuild/easyblocks/m/mrbayes.py | 6 ++--- easybuild/easyblocks/m/mrtrix.py | 6 ++--- easybuild/easyblocks/m/mummer.py | 8 +++---- easybuild/easyblocks/m/mumps.py | 2 +- easybuild/easyblocks/m/mxnet.py | 14 ++++++------ easybuild/easyblocks/n/namd.py | 14 ++++++------ easybuild/easyblocks/n/nccl.py | 6 ++--- easybuild/easyblocks/n/ncl.py | 4 ++-- easybuild/easyblocks/n/netcdf.py | 2 +- easybuild/easyblocks/n/netcdf4_python.py | 9 ++++---- easybuild/easyblocks/n/netcdf_fortran.py | 4 ++-- easybuild/easyblocks/n/neuron.py | 10 ++++----- easybuild/easyblocks/n/nim.py | 2 +- easybuild/easyblocks/n/nose.py | 2 +- easybuild/easyblocks/n/numexpr.py | 6 ++--- easybuild/easyblocks/n/numpy.py | 14 ++++++------ easybuild/easyblocks/n/nvhpc.py | 6 ++--- easybuild/easyblocks/n/nwchem.py | 8 +++---- easybuild/easyblocks/o/ocaml.py | 10 ++++----- easybuild/easyblocks/o/octave.py | 6 ++--- easybuild/easyblocks/o/openbabel.py | 8 +++---- easybuild/easyblocks/o/openblas.py | 2 +- easybuild/easyblocks/o/opencv.py | 12 +++++----- easybuild/easyblocks/o/openfoam.py | 10 ++++----- easybuild/easyblocks/o/openmpi.py | 8 +++---- easybuild/easyblocks/o/openssl.py | 6 ++--- easybuild/easyblocks/o/openssl_wrapper.py | 12 +++++----- easybuild/easyblocks/o/optislang.py | 4 ++-- easybuild/easyblocks/o/orca.py | 4 ++-- easybuild/easyblocks/p/palm.py | 4 ++-- easybuild/easyblocks/p/paraver.py | 6 ++--- easybuild/easyblocks/p/parmetis.py | 4 ++-- easybuild/easyblocks/p/pdt.py | 8 +++---- easybuild/easyblocks/p/perl.py | 4 ++-- easybuild/easyblocks/p/petsc.py | 12 +++++----- easybuild/easyblocks/p/psi.py | 10 ++++----- easybuild/easyblocks/p/psmpi.py | 8 +++---- easybuild/easyblocks/p/pybind11.py | 4 ++-- easybuild/easyblocks/p/python.py | 12 +++++----- easybuild/easyblocks/p/pytorch.py | 14 ++++++------ easybuild/easyblocks/p/pyzmq.py | 2 +- easybuild/easyblocks/q/qscintilla.py | 12 +++++----- easybuild/easyblocks/q/qt.py | 4 ++-- easybuild/easyblocks/q/quantumespresso.py | 16 +++++++------- easybuild/easyblocks/r/r.py | 4 ++-- easybuild/easyblocks/r/repeatmasker.py | 6 ++--- easybuild/easyblocks/r/repeatmodeler.py | 6 ++--- easybuild/easyblocks/r/reticulate.py | 2 +- easybuild/easyblocks/r/rmpi.py | 4 ++-- easybuild/easyblocks/r/root.py | 6 ++--- easybuild/easyblocks/r/rosetta.py | 8 +++---- easybuild/easyblocks/r/rserve.py | 4 ++-- easybuild/easyblocks/r/ruby.py | 4 ++-- easybuild/easyblocks/r/rust.py | 8 +++---- easybuild/easyblocks/s/samtools.py | 8 +++---- easybuild/easyblocks/s/scalapack.py | 12 +++++----- easybuild/easyblocks/s/scipion.py | 6 ++--- easybuild/easyblocks/s/score_p.py | 2 +- easybuild/easyblocks/s/scotch.py | 2 +- easybuild/easyblocks/s/sepp.py | 6 ++--- easybuild/easyblocks/s/siesta.py | 6 ++--- easybuild/easyblocks/s/slepc.py | 12 +++++----- easybuild/easyblocks/s/star_ccm.py | 6 ++--- easybuild/easyblocks/s/stata.py | 2 +- easybuild/easyblocks/s/suitesparse.py | 6 ++--- easybuild/easyblocks/s/superlu.py | 10 ++++----- easybuild/easyblocks/s/swig.py | 4 ++-- easybuild/easyblocks/s/sympy.py | 4 ++-- easybuild/easyblocks/t/tbb.py | 8 +++---- easybuild/easyblocks/t/tensorflow.py | 4 ++-- .../easyblocks/t/tensorflow_compression.py | 2 +- easybuild/easyblocks/t/tensorrt.py | 6 ++--- easybuild/easyblocks/t/tinker.py | 4 ++-- easybuild/easyblocks/t/tkinter.py | 8 +++---- easybuild/easyblocks/t/torchvision.py | 6 ++--- easybuild/easyblocks/t/tornado.py | 4 ++-- easybuild/easyblocks/t/trilinos.py | 8 +++---- easybuild/easyblocks/t/trinity.py | 2 +- easybuild/easyblocks/u/ucx_plugins.py | 8 +++---- easybuild/easyblocks/v/velvet.py | 2 +- easybuild/easyblocks/v/vep.py | 6 ++--- easybuild/easyblocks/v/vmd.py | 10 ++++----- easybuild/easyblocks/v/vtune.py | 8 +++---- easybuild/easyblocks/w/wien2k.py | 8 +++---- easybuild/easyblocks/w/wps.py | 6 ++--- easybuild/easyblocks/w/wrf.py | 6 ++--- easybuild/easyblocks/w/wxpython.py | 4 ++-- easybuild/easyblocks/x/xalt.py | 7 +++--- easybuild/easyblocks/x/xcrysden.py | 6 ++--- easybuild/easyblocks/x/xmipp.py | 16 +++++++------- easybuild/easyblocks/x/xml.py | 2 +- test/easyblocks/easyblock_specific.py | 4 ++-- test/easyblocks/general.py | 4 ++-- test/easyblocks/module.py | 4 ++-- 222 files changed, 723 insertions(+), 726 deletions(-) diff --git a/easybuild/easyblocks/a/abaqus.py b/easybuild/easyblocks/a/abaqus.py index 497220970fe..519d0d1eef3 100644 --- a/easybuild/easyblocks/a/abaqus.py +++ b/easybuild/easyblocks/a/abaqus.py @@ -60,7 +60,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for ABAQUS.""" - super(EB_ABAQUS, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.replayfile = None if self.cfg['with_tosca'] is None and LooseVersion(self.version) >= LooseVersion('2020'): @@ -222,7 +222,7 @@ def install_step(self): self.cfg['install_cmd'] += " -replay %s" % self.replayfile if LooseVersion(self.version) < LooseVersion("6.13"): self.cfg['install_cmd'] += " -nosystemcheck" - super(EB_ABAQUS, self).install_step() + super().install_step() if LooseVersion(self.version) >= LooseVersion('2016'): # also install hot fixes (if any) @@ -357,11 +357,11 @@ def sanity_check_step(self): if self.cfg['with_tosca']: custom_commands.append("ToscaPython.sh --help") - super(EB_ABAQUS, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): """Add LM_LICENSE_FILE path if specified""" - txt = super(EB_ABAQUS, self).make_module_extra() + txt = super().make_module_extra() license_file = os.getenv('EB_ABAQUS_LICENSE_FILE', None) if license_file is not None: txt += self.module_generator.prepend_paths('ABAQUSLM_LICENSE_FILE', [license_file], allow_abs=True) diff --git a/easybuild/easyblocks/a/adf.py b/easybuild/easyblocks/a/adf.py index 7a35f73c889..a64d6325eaf 100644 --- a/easybuild/easyblocks/a/adf.py +++ b/easybuild/easyblocks/a/adf.py @@ -41,7 +41,7 @@ class EB_ADF(EasyBlock): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for ADF.""" - super(EB_ADF, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.build_in_installdir = True @@ -49,7 +49,7 @@ def extract_step(self): """Extract sources.""" # strip off 'adf' part to avoid having everything in a subdirectory self.cfg['unpack_options'] = "--strip-components=1" - super(EB_ADF, self).extract_step() + super().extract_step() def configure_step(self): """Custom configuration procedure for ADF.""" @@ -89,11 +89,11 @@ def sanity_check_step(self): 'files': ['bin/adf'], 'dirs': ['atomicdata', 'examples'], } - super(EB_ADF, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Custom extra module file entries for ADF.""" - txt = super(EB_ADF, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('ADFHOME', self.installdir) txt += self.module_generator.set_environment('ADFBIN', os.path.join(self.installdir, 'bin')) diff --git a/easybuild/easyblocks/a/advisor.py b/easybuild/easyblocks/a/advisor.py index bc6c2791ea2..db8e56a93c3 100644 --- a/easybuild/easyblocks/a/advisor.py +++ b/easybuild/easyblocks/a/advisor.py @@ -45,7 +45,7 @@ class EB_Advisor(IntelBase): def __init__(self, *args, **kwargs): """Constructor, initialize class variables.""" - super(EB_Advisor, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if LooseVersion(self.version) < LooseVersion('2020'): raise EasyBuildError( @@ -63,10 +63,10 @@ def __init__(self, *args, **kwargs): def prepare_step(self, *args, **kwargs): """Since 2019u3 there is no license required.""" kwargs['requires_runtime_license'] = False - super(EB_Advisor, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) def sanity_check_step(self): """Custom sanity check paths for Advisor""" binaries = ['advixe-cl', 'advixe-feedback', 'advixe-gui', 'advixe-runss', 'advixe-runtrc', 'advixe-runtc'] custom_paths = self.get_custom_paths_tools(binaries) - super(EB_Advisor, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/a/aedt.py b/easybuild/easyblocks/a/aedt.py index 3f8e34cc40a..c2f50ca1174 100644 --- a/easybuild/easyblocks/a/aedt.py +++ b/easybuild/easyblocks/a/aedt.py @@ -43,7 +43,7 @@ class EB_AEDT(PackedBinary): def __init__(self, *args, **kwargs): """Initialize Ansys Electronics Desktop specific variables.""" - super(EB_AEDT, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.subdir = None def _set_subdir(self): @@ -120,7 +120,7 @@ def post_processing_step(self): def make_module_extra(self): """Extra module entries for Ansys Electronics Desktop.""" - txt = super(EB_AEDT, self).make_module_extra() + txt = super().make_module_extra() ver = LooseVersion(self.version) short_ver = self.version[2:].replace('R', '') @@ -160,4 +160,4 @@ def sanity_check_step(self): inpfile = os.path.join(tempdir, 'sm-1.aedt') custom_commands = ['ansysedt -ng -batchsolve -Distributed -monitor %s' % inpfile] - super(EB_AEDT, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/a/amber.py b/easybuild/easyblocks/a/amber.py index 15972c0903a..1f3347ee7ca 100644 --- a/easybuild/easyblocks/a/amber.py +++ b/easybuild/easyblocks/a/amber.py @@ -68,7 +68,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Easyblock constructor: initialise class variables.""" - super(EB_Amber, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if LooseVersion(self.version) < LooseVersion('20'): # Build Amber <20 in install directory @@ -83,7 +83,7 @@ def __init__(self, *args, **kwargs): def extract_step(self): """Extract sources; strip off parent directory during unpack""" self.cfg.update('unpack_options', "--strip-components=1") - super(EB_Amber, self).extract_step() + super().extract_step() def patch_step(self, *args, **kwargs): """Patch Amber using 'update_amber' tool, prior to applying listed patch files (if any).""" @@ -118,7 +118,7 @@ def patch_step(self, *args, **kwargs): for _ in range(self.cfg['patchruns']): run_shell_cmd(cmd) - super(EB_Amber, self).patch_step(*args, **kwargs) + super().patch_step(*args, **kwargs) def configure_step(self): """Apply the necessary CMake config opts.""" @@ -203,7 +203,7 @@ def configure_step(self): self.cfg.update('configopts', '-DCOMPILER=AUTO') # configure using cmake - super(EB_Amber, self).configure_step() + super().configure_step() def build_step(self): """Build Amber""" @@ -211,7 +211,7 @@ def build_step(self): # Building Amber < 20 is done in install step. return - super(EB_Amber, self).build_step() + super().build_step() def test_step(self): """Testing Amber build is done in install step.""" @@ -308,7 +308,7 @@ def configuremake_install_step(self): # build in situ using 'make install' # note: not 'build' - super(EB_Amber, self).install_step() + super().install_step() # test if self.cfg['runtest']: @@ -325,7 +325,7 @@ def install_step(self): self.configuremake_install_step() return - super(EB_Amber, self).install_step() + super().install_step() # Run the tests located in the build directory if self.cfg['runtest']: @@ -374,11 +374,11 @@ def sanity_check_step(self): 'files': [os.path.join(self.installdir, 'bin', binary) for binary in binaries], 'dirs': [], } - super(EB_Amber, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Add module entries specific to Amber/AmberTools""" - txt = super(EB_Amber, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('AMBERHOME', self.installdir) diff --git a/easybuild/easyblocks/a/anaconda.py b/easybuild/easyblocks/a/anaconda.py index 8efe6b5b2c9..e1af25418fd 100644 --- a/easybuild/easyblocks/a/anaconda.py +++ b/easybuild/easyblocks/a/anaconda.py @@ -77,4 +77,4 @@ def sanity_check_step(self): 'files': [os.path.join('bin', x) for x in ['2to3', 'conda', 'pydoc', 'python', 'sqlite3']], 'dirs': ['bin', 'etc', 'lib', 'pkgs'], } - super(EB_Anaconda, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/a/ansys.py b/easybuild/easyblocks/a/ansys.py index 31057ef49e3..fed4ffd7e6b 100644 --- a/easybuild/easyblocks/a/ansys.py +++ b/easybuild/easyblocks/a/ansys.py @@ -44,7 +44,7 @@ class EB_ANSYS(PackedBinary): def __init__(self, *args, **kwargs): """Initialize ANSYS-specific variables.""" - super(EB_ANSYS, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.ansysver = None # custom extra module environment entries for ANSYS @@ -107,7 +107,7 @@ def make_module_extra(self): if self.ansysver is None: self.set_ansysver() - txt = super(EB_ANSYS, self).make_module_extra() + txt = super().make_module_extra() icem_acn = os.path.join(self.installdir, self.ansysver, 'icemcfd', 'linux64_amd') txt += self.module_generator.set_environment('ICEM_ACN', icem_acn) return txt @@ -122,4 +122,4 @@ def sanity_check_step(self): 'files': [os.path.join(self.ansysver, 'fluent', 'bin', 'fluent%s' % x) for x in ['', '_arch', '_sysinfo']], 'dirs': [os.path.join(self.ansysver, x) for x in ['ansys', 'aisol', 'CFD-Post', 'CFX']] } - super(EB_ANSYS, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/a/aocc.py b/easybuild/easyblocks/a/aocc.py index 5e942cb9d2b..949b709fa2f 100644 --- a/easybuild/easyblocks/a/aocc.py +++ b/easybuild/easyblocks/a/aocc.py @@ -80,7 +80,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Easyblock constructor, define custom class variables specific to AOCC.""" - super(EB_AOCC, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.clangversion = self.cfg['clangversion'] # AOCC is based on Clang. Try to guess the clangversion from the AOCC version @@ -209,7 +209,7 @@ def install_step(self): # or via 'accept_eula = True' in easyconfig file self.check_accepted_eula(more_info='http://developer.amd.com/wordpress/media/files/AOCC_EULA.pdf') - super(EB_AOCC, self).install_step() + super().install_step() def post_processing_step(self): """ @@ -245,7 +245,7 @@ def post_processing_step(self): self._create_compiler_config_files(compilers_to_add_config_files) self._create_compiler_wrappers(compilers_to_wrap) - super(EB_AOCC, self).post_processing_step() + super().post_processing_step() def sanity_check_step(self): """Custom sanity check for AOCC, based on sanity check for Clang.""" @@ -288,11 +288,11 @@ def sanity_check_step(self): minimal_f90_compiler_cmd = "cd %s && flang minimal.f90 -o minimal_f90" % tmpdir custom_commands.append(minimal_f90_compiler_cmd) - super(EB_AOCC, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): """Custom variables for AOCC module.""" - txt = super(EB_AOCC, self).make_module_extra() + txt = super().make_module_extra() # we set the symbolizer path so that asan/tsan give meanfull output by default asan_symbolizer_path = os.path.join(self.installdir, 'bin', 'llvm-symbolizer') txt += self.module_generator.set_environment('ASAN_SYMBOLIZER_PATH', asan_symbolizer_path) diff --git a/easybuild/easyblocks/a/aomp.py b/easybuild/easyblocks/a/aomp.py index 99c4673651a..443ddb5f6b0 100644 --- a/easybuild/easyblocks/a/aomp.py +++ b/easybuild/easyblocks/a/aomp.py @@ -65,7 +65,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize custom class variables for Clang.""" - super(EB_AOMP, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cfg['extract_sources'] = True self.cfg['dontcreateinstalldir'] = True # Bypass the .mod file check for GCCcore installs @@ -130,7 +130,7 @@ def configure_step(self): self.cfg['installopts'] = 'select ' + ' '.join(components) def post_processing_step(self): - super(EB_AOMP, self).post_processing_step() + super().post_processing_step() # The install script will create a symbolic link as the install # directory, this creates problems for EB as it won't remove the # symlink. To remedy this we remove the link here and rename the actual @@ -190,4 +190,4 @@ def sanity_check_step(self): 'aompcc --help', 'clang --help', 'clang++ --help', 'flang --help', 'llvm-config --cxxflags', ] - super(EB_AOMP, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/a/armadillo.py b/easybuild/easyblocks/a/armadillo.py index ee93ff63662..4c719f7bb3c 100644 --- a/easybuild/easyblocks/a/armadillo.py +++ b/easybuild/easyblocks/a/armadillo.py @@ -59,7 +59,7 @@ def configure_step(self): self.cfg.update('configopts', '-DBLAS_LIBRARY:PATH="%s"' % os.getenv('LIBBLAS')) self.cfg.update('configopts', '-DLAPACK_LIBRARY:PATH="%s"' % os.getenv('LIBLAPACK')) - super(EB_Armadillo, self).configure_step() + super().configure_step() def sanity_check_step(self): """Custom sanity check for Armadillo.""" @@ -72,4 +72,4 @@ def sanity_check_step(self): 'files': ['include/armadillo', os.path.join(libdir, 'libarmadillo.%s' % get_shared_lib_ext())], 'dirs': ['include/armadillo_bits'], } - super(EB_Armadillo, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/b/bazel.py b/easybuild/easyblocks/b/bazel.py index e45c6ee605a..629c5b47c13 100644 --- a/easybuild/easyblocks/b/bazel.py +++ b/easybuild/easyblocks/b/bazel.py @@ -117,7 +117,7 @@ def fixup_hardcoded_paths(self): def prepare_step(self, *args, **kwargs): """Setup bazel output root""" - super(EB_Bazel, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) self.bazel_tmp_dir = tempfile.mkdtemp(suffix='-bazel-tmp', dir=self.builddir) self._make_output_user_root() @@ -143,7 +143,7 @@ def extract_step(self): # Older Bazel won't build when the output_user_root is a subfolder of the source folder # So create a dedicated source folder self.cfg.update('unpack_options', '-d src') - super(EB_Bazel, self).extract_step() + super().extract_step() def configure_step(self): """Custom configuration procedure for Bazel.""" @@ -231,4 +231,4 @@ def sanity_check_step(self): # Avoid writes to $HOME custom_commands.append("bazel --output_user_root=%s --help" % self.output_user_root) - super(EB_Bazel, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/b/berkeleygw.py b/easybuild/easyblocks/b/berkeleygw.py index b7d28798042..4495d83f7ea 100644 --- a/easybuild/easyblocks/b/berkeleygw.py +++ b/easybuild/easyblocks/b/berkeleygw.py @@ -53,7 +53,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Add extra config options specific to BerkeleyGW.""" - super(EB_BerkeleyGW, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def configure_step(self): """No configuration procedure for BerkeleyGW.""" @@ -166,12 +166,12 @@ def build_step(self): self.cfg.update('buildopts', 'MATHFLAG="%s"' % ' '.join(mathflags)) - super(EB_BerkeleyGW, self).build_step() + super().build_step() def install_step(self): """Custom install step for BerkeleyGW.""" self.cfg.update('installopts', 'INSTDIR="%s"' % self.installdir) - super(EB_BerkeleyGW, self).install_step() + super().install_step() def test_step(self): """Custom test step for BerkeleyGW.""" @@ -180,7 +180,7 @@ def test_step(self): setvar('BGW_TEST_MPI_NPROCS', '2') setvar('OMP_NUM_THREADS', '2') setvar('TEMPDIRPATH', os.path.join(self.builddir, 'tmp')) - super(EB_BerkeleyGW, self).test_step() + super().test_step() def sanity_check_step(self): """Custom sanity check for BerkeleyGW.""" @@ -194,4 +194,4 @@ def sanity_check_step(self): 'dirs': [], } - super(EB_BerkeleyGW, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/b/binutils.py b/easybuild/easyblocks/b/binutils.py index 8720ad4f8bc..049e073c18f 100644 --- a/easybuild/easyblocks/b/binutils.py +++ b/easybuild/easyblocks/b/binutils.py @@ -58,7 +58,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Easyblock constructor""" - super(EB_binutils, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # ld.gold linker is not supported on RISC-V self.use_gold = get_cpu_family() != RISCV @@ -185,7 +185,7 @@ def configure_step(self): self.cfg.update('configopts', '--without-debuginfod') # complete configuration with configure_method of parent - super(EB_binutils, self).configure_step() + super().configure_step() if self.cfg['install_libiberty']: cflags = os.getenv('CFLAGS') @@ -198,7 +198,7 @@ def configure_step(self): def install_step(self): """Install using 'make install', also install libiberty if desired.""" - super(EB_binutils, self).install_step() + super().install_step() # only install libiberty files if if they're not there yet; # libiberty.a is installed by default for old binutils versions @@ -278,4 +278,4 @@ def sanity_check_step(self): if re.search(r'libz\.%s' % shlib_ext, res.output): raise EasyBuildError("zlib is not statically linked in %s: %s", bin_path, res.output) - super(EB_binutils, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/b/blat.py b/easybuild/easyblocks/b/blat.py index d64a2a63c3a..6814240b858 100755 --- a/easybuild/easyblocks/b/blat.py +++ b/easybuild/easyblocks/b/blat.py @@ -48,4 +48,4 @@ def build_step(self, verbose=False): bindir = os.path.join(os.getcwd(), "bin") self.cfg.update('buildopts', "BINDIR=%s" % bindir) - return super(EB_BLAT, self).build_step(verbose=verbose) + return super().build_step(verbose=verbose) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index e6d3981a829..1ff586fbafa 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -62,7 +62,7 @@ class EB_Boost(EasyBlock): def __init__(self, *args, **kwargs): """Initialize Boost-specific variables.""" - super(EB_Boost, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.pyvers = [] @@ -91,7 +91,7 @@ def extra_options(): def patch_step(self): """Patch Boost source code before building.""" - super(EB_Boost, self).patch_step() + super().patch_step() # TIME_UTC is also defined in recent glibc versions, so we need to rename it for old Boost versions (<= 1.49) glibc_version = get_glibc_version() @@ -111,7 +111,7 @@ def patch_step(self): def prepare_step(self, *args, **kwargs): """Prepare build environment.""" - super(EB_Boost, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) # keep track of Python version(s) used during installation, # so we can perform a complete sanity check @@ -357,11 +357,11 @@ def sanity_check_step(self): if self.cfg['tagged_layout']: custom_paths['files'].append(os.path.join('lib', 'libboost_mpi%s.%s' % (lib_mt_suffix, shlib_ext))) - super(EB_Boost, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Set up a BOOST_ROOT environment variable to e.g. ease Boost handling by cmake""" - txt = super(EB_Boost, self).make_module_extra() + txt = super().make_module_extra() if not self.cfg['only_python_bindings']: txt += self.module_generator.set_environment('BOOST_ROOT', self.installdir) return txt diff --git a/easybuild/easyblocks/b/bowtie.py b/easybuild/easyblocks/b/bowtie.py index e6b4e813067..21cf6a974e4 100644 --- a/easybuild/easyblocks/b/bowtie.py +++ b/easybuild/easyblocks/b/bowtie.py @@ -62,7 +62,7 @@ def install_step(self): """ if LooseVersion(self.version) >= LooseVersion('1.1.2'): # 'make install' is supported since Bowtie 1.1.2 - super(EB_Bowtie, self).install_step() + super().install_step() else: destdir = os.path.join(self.installdir, 'bin') mkdir(destdir) @@ -86,4 +86,4 @@ def sanity_check_step(self): 'files': [os.path.join('bin', x) for x in binaries], 'dirs': [] } - super(EB_Bowtie, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/b/bowtie2.py b/easybuild/easyblocks/b/bowtie2.py index 4f19a3c09be..310178125b9 100644 --- a/easybuild/easyblocks/b/bowtie2.py +++ b/easybuild/easyblocks/b/bowtie2.py @@ -39,7 +39,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Bowtie2 easyblock constructor, define class variables.""" - super(EB_Bowtie2, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.bowtie2_files = ['bowtie2', 'bowtie2-build', 'bowtie2-inspect', 'MANUAL', 'MANUAL.markdown', 'NEWS'] if LooseVersion(self.version) >= LooseVersion('2.2.0'): @@ -70,14 +70,14 @@ def build_step(self): if cxxflags: self.cfg.update('buildopts', 'RELEASE_FLAGS="%s"' % cxxflags) - super(EB_Bowtie2, self).build_step() + super().build_step() def install_step(self): """ Install by copying files to install dir """ self.cfg['files_to_copy'] = [(self.bowtie2_files, 'bin'), 'doc', 'example', 'scripts'] - super(EB_Bowtie2, self).install_step() + super().install_step() def sanity_check_step(self): """Custom sanity check for Bowtie2.""" @@ -85,4 +85,4 @@ def sanity_check_step(self): 'files': [os.path.join('bin', f) for f in self.bowtie2_files], 'dirs': ['doc', 'example', 'scripts'] } - super(EB_Bowtie2, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/b/bwa.py b/easybuild/easyblocks/b/bwa.py index 1948e87566f..fffe304ff66 100644 --- a/easybuild/easyblocks/b/bwa.py +++ b/easybuild/easyblocks/b/bwa.py @@ -34,7 +34,7 @@ class EB_BWA(ConfigureMake): def __init__(self, *args, **kwargs): """Add extra config options specific to BWA.""" - super(EB_BWA, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.files = ['bwa', 'qualfa2fq.pl', 'xa2multi.pl'] if LooseVersion(self.version) < LooseVersion('0.7.0'): @@ -58,7 +58,7 @@ def build_step(self): if env_var + '=' not in self.cfg['buildopts']: self.cfg.update('buildopts', env_var + '="$' + env_var + '"') - super(EB_BWA, self).build_step() + super().build_step() def install_step(self): """ @@ -112,4 +112,4 @@ def sanity_check_step(self): # when run without arguments (and exits with exit code 1) custom_commands = ["bwa 2>&1 | grep 'index sequences in the FASTA format'"] - super(EB_BWA, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/b/bzip2.py b/easybuild/easyblocks/b/bzip2.py index 68a22ee26b6..1efc8704187 100644 --- a/easybuild/easyblocks/b/bzip2.py +++ b/easybuild/easyblocks/b/bzip2.py @@ -64,7 +64,7 @@ def install_step(self): """Install in non-standard path by passing PREFIX variable to make install.""" self.cfg.update('installopts', "PREFIX=%s" % self.installdir) - super(EB_bzip2, self).install_step() + super().install_step() # also build & install shared libraries, if desired if self.cfg['with_shared_libs']: @@ -107,4 +107,4 @@ def sanity_check_step(self): ['include/bzlib.h'] + libs, 'dirs': [], } - super(EB_bzip2, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/c/cblas.py b/easybuild/easyblocks/c/cblas.py index 84bb88c96fb..dce947b3244 100644 --- a/easybuild/easyblocks/c/cblas.py +++ b/easybuild/easyblocks/c/cblas.py @@ -95,4 +95,4 @@ def sanity_check_step(self): 'files': ['lib/libcblas.a', 'lib/libcblas.%s' % get_shared_lib_ext()], 'dirs': ['include'], } - super(EB_CBLAS, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/c/cgal.py b/easybuild/easyblocks/c/cgal.py index 47deae247dd..6a8d5bce4ad 100644 --- a/easybuild/easyblocks/c/cgal.py +++ b/easybuild/easyblocks/c/cgal.py @@ -62,7 +62,7 @@ def configure_step(self): os.environ['BOOST_ROOT'] = get_software_root('Boost') - super(EB_CGAL, self).configure_step() + super().configure_step() def sanity_check_step(self): """Custom sanity check for CGAL.""" @@ -78,4 +78,4 @@ def sanity_check_step(self): 'files': [os.path.join('bin', 'cgal_%s') % x for x in ['create_cmake_script', 'make_macosx_app']] + libs, 'dirs': dirs, } - super(EB_CGAL, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/c/clang.py b/easybuild/easyblocks/c/clang.py index 6c700b08741..021ff555299 100644 --- a/easybuild/easyblocks/c/clang.py +++ b/easybuild/easyblocks/c/clang.py @@ -119,7 +119,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize custom class variables for Clang.""" - super(EB_Clang, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.llvm_src_dir = None self.llvm_obj_dir_stage1 = None self.llvm_obj_dir_stage2 = None @@ -218,7 +218,7 @@ def __init__(self, *args, **kwargs): def check_readiness_step(self): """Fail early on RHEL 5.x and derivatives because of known bug in libc.""" - super(EB_Clang, self).check_readiness_step() + super().check_readiness_step() # RHEL 5.x have a buggy libc. Building stage 2 will fail. if get_os_name() in ['redhat', 'RHEL', 'centos', 'SL'] and get_os_version().startswith('5.'): raise EasyBuildError("Can not build Clang on %s v5.x: libc is buggy, building stage 2 will fail. " @@ -230,7 +230,7 @@ def extract_step(self): """ # Extract everything into separate directories. - super(EB_Clang, self).extract_step() + super().extract_step() # Find the full path to the directory that was unpacked from llvm-*.tar.gz. for tmp in self.src: @@ -448,9 +448,9 @@ def configure_step(self): # directory structure has changed in version 14.x, cmake must start in llvm sub directory if LooseVersion(self.version) >= LooseVersion('14'): - super(EB_Clang, self).configure_step(srcdir=os.path.join(self.llvm_src_dir, "llvm")) + super().configure_step(srcdir=os.path.join(self.llvm_src_dir, "llvm")) else: - super(EB_Clang, self).configure_step(srcdir=self.llvm_src_dir) + super().configure_step(srcdir=self.llvm_src_dir) def disable_sanitizer_tests(self): """Disable the tests of all the sanitizers by removing the test directories from the build system""" @@ -561,7 +561,7 @@ def build_step(self): # Stage 1: build using system compiler. self.log.info("Building stage 1") change_dir(self.llvm_obj_dir_stage1) - super(EB_Clang, self).build_step() + super().build_step() if self.cfg['bootstrap']: self.log.info("Building stage 2") @@ -586,7 +586,7 @@ def install_step(self): change_dir(self.llvm_obj_dir_stage3) else: change_dir(self.llvm_obj_dir_stage1) - super(EB_Clang, self).install_step() + super().install_step() # the static analyzer is not installed by default # we do it by hand @@ -610,7 +610,7 @@ def install_step(self): def post_processing_step(self): """Install python bindings.""" - super(EB_Clang, self).post_processing_step() + super().post_processing_step() # copy Python bindings here in post-install step so that it is not done more than once in multi_deps context if self.cfg['python_bindings']: @@ -751,7 +751,7 @@ def sanity_check_step(self): custom_paths['files'].extend([os.path.join("lib", "python", "clang", "cindex.py")]) custom_commands.extend(["python -c 'import clang'"]) - super(EB_Clang, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_step(self, *args, **kwargs): """ @@ -770,7 +770,7 @@ def make_module_step(self, *args, **kwargs): def make_module_extra(self): """Custom variables for Clang module.""" - txt = super(EB_Clang, self).make_module_extra() + txt = super().make_module_extra() # we set the symbolizer path so that asan/tsan give meanfull output by default asan_symbolizer_path = os.path.join(self.installdir, 'bin', 'llvm-symbolizer') txt += self.module_generator.set_environment('ASAN_SYMBOLIZER_PATH', asan_symbolizer_path) diff --git a/easybuild/easyblocks/c/clang_aomp.py b/easybuild/easyblocks/c/clang_aomp.py index e3d86502f2c..eb2f787e120 100644 --- a/easybuild/easyblocks/c/clang_aomp.py +++ b/easybuild/easyblocks/c/clang_aomp.py @@ -65,7 +65,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Easyblock constructor.""" - super(EB_Clang_minus_AOMP, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # List of LLVM target architectures to build for, extended in the 'prepare_step' self.target_archs = ['AMDGPU'] @@ -100,7 +100,7 @@ def prepare_step(self, *args, **kwargs): """ Prepare build environment """ - super(EB_Clang_minus_AOMP, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) # Detect CPU architecture and setup build targets for LLVM cpu_arch = get_cpu_architecture() @@ -134,7 +134,7 @@ def configure_step(self): """ Go through each component and setup configuration for the later Bundle install step """ - super(EB_Clang_minus_AOMP, self).configure_step() + super().configure_step() # Ensure necessary libraries are downloaded and can be found device_lib_dir_pattern = os.path.join(self.builddir, 'ROCm-Device-Libs-*') diff --git a/easybuild/easyblocks/c/cmake.py b/easybuild/easyblocks/c/cmake.py index 91356bf73fc..1c2870f8442 100644 --- a/easybuild/easyblocks/c/cmake.py +++ b/easybuild/easyblocks/c/cmake.py @@ -56,7 +56,7 @@ def patch_step(self): Tweak UnixPaths.cmake if EasyBuild is configured with --sysroot. """ - super(EB_CMake, self).patch_step() + super().patch_step() sysroot = build_option('sysroot') if sysroot: @@ -146,11 +146,11 @@ def configure_step(self): self.cfg['configopts'] = configure_opts + ' -- ' + cmake_opts - super(EB_CMake, self).configure_step() + super().configure_step() def install_step(self): """Create symlinks for CMake binaries""" - super(EB_CMake, self).install_step() + super().install_step() # Some applications assume the existance of e.g. cmake3 to distinguish it from cmake, which can be 2 or 3 maj_ver = self.version.split('.')[0] bin_path = os.path.join(self.installdir, 'bin') @@ -168,4 +168,4 @@ def sanity_check_step(self): } commands = ['cmake --help', 'ccmake --help'] - super(EB_CMake, self).sanity_check_step(custom_paths=paths, custom_commands=commands) + super().sanity_check_step(custom_paths=paths, custom_commands=commands) diff --git a/easybuild/easyblocks/c/code_server.py b/easybuild/easyblocks/c/code_server.py index fc9d615d502..bc54817195c 100644 --- a/easybuild/easyblocks/c/code_server.py +++ b/easybuild/easyblocks/c/code_server.py @@ -48,7 +48,7 @@ def __init__(self, *args, **kwargs): else: raise EasyBuildError("Architecture %s is not supported for code-server on EasyBuild", myarch) - super(EB_code_minus_server, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cfg.template_values['mapped_arch'] = self.mapped_arch self.cfg.generate_template_values() @@ -61,7 +61,7 @@ def install_step(self): # set the install command to a default self.log.info("For %s, using default installation command '%s'..." % (self.name, cmd)) self.cfg['install_cmd'] = cmd - super(EB_code_minus_server, self).install_step() + super().install_step() def sanity_check_step(self): """Custom sanity check for code-server.""" @@ -72,7 +72,7 @@ def sanity_check_step(self): custom_commands = ["code-server --help"] - res = super(EB_code_minus_server, self).sanity_check_step( + res = super().sanity_check_step( custom_paths=custom_paths, custom_commands=custom_commands ) diff --git a/easybuild/easyblocks/c/comsol.py b/easybuild/easyblocks/c/comsol.py index 03e768e5a54..a45f83a86bb 100644 --- a/easybuild/easyblocks/c/comsol.py +++ b/easybuild/easyblocks/c/comsol.py @@ -46,12 +46,12 @@ class EB_COMSOL(PackedBinary): def __init__(self, *args, **kwargs): """Add extra config options specific to COMSOL.""" - super(EB_COMSOL, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.configfile = os.path.join(self.builddir, 'my_setupconfig.ini') def extract_step(self): """Need to adjust the permissions on the top dir, the DVD has 0444.""" - super(EB_COMSOL, self).extract_step() + super().extract_step() # The tar file comes from the DVD and has 0444 as permission at the top dir. adjust_permissions(self.builddir, stat.S_IWUSR) @@ -135,4 +135,4 @@ def sanity_check_step(self): ], 'dirs': ["java/glnxa64", "plugins"], } - super(EB_COMSOL, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 8251194b100..f754ddf5b16 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -67,7 +67,7 @@ class EB_CP2K(EasyBlock): """ def __init__(self, *args, **kwargs): - super(EB_CP2K, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.typearch = None @@ -926,12 +926,12 @@ def sanity_check_step(self): custom_paths['files'].append(os.path.join('lib', 'libcp2k.a')) custom_paths['files'].append(os.path.join('include', 'libcp2k.h')) custom_paths['files'].append(os.path.join('include', 'libcp2k.mod')) - super(EB_CP2K, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Set up a CP2K_DATA_DIR environment variable to find CP2K provided basis sets""" - txt = super(EB_CP2K, self).make_module_extra() + txt = super().make_module_extra() # also define $CP2K_DATA_DIR in module, # even though CP2K was already configured to pick up 'data' from install dir diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index d5c8ab53ce5..721c06d5c2e 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -52,7 +52,7 @@ class EB_CPLEX(Binary): def __init__(self, *args, **kwargs): """Initialize CPLEX-specific variables.""" - super(EB_CPLEX, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.bindir = None self.with_python = False @@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs): def prepare_step(self, *args, **kwargs): """Prepare build environment.""" - super(EB_CPLEX, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) if get_software_root('Python'): self.with_python = True @@ -130,7 +130,7 @@ def det_bindir(self): def make_module_extra(self): """Add bin dirs and lib dirs and set CPLEX_HOME and CPLEXDIR""" - txt = super(EB_CPLEX, self).make_module_extra() + txt = super().make_module_extra() # avoid failing miserably under --module-only --force if os.path.exists(self.installdir): @@ -171,4 +171,4 @@ def sanity_check_step(self): custom_commands.append("python -c 'import cplex'") custom_commands.append("python -c 'import docplex'") - super(EB_CPLEX, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/c/crispr_dav.py b/easybuild/easyblocks/c/crispr_dav.py index 4d11b3f1eee..2b0bfb42f3d 100644 --- a/easybuild/easyblocks/c/crispr_dav.py +++ b/easybuild/easyblocks/c/crispr_dav.py @@ -43,7 +43,7 @@ class EB_CRISPR_minus_DAV(Binary): def __init__(self, *args, **kwargs): """Constructor for CRISPR-DAV easyblock.""" - super(EB_CRISPR_minus_DAV, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cfg['extract_sources'] = True def post_processing_step(self): @@ -125,10 +125,10 @@ def sanity_check_step(self): example_cmd, ] - super(EB_CRISPR_minus_DAV, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): - txt = super(EB_CRISPR_minus_DAV, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.prepend_paths('PATH', ['']) return txt diff --git a/easybuild/easyblocks/c/cryptography.py b/easybuild/easyblocks/c/cryptography.py index 251499a70d6..e4ec2dc2444 100644 --- a/easybuild/easyblocks/c/cryptography.py +++ b/easybuild/easyblocks/c/cryptography.py @@ -38,7 +38,7 @@ class EB_cryptography(PythonPackage): def __init__(self, *args, **kwargs): """Initialize cryptography easyblock.""" - super(EB_cryptography, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # cryptography compiles a library using pthreads but does not link against it # which causes 'undefined symbol: pthread_atfork' @@ -53,7 +53,7 @@ def __init__(self, *args, **kwargs): def sanity_check_step(self, *args, **kwargs): """Custom sanity check""" - success, fail_msg = super(EB_cryptography, self).sanity_check_step(*args, **kwargs) + success, fail_msg = super().sanity_check_step(*args, **kwargs) if success: # Check module added in v0.7 leading to issue #9446 (see above) if LooseVersion(self.version) >= LooseVersion("0.7"): diff --git a/easybuild/easyblocks/c/cuda.py b/easybuild/easyblocks/c/cuda.py index 98a4bd0eeef..36dee36c77a 100644 --- a/easybuild/easyblocks/c/cuda.py +++ b/easybuild/easyblocks/c/cuda.py @@ -87,7 +87,7 @@ def __init__(self, *args, **kwargs): else: raise EasyBuildError("Architecture %s is not supported for CUDA on EasyBuild", myarch) - super(EB_CUDA, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cfg.template_values['cudaarch'] = cudaarch self.cfg.generate_template_values() @@ -122,7 +122,7 @@ def fetch_step(self, *args, **kwargs): name='CUDA', more_info='https://docs.nvidia.com/cuda/eula/index.html' ) - return super(EB_CUDA, self).fetch_step(*args, **kwargs) + return super().fetch_step(*args, **kwargs) def extract_step(self): """Extract installer to have more control, e.g. options, patching Perl scripts, etc.""" @@ -310,7 +310,7 @@ def create_wrapper(wrapper_name, wrapper_comp): symlink(pc_file, link, use_abspath_source=False) change_dir(cwd) - super(EB_CUDA, self).post_processing_step() + super().post_processing_step() def sanity_check_step(self): """Custom sanity check for CUDA.""" @@ -340,7 +340,7 @@ def sanity_check_step(self): pc_files = ['cublas.pc', 'cudart.pc', 'cuda.pc'] custom_paths['files'].extend(os.path.join('pkgconfig', x) for x in pc_files) - super(EB_CUDA, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Set the install directory as CUDA_HOME, CUDA_ROOT, CUDA_PATH.""" @@ -350,7 +350,7 @@ def make_module_extra(self): # (like compute-sanitizer) self.cfg['prepend_to_path'] = False - txt = super(EB_CUDA, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('CUDA_HOME', self.installdir) txt += self.module_generator.set_environment('CUDA_ROOT', self.installdir) txt += self.module_generator.set_environment('CUDA_PATH', self.installdir) diff --git a/easybuild/easyblocks/c/cudacompat.py b/easybuild/easyblocks/c/cudacompat.py index e9f7ca9f368..4b90afddd4f 100644 --- a/easybuild/easyblocks/c/cudacompat.py +++ b/easybuild/easyblocks/c/cudacompat.py @@ -63,7 +63,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize custom class variables for CUDACompat.""" - super(EB_CUDAcompat, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self._has_nvidia_smi = None # avoid building software with this compat libraries self.module_load_environment.remove('LIBRARY_PATH') @@ -112,7 +112,7 @@ def prepare_step(self, *args, **kwargs): if 'LD_LIBRARY_PATH' in (build_option('filter_env_vars') or []): raise EasyBuildError("This module relies on setting $LD_LIBRARY_PATH, " "so you need to remove this variable from --filter-env-vars") - super(EB_CUDAcompat, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) def fetch_step(self, *args, **kwargs): """Check for EULA acceptance prior to getting sources.""" @@ -122,7 +122,7 @@ def fetch_step(self, *args, **kwargs): name='NVIDIA-driver', more_info='https://www.nvidia.com/content/DriverDownload-March2009/licence.php?lang=us' ) - return super(EB_CUDAcompat, self).fetch_step(*args, **kwargs) + return super().fetch_step(*args, **kwargs) def extract_step(self): """Extract the files without running the installer.""" @@ -172,7 +172,7 @@ def test_step(self): else: self.log.info('The installed CUDA driver %s appears to be supported.', driver_version) - return super(EB_CUDAcompat, self).test_step() + return super().test_step() def install_step(self): """Install CUDA compat libraries by copying library files and creating the symlinks.""" @@ -228,7 +228,7 @@ def sanity_check_step(self): 'files': [os.path.join(self.installdir, 'lib', x) for x in libraries], 'dirs': ['lib', 'lib64'], } - super(EB_CUDAcompat, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) if self.has_nvidia_smi: fake_mod_data = None diff --git a/easybuild/easyblocks/c/cudnn.py b/easybuild/easyblocks/c/cudnn.py index 37af2df5537..96d761589cf 100644 --- a/easybuild/easyblocks/c/cudnn.py +++ b/easybuild/easyblocks/c/cudnn.py @@ -42,7 +42,7 @@ def __init__(self, *args, **kwargs): """ Init the cuDNN easyblock adding a new cudnnarch template var """ # Need to call super's init first, so we can use self.version - super(EB_cuDNN, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # Generate cudnnarch template value for this system cudnnarch = False @@ -77,4 +77,4 @@ def fetch_step(self, *args, **kwargs): name='cuDNN', more_info='https://docs.nvidia.com/deeplearning/cudnn/latest/reference/eula.html' ) - return super(EB_cuDNN, self).fetch_step(*args, **kwargs) + return super().fetch_step(*args, **kwargs) diff --git a/easybuild/easyblocks/c/cufflinks.py b/easybuild/easyblocks/c/cufflinks.py index b666da4e71d..64c871ca8c9 100644 --- a/easybuild/easyblocks/c/cufflinks.py +++ b/easybuild/easyblocks/c/cufflinks.py @@ -40,7 +40,7 @@ def configure_step(self): if not get_software_root(dep): raise EasyBuildError("Dependency module %s not loaded?", dep) - super(EB_Cufflinks, self).configure_step() + super().configure_step() def patch_step(self): """ @@ -60,4 +60,4 @@ def patch_step(self): line = re.sub(r'#include \', '#include ', line, count=0) sys.stdout.write(line) - super(EB_Cufflinks, self).patch_step() + super().patch_step() diff --git a/easybuild/easyblocks/d/db.py b/easybuild/easyblocks/d/db.py index 67628ce97ad..294851c8ae3 100644 --- a/easybuild/easyblocks/d/db.py +++ b/easybuild/easyblocks/d/db.py @@ -42,4 +42,4 @@ def configure_step(self): os.chdir('build_unix') except OSError as err: raise EasyBuildError("Failed to move to build dir: %s", err) - super(EB_DB, self).configure_step(cmd_prefix='../dist/') + super().configure_step(cmd_prefix='../dist/') diff --git a/easybuild/easyblocks/d/dm_reverb.py b/easybuild/easyblocks/d/dm_reverb.py index b94ba015f78..8b7bb823bfb 100644 --- a/easybuild/easyblocks/d/dm_reverb.py +++ b/easybuild/easyblocks/d/dm_reverb.py @@ -41,7 +41,7 @@ class EB_dm_minus_reverb(PythonPackage): def configure_step(self, *args, **kwargs): """Execute custom configure.py script""" - super(EB_dm_minus_reverb, self).configure_step(*args, **kwargs) + super().configure_step(*args, **kwargs) # set Python environment python_root = get_software_root('Python') @@ -129,4 +129,4 @@ def install_step(self, *args, **kwargs): 'python': self.python_cmd, } - return super(EB_dm_minus_reverb, self).install_step(*args, **kwargs) + return super().install_step(*args, **kwargs) diff --git a/easybuild/easyblocks/d/dualsphysics.py b/easybuild/easyblocks/d/dualsphysics.py index 0f50bece895..896496ea7ad 100644 --- a/easybuild/easyblocks/d/dualsphysics.py +++ b/easybuild/easyblocks/d/dualsphysics.py @@ -56,14 +56,14 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize calss variables custom to DualSPHysics.""" - super(EB_DualSPHysics, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.dsph_target = None self.shortver = '.'.join(self.version.split('.')[0:2]) def prepare_step(self, *args, **kwargs): """Determine name of binary that will be installed.""" - super(EB_DualSPHysics, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) if get_software_root('CUDA'): self.dsph_target = 'GPU' @@ -73,7 +73,7 @@ def prepare_step(self, *args, **kwargs): def configure_step(self): """Custom configure procedure for DualSPHysics.""" srcdir = os.path.join(self.cfg['start_dir'], 'src/source') - super(EB_DualSPHysics, self).configure_step(srcdir=srcdir) + super().configure_step(srcdir=srcdir) def install_step(self): """Custom install procedure for DualSPHysics.""" @@ -88,11 +88,11 @@ def install_step(self): (['bin/linux/*'], 'bin'), (['src/lib/linux_gcc/*'], 'lib'), ] - super(EB_DualSPHysics, self).install_step() + super().install_step() def post_processing_step(self): """Custom post-installation step: ensure rpath is patched into binaries/libraries if configured.""" - super(EB_DualSPHysics, self).post_processing_step() + super().post_processing_step() if build_option('rpath'): # only the compiled binary (e.g. DualSPHysics5.0CPU_linux64) is rpath'd, the precompiled libraries @@ -144,4 +144,4 @@ def sanity_check_step(self): custom_commands = ['%s_linux64 -h' % x for x in bins] - super(EB_DualSPHysics, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/e/easybuildmeta.py b/easybuild/easyblocks/e/easybuildmeta.py index cba49132dfd..618c6f7d9e7 100644 --- a/easybuild/easyblocks/e/easybuildmeta.py +++ b/easybuild/easyblocks/e/easybuildmeta.py @@ -48,7 +48,7 @@ class EB_EasyBuildMeta(PythonPackage): def __init__(self, *args, **kwargs): """Initialize custom class variables.""" - super(EB_EasyBuildMeta, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.real_initial_environ = copy.deepcopy(self.initial_environ) @@ -86,7 +86,7 @@ def check_readiness_step(self): else: self.log.debug("Not unsetting $%s since it's not set" % env_var_name) - super(EB_EasyBuildMeta, self).check_readiness_step() + super().check_readiness_step() def build_step(self): """No building for EasyBuild packages.""" @@ -131,7 +131,7 @@ def install_step(self): if pkg == 'easybuild-easyconfigs': self.fix_easyconfigs_setup_py_setuptools61() - super(EB_EasyBuildMeta, self).install_step() + super().install_step() except OSError as err: raise EasyBuildError("Failed to install EasyBuild packages: %s", err) @@ -139,7 +139,7 @@ def install_step(self): def post_processing_step(self): """Remove setuptools.pth file that hard includes a system-wide (site-packages) path, if it is there.""" - super(EB_EasyBuildMeta, self).post_processing_step() + super().post_processing_step() setuptools_pth = os.path.join(self.installdir, self.pylibdir, 'setuptools.pth') if os.path.exists(setuptools_pth): @@ -258,20 +258,20 @@ def sanity_check_step(self): val = self.initial_environ.pop(key) self.log.info("$%s found in environment, unset for running sanity check (was: %s)", key, val) - super(EB_EasyBuildMeta, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): """ Set $EB_INSTALLPYTHON to ensure that this EasyBuild installation uses the same Python executable it was installed with (which can still be overridden by the user with $EB_PYTHON). """ - txt = super(EB_EasyBuildMeta, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('EB_INSTALLPYTHON', self.python_cmd) return txt def make_module_step(self, fake=False): """Create module file, before copy of original environment that was tampered with is restored.""" - modpath = super(EB_EasyBuildMeta, self).make_module_step(fake=fake) + modpath = super().make_module_step(fake=fake) if not fake: # restore copy of original environment diff --git a/easybuild/easyblocks/e/eigen.py b/easybuild/easyblocks/e/eigen.py index d34b12f8113..f53d3b47267 100644 --- a/easybuild/easyblocks/e/eigen.py +++ b/easybuild/easyblocks/e/eigen.py @@ -97,4 +97,4 @@ def sanity_check_step(self): custom_commands.append("! grep -q -r '${PACKAGE_PREFIX_DIR}/${PACKAGE_PREFIX_DIR}' %s" % os.path.join(self.installdir, cmake_config_dir)) - super(EB_Eigen, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/e/elpa.py b/easybuild/easyblocks/e/elpa.py index 5acb8e6f740..4ae0f2a2924 100644 --- a/easybuild/easyblocks/e/elpa.py +++ b/easybuild/easyblocks/e/elpa.py @@ -77,7 +77,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for ELPA.""" - super(EB_ELPA, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) for flag in ELPA_CPU_FEATURE_FLAGS: # fail-safe: make sure we're not overwriting an existing attribute (could lead to weird bugs if we do) @@ -178,7 +178,7 @@ def run_all_steps(self, *args, **kwargs): self.log.debug("List of configure options to iterate over: %s", self.cfg['configopts']) - return super(EB_ELPA, self).run_all_steps(*args, **kwargs) + return super().run_all_steps(*args, **kwargs) def configure_step(self): """Configure step for ELPA""" @@ -223,11 +223,11 @@ def configure_step(self): 'current compiler family (%s). Please add the correct preprocessor ' 'for this compiler family to cpp_dict in the ELPA EasyBlock', comp_fam) - super(EB_ELPA, self).configure_step() + super().configure_step() def patch_step(self, *args, **kwargs): """Patch manual_cpp script to avoid using hardcoded /usr/bin/python.""" - super(EB_ELPA, self).patch_step(*args, **kwargs) + super().patch_step(*args, **kwargs) # avoid that manual_cpp script uses hardcoded /usr/bin/python manual_cpp = 'manual_cpp' @@ -268,4 +268,4 @@ def sanity_check_step(self): custom_paths['files'] = extra_files - super(EB_ELPA, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/e/elsi.py b/easybuild/easyblocks/e/elsi.py index 220b2187cb9..13d8a36e52f 100644 --- a/easybuild/easyblocks/e/elsi.py +++ b/easybuild/easyblocks/e/elsi.py @@ -40,7 +40,7 @@ class EB_ELSI(CMakeMake): def __init__(self, *args, **kwargs): """Initialize ELSI-specific variables.""" - super(EB_ELSI, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.enable_sips = False self.internal_ntpoly = True self.env_suff = '_MT' if self.toolchain.options.get('openmp', None) else '' @@ -142,7 +142,7 @@ def configure_step(self): self.cfg.update('configopts', "-DLIB_PATHS='%s'" % ';'.join(lib_paths)) self.cfg.update('configopts', "-DINC_PATHS='%s'" % ';'.join(inc_paths)) - super(EB_ELSI, self).configure_step() + super().configure_step() def sanity_check_step(self): """Custom sanity check for ELSI.""" @@ -173,4 +173,4 @@ def sanity_check_step(self): 'dirs': [], } - super(EB_ELSI, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/e/esmf.py b/easybuild/easyblocks/e/esmf.py index 1429ec88acc..e985f223b23 100644 --- a/easybuild/easyblocks/e/esmf.py +++ b/easybuild/easyblocks/e/esmf.py @@ -131,7 +131,7 @@ def configure_step(self): def install_step(self): # first, install the software - super(EB_ESMF, self).install_step() + super().install_step() python = get_software_version('Python') if python: @@ -149,7 +149,7 @@ def install_step(self): def make_module_extra(self): """Set $ESMFMKFILE environment variable""" - txt = super(EB_ESMF, self).make_module_extra() + txt = super().make_module_extra() # set environment variable ESMFMKFILE # see section 9.9 in https://earthsystemmodeling.org/docs/release/latest/ESMF_usrdoc/node10.html @@ -178,4 +178,4 @@ def sanity_check_step(self): if get_software_root('Python'): custom_commands += ["python -c 'import ESMF'"] - super(EB_ESMF, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) diff --git a/easybuild/easyblocks/e/extrae.py b/easybuild/easyblocks/e/extrae.py index 0ce705f8ab8..ba3f3b73d74 100644 --- a/easybuild/easyblocks/e/extrae.py +++ b/easybuild/easyblocks/e/extrae.py @@ -84,7 +84,7 @@ def configure_step(self): if get_cpu_architecture() == RISCV64: self.cfg.update('configopts', "--enable-posix-clock") - super(EB_Extrae, self).configure_step() + super().configure_step() def sanity_check_step(self): """Custom sanity check for Extrae.""" @@ -92,4 +92,4 @@ def sanity_check_step(self): 'files': ['bin/mpi2prv', 'include/extrae_user_events.h', ('lib/libmpitrace.a', 'lib64/libmpitrace.a')], 'dirs': [], } - super(EB_Extrae, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/f/faststructure.py b/easybuild/easyblocks/f/faststructure.py index bd7e8ed3a80..2635e86c412 100644 --- a/easybuild/easyblocks/f/faststructure.py +++ b/easybuild/easyblocks/f/faststructure.py @@ -50,7 +50,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for fastStructure.""" - super(EB_fastStructure, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cfg['files_to_copy'] = ['*'] self.pyfiles = ['distruct.py', 'chooseK.py', 'structure.py'] @@ -72,7 +72,7 @@ def post_processing_step(self): write_file(pf_path, "#!/usr/bin/env python\n" + pf_contents) adjust_permissions(pf_path, stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH) - super(EB_fastStructure, self).post_processing_step() + super().post_processing_step() def sanity_check_step(self): """Custom sanity check for fastStructure.""" @@ -80,4 +80,4 @@ def sanity_check_step(self): 'files': self.pyfiles, 'dirs': ['vars'], } - super(EB_fastStructure, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/f/fdtd_solutions.py b/easybuild/easyblocks/f/fdtd_solutions.py index 17b6ee24130..e9057991e03 100644 --- a/easybuild/easyblocks/f/fdtd_solutions.py +++ b/easybuild/easyblocks/f/fdtd_solutions.py @@ -43,7 +43,7 @@ def extract_step(self): After unpacking the main tar file, we need to unpack the rpm inside it. """ - super(EB_FDTD_underscore_Solutions, self).extract_step() + super().extract_step() rpms = glob.glob(os.path.join(self.src[0]['finalpath'], 'rpm_install_files', 'FDTD-%s*.rpm' % self.version)) if len(rpms) != 1: @@ -55,7 +55,7 @@ def make_installdir(self): """Override installdir creation""" self.log.warning("Not pre-creating installation directory %s" % self.installdir) self.cfg['dontcreateinstalldir'] = True - super(EB_FDTD_underscore_Solutions, self).make_installdir() + super().make_installdir() def build_step(self): """No build step for FDTD Solutions.""" @@ -72,4 +72,4 @@ def sanity_check_step(self): 'files': ['bin/fdtd-solutions'], 'dirs': ['lib'], } - super(EB_FDTD_underscore_Solutions, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/f/ferret.py b/easybuild/easyblocks/f/ferret.py index 184445a2732..2ea2f43a72f 100644 --- a/easybuild/easyblocks/f/ferret.py +++ b/easybuild/easyblocks/f/ferret.py @@ -222,4 +222,4 @@ def sanity_check_step(self): 'dirs': [], } - super(EB_Ferret, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/f/fftw.py b/easybuild/easyblocks/f/fftw.py index 072f9373fe5..47748605346 100644 --- a/easybuild/easyblocks/f/fftw.py +++ b/easybuild/easyblocks/f/fftw.py @@ -88,7 +88,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for FFTW.""" - super(EB_FFTW, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # do not enable MPI if the toolchain does not support it if not self.toolchain.mpi_family(): @@ -227,7 +227,7 @@ def run_all_steps(self, *args, **kwargs): self.log.debug("List of configure options to iterate over: %s", self.cfg['configopts']) - return super(EB_FFTW, self).run_all_steps(*args, **kwargs) + return super().run_all_steps(*args, **kwargs) def test_step(self): """Custom implementation of test step for FFTW.""" @@ -245,7 +245,7 @@ def test_step(self): if 'OMPI_MCA_rmaps_base_oversubscribe' not in self.cfg['pretestopts']: self.cfg.update('pretestopts', "export OMPI_MCA_rmaps_base_oversubscribe=true && ") - super(EB_FFTW, self).test_step() + super().test_step() def sanity_check_step(self, mpionly=False): """Custom sanity check for FFTW. mpionly=True only for FFTW.MPI""" @@ -302,4 +302,4 @@ def sanity_check_step(self, mpionly=False): custom_paths['files'].extend(nub(extra_files)) - super(EB_FFTW, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/f/fftwmpi.py b/easybuild/easyblocks/f/fftwmpi.py index 5a083629f2d..8bb2dfc63e1 100644 --- a/easybuild/easyblocks/f/fftwmpi.py +++ b/easybuild/easyblocks/f/fftwmpi.py @@ -53,7 +53,7 @@ def extra_options(): def prepare_step(self, *args, **kwargs): """Custom prepare step: make sure FFTW is available as dependency.""" - super(EB_FFTW_period_MPI, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) fftw_root = get_software_root('FFTW') if not fftw_root: @@ -68,8 +68,8 @@ def post_processing_step(self): glob.glob(os.path.join(self.installdir, 'lib*/pkgconfig')) + glob.glob(os.path.join(self.installdir, 'lib*/cmake')) + [os.path.join(self.installdir, p) for p in ['bin', 'share']]) - super(EB_FFTW_period_MPI, self).post_processing_step() + super().post_processing_step() def sanity_check_step(self): """Custom sanity check for FFTW.MPI: check if all libraries/headers for MPI interfaces are there.""" - super(EB_FFTW_period_MPI, self).sanity_check_step(mpionly=True) + super().sanity_check_step(mpionly=True) diff --git a/easybuild/easyblocks/f/flex.py b/easybuild/easyblocks/f/flex.py index 04c43a68954..c23539c79b9 100644 --- a/easybuild/easyblocks/f/flex.py +++ b/easybuild/easyblocks/f/flex.py @@ -39,7 +39,7 @@ class EB_flex(ConfigureMake): def install_step(self): """Building was performed in install dir, no explicit install step required.""" - super(EB_flex, self).install_step() + super().install_step() # create symlinks for lex and lex++, if they're not there try: @@ -61,4 +61,4 @@ def sanity_check_step(self): if LooseVersion(self.version) < LooseVersion('2.6.3'): custom_paths['files'].append(('lib/libfl_pic.a', 'lib64/libfl_pic.a')) - super(EB_flex, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/f/flexiblas.py b/easybuild/easyblocks/f/flexiblas.py index fa110dacc51..c8b19f267b7 100644 --- a/easybuild/easyblocks/f/flexiblas.py +++ b/easybuild/easyblocks/f/flexiblas.py @@ -68,7 +68,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Easyblock constructor.""" - super(EB_FlexiBLAS, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) dep_names = [dep['name'] for dep in self.cfg.dependencies()] if self.cfg['backends']: @@ -155,12 +155,12 @@ def configure_step(self): if build_option('rpath'): self.cfg['abs_path_compilers'] = True - super(EB_FlexiBLAS, self).configure_step(builddir=self.obj_builddir) + super().configure_step(builddir=self.obj_builddir) def install_step(self): """Install imkl configuration, found via FLEXIBLAS_LIBRARY_PATH set by imkl module.""" - super(EB_FlexiBLAS, self).install_step() + super().install_step() if self.cfg['backends'] and 'imkl' in self.cfg['backends'] and 'imkl' not in self.blas_libs: if self.toolchain.comp_family() == toolchain.GCC: parallel = "gnu" @@ -232,4 +232,4 @@ def sanity_check_step(self): for blas_lib in self.blas_libs: custom_commands.append("flexiblas list | grep %s" % blas_lib.upper()) - super(EB_FlexiBLAS, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/f/flook.py b/easybuild/easyblocks/f/flook.py index 93c9b047f92..888e5a68eb3 100644 --- a/easybuild/easyblocks/f/flook.py +++ b/easybuild/easyblocks/f/flook.py @@ -36,7 +36,7 @@ class EB_flook(ConfigureMake): def __init__(self, *args, **kwargs): # call out to original constructor first, so 'self' (i.e. the class instance) is initialised - super(EB_flook, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # Determine vendor vendor = None @@ -63,7 +63,7 @@ def configure_step(self): def install_step(self): self.cfg.update('install_cmd', 'PREFIX=%s' % self.installdir) - super(EB_flook, self).install_step() + super().install_step() def sanity_check_step(self): custom_paths = { @@ -72,4 +72,4 @@ def sanity_check_step(self): } # call out to parent to do the actual sanity checking, pass through custom paths - super(EB_flook, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/f/fluent.py b/easybuild/easyblocks/f/fluent.py index c95ae9086ee..9bbf28880de 100644 --- a/easybuild/easyblocks/f/fluent.py +++ b/easybuild/easyblocks/f/fluent.py @@ -48,7 +48,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Custom constructor for FLUENT easyblock, initialize/define class parameters.""" - super(EB_FLUENT, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) subdir_version = self.cfg['subdir_version'] if subdir_version is None: @@ -81,4 +81,4 @@ def sanity_check_step(self): 'files': [os.path.join(bindir, 'fluent%s' % x) for x in ['', '_arch', '_sysinfo']], 'dirs': [os.path.join(self.fluent_verdir, x) for x in ['aisol', 'CFD-Post']] } - super(EB_FLUENT, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/f/freesurfer.py b/easybuild/easyblocks/f/freesurfer.py index 74885b0cc0c..8b5cac6d323 100644 --- a/easybuild/easyblocks/f/freesurfer.py +++ b/easybuild/easyblocks/f/freesurfer.py @@ -49,12 +49,12 @@ def extra_options(): def install_step(self): """Custom installation procedure for FreeSurfer, which includes installed the license file '.license'.""" - super(EB_FreeSurfer, self).install_step() + super().install_step() write_file(os.path.join(self.installdir, '.license'), self.cfg['license_text']) def __init__(self, *args, **kwargs): """Custom constructor for FLUENT easyblock, initialize/define class parameters.""" - super(EB_FreeSurfer, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.module_load_environment.PATH.extend([ os.path.join('fsfast', 'bin'), @@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs): def make_module_extra(self): """Define FreeSurfer-specific environment variable in generated module file.""" - txt = super(EB_FreeSurfer, self).make_module_extra() + txt = super().make_module_extra() freesurfer_vars = { 'FMRI_ANALYSIS_DIR': os.path.join(self.installdir, 'fsfast'), @@ -99,4 +99,4 @@ def sanity_check_step(self): if LooseVersion(self.version) >= LooseVersion("7.2"): custom_commands.append('checkMCR.sh') - super(EB_FreeSurfer, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/f/freetype.py b/easybuild/easyblocks/f/freetype.py index 0a47c52b96c..93698c67090 100644 --- a/easybuild/easyblocks/f/freetype.py +++ b/easybuild/easyblocks/f/freetype.py @@ -38,7 +38,7 @@ class EB_freetype(ConfigureMake): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for freetype.""" - super(EB_freetype, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.maj_ver = self.version.split('.')[0] @@ -51,4 +51,4 @@ def sanity_check_step(self): 'lib/pkgconfig/freetype%s.pc' % self.maj_ver], 'dirs': ['include/freetype%s' % self.maj_ver], } - super(EB_freetype, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 435e3faa958..208dc8b3e02 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -47,7 +47,7 @@ class EB_FSL(EasyBlock): def __init__(self, *args, **kwargs): """Specify building in install dir, initialize custom variables.""" - super(EB_FSL, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.build_in_installdir = True @@ -139,7 +139,7 @@ def install_step(self): def make_module_extra(self): """Add setting of FSLDIR in module.""" - txt = super(EB_FSL, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment("FSLDIR", os.path.join(self.installdir, 'fsl')) @@ -153,4 +153,4 @@ def sanity_check_step(self): 'dirs': ['fsl/%s' % x for x in ['bin', 'data', 'etc', 'extras', 'include', 'lib']], } - super(EB_FSL, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index 0c4e5a7088c..dedefb8dd1d 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -66,7 +66,7 @@ def build_step(self): ]) self.cfg.update('buildopts', buildopts) - super(EB_g2clib, self).build_step() + super().build_step() def install_step(self): """Install by copying library and header files to install directory.""" @@ -107,4 +107,4 @@ def sanity_check_step(self): 'dirs': ["include"] } - super(EB_g2clib, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index b107c284254..1044567a9f3 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -57,7 +57,7 @@ def build_step(self): buildopts = 'CC="%s" FC="%s" INCDIR="-I%s/include"' % (os.getenv('CC'), os.getenv('F90'), jasper) self.cfg.update('buildopts', buildopts) - super(EB_g2lib, self).build_step() + super().build_step() def install_step(self): """Install by copying generated library to install directory.""" @@ -78,4 +78,4 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_g2lib, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/g/gamess_us.py b/easybuild/easyblocks/g/gamess_us.py index a1717d448de..0fec49b8cb8 100644 --- a/easybuild/easyblocks/g/gamess_us.py +++ b/easybuild/easyblocks/g/gamess_us.py @@ -83,7 +83,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Easyblock constructor, enable building in installation directory.""" - super(EB_GAMESS_minus_US, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.build_in_installdir = True # resolve path to scratch dir and make it @@ -115,7 +115,7 @@ def extract_step(self): """Extract sources.""" # strip off 'gamess' part to avoid having everything in a 'gamess' subdirectory self.cfg['unpack_options'] = "--strip-components=1" - super(EB_GAMESS_minus_US, self).extract_step() + super().extract_step() def configure_step(self): """Configure GAMESS-US via install.info file""" @@ -497,11 +497,11 @@ def sanity_check_step(self): 'files': [f'gamess.{self.version}.x', 'rungms'], 'dirs': [], } - super(EB_GAMESS_minus_US, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Define GAMESS-US specific variables in generated module file, i.e. $GAMESSUSROOT.""" - txt = super(EB_GAMESS_minus_US, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('GAMESSUSROOT', self.installdir) txt += self.module_generator.prepend_paths("PATH", ['']) return txt diff --git a/easybuild/easyblocks/g/gate.py b/easybuild/easyblocks/g/gate.py index e0258a9bd27..3ce302ac87b 100644 --- a/easybuild/easyblocks/g/gate.py +++ b/easybuild/easyblocks/g/gate.py @@ -59,7 +59,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialise class variables.""" - super(EB_GATE, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.g4system = None self.gate_subdirs = [ '.', @@ -71,7 +71,7 @@ def configure_step(self): """Custom configure procedure for GATE: CMake for versions 6.2 or more recent.""" if LooseVersion(self.version) >= '6.2': - super(EB_GATE, self).configure_step() + super().configure_step() def build_step(self): """Custom build procedure for GATE, including cluster tools.""" @@ -112,7 +112,7 @@ def build_step(self): except OSError as err: raise EasyBuildError("Failed to move to %s: %s", subdir, err) - super(EB_GATE, self).build_step() + super().build_step() try: os.chdir(self.cfg['start_dir']) @@ -132,7 +132,7 @@ def install_step(self): except OSError as err: raise EasyBuildError("Failed to move to %s: %s", subdir, err) - super(EB_GATE, self).install_step() + super().install_step() else: # manually copy files for versions prior to v6.2 @@ -174,7 +174,7 @@ def install_step(self): def make_module_extra(self): """Overwritten from Application to add extra txt""" subdir = os.getenv('G4SYSTEM', '') - txt = super(EB_GATE, self).make_module_extra() + txt = super().make_module_extra() path_dirs = [] fm_bin = os.path.join('cluster_tools', 'filemerger', 'bin', subdir) js_dir = os.path.join('cluster_tools', 'jobsplitter') @@ -216,4 +216,4 @@ def sanity_check_step(self): } custom_commands = ["gjs -h | grep 'This executable is compiled with %s as default'" % self.cfg['default_platform']] - super(EB_GATE, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 4e120fbaae1..b6241600342 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -160,7 +160,7 @@ def extra_options(): return ConfigureMake.extra_options(extra_vars) def __init__(self, *args, **kwargs): - super(EB_GCC, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.stagedbuild = False # Each build iteration is related to a specific build, first build host compiler, then potentially build NVPTX @@ -468,7 +468,7 @@ def prepare_step(self, *args, **kwargs): """ Prepare build environment, track currently active build stage """ - super(EB_GCC, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) # Set the current build stage to the specified stage based on the iteration index self.current_stage = self.build_stages[self.iter_idx] @@ -578,7 +578,7 @@ def configure_step(self): if self.current_stage == NVPTX_TOOLS: # Configure NVPTX tools and build change_dir(self.nvptx_tools_dir) - return super(EB_GCC, self).configure_step() + return super().configure_step() elif self.current_stage == AMD_LLVM: # determine LLVM target to use for host CPU @@ -636,7 +636,7 @@ def configure_step(self): self.cfg.update('configopts', "--disable-sjlj-exceptions") self.cfg['configure_cmd_prefix'] = '../' - return super(EB_GCC, self).configure_step() + return super().configure_step() else: raise EasyBuildError("Unknown offload configure step: %s, available: %s" @@ -735,7 +735,7 @@ def build_step(self): if self.iter_idx > 0: # call standard build_step for nvptx-tools and nvptx GCC - return super(EB_GCC, self).build_step() + return super().build_step() if self.stagedbuild: @@ -946,7 +946,7 @@ def build_step(self): self.cfg.update('buildopts', 'bootstrap') # call standard build_step - super(EB_GCC, self).build_step() + super().build_step() def install_step(self, *args, **kwargs): """Custom install step: avoid installing LLVM when building with AMD GCN offloading support""" @@ -972,13 +972,13 @@ def install_step(self, *args, **kwargs): raise EasyBuildError("Failed to isolate GCC build directory in %s", self.builddir) else: - super(EB_GCC, self).install_step(*args, **kwargs) + super().install_step(*args, **kwargs) def post_processing_step(self, *args, **kwargs): """ Post-processing after installation: add symlinks for cc, c++, f77, f95 """ - super(EB_GCC, self).post_processing_step(*args, **kwargs) + super().post_processing_step(*args, **kwargs) # Add symlinks for cc/c++/f77/f95. bindir = os.path.join(self.installdir, 'bin') @@ -1087,7 +1087,7 @@ def run_all_steps(self, *args, **kwargs): self.cfg['buildopts'] += ['', ''] self.build_stages.append(AMD_LLVM) self.build_stages.append(AMD_NEWLIB) - return super(EB_GCC, self).run_all_steps(*args, **kwargs) + return super().run_all_steps(*args, **kwargs) def sanity_check_step(self): """ @@ -1200,5 +1200,5 @@ def sanity_check_step(self): else: extra_modules = None - super(EB_GCC, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands, - extra_modules=extra_modules) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands, + extra_modules=extra_modules) diff --git a/easybuild/easyblocks/g/gctf.py b/easybuild/easyblocks/g/gctf.py index a82cacb01b4..dcfc7869777 100644 --- a/easybuild/easyblocks/g/gctf.py +++ b/easybuild/easyblocks/g/gctf.py @@ -48,7 +48,7 @@ class EB_Gctf(EasyBlock): def __init__(self, *args, **kwargs): """Constructor of Gctf easyblock.""" - super(EB_Gctf, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cuda_mod_name, self.cuda_name = None, None self.gctf_bin = None @@ -58,7 +58,7 @@ def prepare_step(self, *args, **kwargs): """ Determine name of Gctf binary to install based on CUDA version. """ - super(EB_Gctf, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) if not get_software_root('CUDA'): raise EasyBuildError("CUDA must be a direct (build)dependency of Gctf") @@ -130,4 +130,4 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_Gctf, self).sanity_check_step(custom_paths) + super().sanity_check_step(custom_paths) diff --git a/easybuild/easyblocks/g/geant4.py b/easybuild/easyblocks/g/geant4.py index b7c9216f888..bbaa179de5a 100644 --- a/easybuild/easyblocks/g/geant4.py +++ b/easybuild/easyblocks/g/geant4.py @@ -69,7 +69,7 @@ def make_module_extra(self): shortver = self.version.replace('.0', '.').replace('.p0', '.') datadst = os.path.join(self.installdir, 'share', '%s-%s' % (self.name, shortver), 'data') - txt = super(EB_Geant4, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('G4INSTALL', self.installdir) # no longer needed in > 9.5, but leave it there for now. txt += self.module_generator.set_environment('G4VERSION', g4version) @@ -118,4 +118,4 @@ def sanity_check_step(self): 'dirs': [include_dir], } - super(EB_Geant4, self).sanity_check_step(custom_paths) + super().sanity_check_step(custom_paths) diff --git a/easybuild/easyblocks/g/ghc.py b/easybuild/easyblocks/g/ghc.py index ffd3a3a3c8b..2caf78d5b26 100644 --- a/easybuild/easyblocks/g/ghc.py +++ b/easybuild/easyblocks/g/ghc.py @@ -46,4 +46,4 @@ def build_step(self, verbose=False): if LooseVersion(self.version) < LooseVersion("7.0"): pass else: - super(EB_GHC, self).build_step(verbose=verbose) + super().build_step(verbose=verbose) diff --git a/easybuild/easyblocks/g/gromacs.py b/easybuild/easyblocks/g/gromacs.py index cba739f3817..3472d3bb4da 100644 --- a/easybuild/easyblocks/g/gromacs.py +++ b/easybuild/easyblocks/g/gromacs.py @@ -80,7 +80,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize GROMACS-specific variables.""" - super(EB_GROMACS, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self._lib_subdirs = [] # list of directories with libraries @@ -171,7 +171,7 @@ def prepare_step(self, *args, **kwargs): # This must be called after enforcing the precise option otherwise the # change will be ignored. - super(EB_GROMACS, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) def configure_step(self): """Custom configuration procedure for GROMACS: set configure options for configure or cmake.""" @@ -439,7 +439,7 @@ def configure_step(self): env.setvar('LDFLAGS', "%s -L%s %s" % (ldflags, os.path.join(root, libdir), link_flag)) # complete configuration with configure_method of parent - out = super(EB_GROMACS, self).configure_step() + out = super().configure_step() # for recent GROMACS versions, make very sure that a decent BLAS, LAPACK and FFT is found and used if gromacs_version >= '4.6.5': @@ -471,7 +471,7 @@ def build_step(self): if self.is_double_precision_cuda_build: self.log.info("skipping build step") else: - super(EB_GROMACS, self).build_step() + super().build_step() def test_step(self): """Run the basic tests (but not necessarily the full regression tests) using make check""" @@ -513,7 +513,7 @@ def test_step(self): # run 'make check' or whatever the easyconfig specifies # in parallel since it involves more compilation self.cfg.update('runtest', f"-j {self.cfg.parallel}") - super(EB_GROMACS, self).test_step() + super().test_step() if build_option('rpath'): # clean up temporary copy of 'lib' in installation directory, @@ -537,7 +537,7 @@ def install_step(self): else: # run 'make install' in parallel since it involves more compilation self.cfg.update('installopts', f"-j {self.cfg.parallel}") - super(EB_GROMACS, self).install_step() + super().install_step() def extensions_step(self, fetch=False): """ Custom extensions step, only handle extensions after the last iteration round""" @@ -552,7 +552,7 @@ def extensions_step(self, fetch=False): # run "check" as a command orig_runtest = self.cfg['runtest'] self.cfg['runtest'] = None - super(EB_GROMACS, self).extensions_step(fetch) + super().extensions_step(fetch) self.cfg['runtest'] = orig_runtest @property @@ -691,7 +691,7 @@ def sanity_check_step(self): [os.path.join(libdir, lib) for libdir in self.lib_subdirs for lib in lib_files], 'dirs': dirs, } - super(EB_GROMACS, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def run_all_steps(self, *args, **kwargs): """ @@ -804,7 +804,7 @@ def run_all_steps(self, *args, **kwargs): self.log.debug("List of configure options to iterate over: %s", self.cfg['configopts']) self.log.info("Building these variants of GROMACS: %s", ', '.join(versions_built)) - return super(EB_GROMACS, self).run_all_steps(*args, **kwargs) + return super().run_all_steps(*args, **kwargs) self.cfg['install_cmd'] = self.orig_install_cmd self.cfg['build_cmd'] = self.orig_build_cmd diff --git a/easybuild/easyblocks/g/gurobi.py b/easybuild/easyblocks/g/gurobi.py index c36cf450e2e..47269ae79f7 100644 --- a/easybuild/easyblocks/g/gurobi.py +++ b/easybuild/easyblocks/g/gurobi.py @@ -53,7 +53,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Easyblock constructor, define custom class variables specific to Gurobi.""" - super(EB_Gurobi, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # make sure license file is available self.orig_license_file = self.cfg['license_file'] @@ -67,7 +67,7 @@ def __init__(self, *args, **kwargs): def install_step(self): """Install Gurobi and license file.""" - super(EB_Gurobi, self).install_step() + super().install_step() if self.cfg['copy_license_file']: if self.orig_license_file is None or not os.path.exists(self.orig_license_file): @@ -93,11 +93,11 @@ def sanity_check_step(self): if get_software_root('Python'): custom_commands.append("python -c 'import gurobipy'") - super(EB_Gurobi, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) def make_module_extra(self): """Custom extra module file entries for Gurobi.""" - txt = super(EB_Gurobi, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('GUROBI_HOME', self.installdir) txt += self.module_generator.set_environment('GRB_LICENSE_FILE', self.license_file) txt += self.module_generator.prepend_paths('MATLABPATH', 'matlab') diff --git a/easybuild/easyblocks/generic/binary.py b/easybuild/easyblocks/generic/binary.py index fc85ad20ad3..d73e0c5c4bb 100644 --- a/easybuild/easyblocks/generic/binary.py +++ b/easybuild/easyblocks/generic/binary.py @@ -70,7 +70,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Initialize Binary-specific variables.""" - super(Binary, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.actual_installdir = None if self.cfg.get('staged_install', False): @@ -83,7 +83,7 @@ def extract_step(self): """Copy all source files to the build directory""" if self.cfg.get('extract_sources', False): - super(Binary, self).extract_step() + super().extract_step() else: # required for correctly guessing start directory self.src[0]['finalpath'] = self.builddir @@ -145,7 +145,7 @@ def post_processing_step(self): raise EasyBuildError("Failed to move staged install from %s to %s: %s", staged_installdir, self.installdir, err) - super(Binary, self).post_processing_step() + super().post_processing_step() def sanity_check_rpath(self): """Skip the rpath sanity check, this is binary software""" @@ -155,7 +155,7 @@ def sanity_check_rpath(self): def make_module_extra(self): """Add the specified directories to the PATH.""" - txt = super(Binary, self).make_module_extra() + txt = super().make_module_extra() prepend_to_path = self.cfg.get('prepend_to_path', PREPEND_TO_PATH_DEFAULT) if prepend_to_path: txt += self.module_generator.prepend_paths("PATH", prepend_to_path) diff --git a/easybuild/easyblocks/generic/buildenv.py b/easybuild/easyblocks/generic/buildenv.py index 85a7d204b4c..6cb37bc255a 100644 --- a/easybuild/easyblocks/generic/buildenv.py +++ b/easybuild/easyblocks/generic/buildenv.py @@ -38,7 +38,7 @@ class BuildEnv(Bundle): def make_module_extra(self): """Add all the build environment variables.""" - txt = super(BuildEnv, self).make_module_extra() + txt = super().make_module_extra() # include environment variables defined for (non-system) toolchain if not self.toolchain.is_system_toolchain(): diff --git a/easybuild/easyblocks/generic/bundle.py b/easybuild/easyblocks/generic/bundle.py index 2a5b9751718..6698066f42f 100644 --- a/easybuild/easyblocks/generic/bundle.py +++ b/easybuild/easyblocks/generic/bundle.py @@ -68,7 +68,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Initialize easyblock.""" - super(Bundle, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.altroot = None self.altversion = None @@ -220,7 +220,7 @@ def check_checksums(self): :return: list of strings describing checksum issues (missing checksums, wrong checksum type, etc.) """ - checksum_issues = super(Bundle, self).check_checksums() + checksum_issues = super().check_checksums() for comp, _ in self.comp_instances: checksum_issues.extend(self.check_checksums_for(comp, sub="of component %s" % comp['name'])) @@ -399,7 +399,7 @@ def make_module_extra(self, *args, **kwargs): kwargs['altroot'] = self.altroot if 'altversion' not in kwargs: kwargs['altversion'] = self.altversion - return super(Bundle, self).make_module_extra(*args, **kwargs) + return super().make_module_extra(*args, **kwargs) def sanity_check_step(self, *args, **kwargs): """ @@ -407,7 +407,7 @@ def sanity_check_step(self, *args, **kwargs): If nothing is being installed, just being able to load the (fake) module is sufficient """ if self.cfg['exts_list'] or self.cfg['sanity_check_paths'] or self.cfg['sanity_check_commands']: - super(Bundle, self).sanity_check_step(*args, **kwargs) + super().sanity_check_step(*args, **kwargs) else: self.log.info("Testing loading of module '%s' by means of sanity check" % self.full_mod_name) fake_mod_data = self.load_fake_module(purge=True) diff --git a/easybuild/easyblocks/generic/cargo.py b/easybuild/easyblocks/generic/cargo.py index 2ad6ef44861..a0d48702864 100755 --- a/easybuild/easyblocks/generic/cargo.py +++ b/easybuild/easyblocks/generic/cargo.py @@ -210,7 +210,7 @@ def rustc_optarch(self): def __init__(self, *args, **kwargs): """Constructor for Cargo easyblock.""" - super(Cargo, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cargo_home = os.path.join(self.builddir, '.cargo') self.set_cargo_vars() @@ -263,7 +263,7 @@ def load_module(self, *args, **kwargs): Required here to ensure the variables are defined for stand-alone installations and extensions, because the environment is reset to the initial environment right before loading the module. """ - super(Cargo, self).load_module(*args, **kwargs) + super().load_module(*args, **kwargs) self.set_cargo_vars() def extract_step(self): diff --git a/easybuild/easyblocks/generic/cargopythonbundle.py b/easybuild/easyblocks/generic/cargopythonbundle.py index 893c03a8959..137589400b2 100644 --- a/easybuild/easyblocks/generic/cargopythonbundle.py +++ b/easybuild/easyblocks/generic/cargopythonbundle.py @@ -51,7 +51,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Constructor for CargoPythonBundle easyblock.""" self.check_for_sources = False # make Bundle allow sources (as crates are treated as sources) - super(CargoPythonBundle, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # Cargo inherits from ExtensionEasyBlock, thus EB treats the software itself as an extension # Setting modulename to False to ensure that sanity checks are performed on the extensions only diff --git a/easybuild/easyblocks/generic/cmakemake.py b/easybuild/easyblocks/generic/cmakemake.py index a83296b6ab5..ce472f43f78 100644 --- a/easybuild/easyblocks/generic/cmakemake.py +++ b/easybuild/easyblocks/generic/cmakemake.py @@ -163,7 +163,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Constructor for CMakeMake easyblock""" - super(CMakeMake, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self._lib_ext = None self._cmake_version = None self.separate_build_dir = None @@ -466,4 +466,4 @@ def test_step(self): self.log.debug("`runtest = True` found, using '%s' as test_cmd", test_cmd) self.cfg['test_cmd'] = test_cmd - super(CMakeMake, self).test_step() + super().test_step() diff --git a/easybuild/easyblocks/generic/conda.py b/easybuild/easyblocks/generic/conda.py index d4d0362f3f1..5048df9cfbe 100644 --- a/easybuild/easyblocks/generic/conda.py +++ b/easybuild/easyblocks/generic/conda.py @@ -68,7 +68,7 @@ def __init__(self, *args, **kwargs): def extract_step(self): """Copy sources via extract_step of parent, if any are specified.""" if self.src: - super(Conda, self).extract_step() + super().extract_step() def install_step(self): """Install software using 'conda env create' or 'conda create' & 'conda install' @@ -121,7 +121,7 @@ def install_step(self): def make_module_extra(self): """Add the install directory to the PATH.""" - txt = super(Conda, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('CONDA_ENV', self.installdir) txt += self.module_generator.set_environment('CONDA_PREFIX', self.installdir) txt += self.module_generator.set_environment('CONDA_DEFAULT_ENV', self.installdir) diff --git a/easybuild/easyblocks/generic/configuremake.py b/easybuild/easyblocks/generic/configuremake.py index 408595ac467..28d6f404d6d 100644 --- a/easybuild/easyblocks/generic/configuremake.py +++ b/easybuild/easyblocks/generic/configuremake.py @@ -206,7 +206,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Initialize easyblock.""" - super(ConfigureMake, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.config_guess = None @@ -233,7 +233,7 @@ def check_config_guess(self): def fetch_step(self, *args, **kwargs): """Custom fetch step for ConfigureMake so we use an updated config.guess.""" - super(ConfigureMake, self).fetch_step(*args, **kwargs) + super().fetch_step(*args, **kwargs) # Use an updated config.guess from a global location (if possible) self.config_guess = self.obtain_config_guess() diff --git a/easybuild/easyblocks/generic/craytoolchain.py b/easybuild/easyblocks/generic/craytoolchain.py index 1bd6fd99ecc..4a484c26e44 100644 --- a/easybuild/easyblocks/generic/craytoolchain.py +++ b/easybuild/easyblocks/generic/craytoolchain.py @@ -47,7 +47,7 @@ def prepare_step(self, *args, **kwargs): kwargs['load_tc_deps_modules'] = False - super(CrayToolchain, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) def make_module_dep(self): """ diff --git a/easybuild/easyblocks/generic/gopackage.py b/easybuild/easyblocks/generic/gopackage.py index ca86e247786..73d34a448b3 100644 --- a/easybuild/easyblocks/generic/gopackage.py +++ b/easybuild/easyblocks/generic/gopackage.py @@ -54,7 +54,7 @@ def extra_options(extra_vars=None): def prepare_step(self, *args, **kwargs): """Go-specific preparations.""" - super(GoPackage, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) if get_software_root('Go') is None: raise EasyBuildError("Failed to pick go command to use. Is it listed in dependencies?") @@ -150,7 +150,7 @@ def sanity_check_step(self): } custom_commands = ['%s --help' % self.name.lower()] - super(GoPackage, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def sanity_check_rpath(self, rpath_dirs=None): - super(GoPackage, self).sanity_check_rpath(rpath_dirs=rpath_dirs, check_readelf_rpath=False) + super().sanity_check_rpath(rpath_dirs=rpath_dirs, check_readelf_rpath=False) diff --git a/easybuild/easyblocks/generic/intelbase.py b/easybuild/easyblocks/generic/intelbase.py index 194e6a06a6f..8e60710559a 100644 --- a/easybuild/easyblocks/generic/intelbase.py +++ b/easybuild/easyblocks/generic/intelbase.py @@ -93,7 +93,7 @@ class IntelBase(EasyBlock): def __init__(self, *args, **kwargs): """Constructor, adds extra config options""" - super(IntelBase, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.license_file = 'UNKNOWN' self.license_env_var = 'UNKNOWN' @@ -250,7 +250,7 @@ def prepare_step(self, *args, **kwargs): """Custom prepare step for IntelBase. Set up the license""" requires_runtime_license = kwargs.pop('requires_runtime_license', True) - super(IntelBase, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) # Decide if we need a license or not (default is True because of defaults of individual Booleans) self.requires_runtime_license = self.cfg['requires_runtime_license'] and requires_runtime_license @@ -477,7 +477,7 @@ def sanity_check_rpath(self): def make_module_extra(self, *args, **kwargs): """Custom variable definitions in module file.""" - txt = super(IntelBase, self).make_module_extra(*args, **kwargs) + txt = super().make_module_extra(*args, **kwargs) if self.requires_runtime_license: txt += self.module_generator.prepend_paths(self.license_env_var, [self.license_file], @@ -493,6 +493,6 @@ def cleanup_step(self): """ self.clean_home_subdir() - super(IntelBase, self).cleanup_step() + super().cleanup_step() # no default sanity check, needs to be implemented by derived class diff --git a/easybuild/easyblocks/generic/jar.py b/easybuild/easyblocks/generic/jar.py index d502f9440c4..00e61838e9c 100644 --- a/easybuild/easyblocks/generic/jar.py +++ b/easybuild/easyblocks/generic/jar.py @@ -48,7 +48,7 @@ def install_step_xxx(self): def make_module_extra(self): """Extra module entries for JAR files: CLASSPATH.""" - txt = super(JAR, self).make_module_extra() + txt = super().make_module_extra() for srcfile in self.src: srcname = srcfile['name'] diff --git a/easybuild/easyblocks/generic/juliabundle.py b/easybuild/easyblocks/generic/juliabundle.py index cce74517282..45b2ae06c52 100644 --- a/easybuild/easyblocks/generic/juliabundle.py +++ b/easybuild/easyblocks/generic/juliabundle.py @@ -50,7 +50,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Initialize JuliaBundle easyblock.""" - super(JuliaBundle, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cfg['exts_defaultclass'] = 'JuliaPackage' self.cfg['exts_filter'] = EXTS_FILTER_JULIA_PACKAGES @@ -78,7 +78,7 @@ def __init__(self, *args, **kwargs): def prepare_step(self, *args, **kwargs): """Prepare for installing bundle of Julia packages.""" - super(JuliaBundle, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) def install_step(self): """Prepare installation environment and dd all dependencies to project environment.""" @@ -91,9 +91,9 @@ def sanity_check_step(self, *args, **kwargs): 'files': [], 'dirs': [os.path.join('packages', self.name)], } - super(JuliaBundle, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self, *args, **kwargs): """Custom module environment from JuliaPackage""" - mod = super(JuliaBundle, self).make_module_extra(*args, **kwargs) + mod = super().make_module_extra(*args, **kwargs) return mod diff --git a/easybuild/easyblocks/generic/juliapackage.py b/easybuild/easyblocks/generic/juliapackage.py index 800b5a85e8e..0260dec88fe 100644 --- a/easybuild/easyblocks/generic/juliapackage.py +++ b/easybuild/easyblocks/generic/juliapackage.py @@ -258,7 +258,7 @@ def install_pkg(self): def prepare_step(self, *args, **kwargs): """Prepare for Julia package installation.""" - super(JuliaPackage, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) if get_software_root('Julia') is None: raise EasyBuildError("Julia not included as dependency!") @@ -317,7 +317,7 @@ def make_module_extra(self, *args, **kwargs): allowing user to add custom Julia packages while having packages in this installation available. See issue easybuilders/easybuild-easyconfigs#17455 """ - mod = super(JuliaPackage, self).make_module_extra() + mod = super().make_module_extra() if self.module_generator.SYNTAX: mod += JULIA_PATHS_SOFT_INIT[self.module_generator.SYNTAX] mod += self.module_generator.append_paths('JULIA_DEPOT_PATH', ['']) diff --git a/easybuild/easyblocks/generic/makecp.py b/easybuild/easyblocks/generic/makecp.py index f4f1870c5ce..561c0cd3b90 100644 --- a/easybuild/easyblocks/generic/makecp.py +++ b/easybuild/easyblocks/generic/makecp.py @@ -60,7 +60,7 @@ def configure_step(self, cmd_prefix=''): Configure build if required """ if self.cfg.get('with_configure', False): - return super(MakeCp, self).configure_step(cmd_prefix=cmd_prefix) + return super().configure_step(cmd_prefix=cmd_prefix) def install_step(self): """Install by copying specified files and directories.""" diff --git a/easybuild/easyblocks/generic/octavepackage.py b/easybuild/easyblocks/generic/octavepackage.py index 83a24e5bcb9..a8d04120340 100644 --- a/easybuild/easyblocks/generic/octavepackage.py +++ b/easybuild/easyblocks/generic/octavepackage.py @@ -51,7 +51,7 @@ def install_extension(self): # and create a temporary tarball to use for installation if self.patches: # call out to ExtensionEasyBlock to unpack & apply patches - super(OctavePackage, self).install_extension(unpack_src=True) + super().install_extension(unpack_src=True) # create temporary tarball from unpacked & patched source src = os.path.join(tempfile.gettempdir(), '%s-%s-patched.tar.gz' % (self.name, self.version)) diff --git a/easybuild/easyblocks/generic/perlbundle.py b/easybuild/easyblocks/generic/perlbundle.py index e86bdb3de01..922f9f82c48 100644 --- a/easybuild/easyblocks/generic/perlbundle.py +++ b/easybuild/easyblocks/generic/perlbundle.py @@ -50,7 +50,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize PerlBundle easyblock.""" - super(PerlBundle, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cfg['exts_defaultclass'] = 'PerlModule' self.cfg['exts_filter'] = ("perl -e 'require %(ext_name)s'", '') @@ -65,7 +65,7 @@ def extensions_step(self, *args, **kwargs): if sysroot: setvar('OPENSSL_PREFIX', sysroot) - super(PerlBundle, self).extensions_step(*args, **kwargs) + super().extensions_step(*args, **kwargs) def test_step(self): """No global test step for bundle of Perl modules.""" @@ -82,13 +82,13 @@ def sanity_check_step(self, *args, **kwargs): 'dirs': [os.path.join('lib', 'perl%s' % majver)], } - super(Bundle, self).sanity_check_step(*args, **kwargs) + super().sanity_check_step(*args, **kwargs) def make_module_extra(self): """Extra module entries for Perl bundles.""" majver = get_major_perl_version() sitelibsuffix = get_site_suffix('sitelib') - txt = super(Bundle, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.prepend_paths("PERL%sLIB" % majver, [sitelibsuffix]) return txt diff --git a/easybuild/easyblocks/generic/perlmodule.py b/easybuild/easyblocks/generic/perlmodule.py index 16c784c640a..193abc0690b 100644 --- a/easybuild/easyblocks/generic/perlmodule.py +++ b/easybuild/easyblocks/generic/perlmodule.py @@ -53,7 +53,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize custom class variables.""" - super(PerlModule, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.testcmd = None # Environment variables PERL_MM_OPT and PERL_MB_OPT cause installations to fail. diff --git a/easybuild/easyblocks/generic/pythonbundle.py b/easybuild/easyblocks/generic/pythonbundle.py index cb43d3ee332..4094c43b1d4 100644 --- a/easybuild/easyblocks/generic/pythonbundle.py +++ b/easybuild/easyblocks/generic/pythonbundle.py @@ -56,7 +56,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Initialize PythonBundle easyblock.""" - super(PythonBundle, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cfg['exts_defaultclass'] = 'PythonPackage' self.cfg['exts_filter'] = EXTS_FILTER_PYTHON_PACKAGES @@ -96,14 +96,14 @@ def prepare_python(self): def prepare_step(self, *args, **kwargs): """Prepare for installing bundle of Python packages.""" - super(Bundle, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) self.prepare_python() def extensions_step(self, *args, **kwargs): """Install extensions (usually PythonPackages)""" # don't add user site directory to sys.path (equivalent to python -s) env.setvar('PYTHONNOUSERSITE', '1', verbose=False) - super(PythonBundle, self).extensions_step(*args, **kwargs) + super().extensions_step(*args, **kwargs) def test_step(self): """No global test step for bundle of Python packages.""" @@ -112,7 +112,7 @@ def test_step(self): def make_module_extra(self, *args, **kwargs): """Extra statements to include in module file: update $PYTHONPATH.""" - txt = super(Bundle, self).make_module_extra(*args, **kwargs) + txt = super().make_module_extra(*args, **kwargs) # update $EBPYTHONPREFIXES rather than $PYTHONPATH # if this Python package was installed for multiple Python versions, or if we prefer it @@ -152,7 +152,7 @@ def load_module(self, *args, **kwargs): """ Make sure that $PYTHONNOUSERSITE is defined after loading module file for this software.""" - super(PythonBundle, self).load_module(*args, **kwargs) + super().load_module(*args, **kwargs) # Don't add user site directory to sys.path (equivalent to python -s), # to avoid that any Python packages installed in $HOME/.local/lib affect the sanity check. @@ -172,4 +172,4 @@ def sanity_check_step(self, *args, **kwargs): 'dirs': [os.path.join('lib', 'python%(pyshortver)s', 'site-packages')], } - super(Bundle, self).sanity_check_step(*args, **kwargs) + super().sanity_check_step(*args, **kwargs) diff --git a/easybuild/easyblocks/generic/pythonpackage.py b/easybuild/easyblocks/generic/pythonpackage.py index 254482717d2..fcb31a82a28 100644 --- a/easybuild/easyblocks/generic/pythonpackage.py +++ b/easybuild/easyblocks/generic/pythonpackage.py @@ -459,7 +459,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Initialize custom class variables.""" - super(PythonPackage, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.sitecfg = None self.sitecfgfn = 'site.cfg' @@ -741,16 +741,16 @@ def py_post_install_shenanigans(self, install_dir): def extract_step(self): """Unpack source files, unless instructed otherwise.""" if self._should_unpack_source(): - super(PythonPackage, self).extract_step() + super().extract_step() def pre_install_extension(self): """Prepare for installing Python package.""" - super(PythonPackage, self).pre_install_extension() + super().pre_install_extension() self.prepare_python() def prepare_step(self, *args, **kwargs): """Prepare for building and installing this Python package.""" - super(PythonPackage, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) self.prepare_python() def configure_step(self): @@ -973,7 +973,7 @@ def install_extension(self, *args, **kwargs): # we unpack unless explicitly told otherwise kwargs.setdefault('unpack_src', self._should_unpack_source()) - super(PythonPackage, self).install_extension(*args, **kwargs) + super().install_extension(*args, **kwargs) # configure, build, test, install # See EasyBlock.get_steps @@ -1001,7 +1001,7 @@ def load_module(self, *args, **kwargs): """ Make sure that $PYTHONNOUSERSITE is defined after loading module file for this software.""" - super(PythonPackage, self).load_module(*args, **kwargs) + super().load_module(*args, **kwargs) # don't add user site directory to sys.path (equivalent to python -s), # to avoid that any Python packages installed in $HOME/.local/lib affect the sanity check; @@ -1155,7 +1155,7 @@ def sanity_check_step(self, *args, **kwargs): self.clean_up_fake_module(self.fake_mod_data) self.sanity_check_module_loaded = False - parent_success, parent_fail_msg = super(PythonPackage, self).sanity_check_step(*args, **kwargs) + parent_success, parent_fail_msg = super().sanity_check_step(*args, **kwargs) if parent_fail_msg: parent_fail_msg += ', ' @@ -1190,4 +1190,4 @@ def make_module_extra(self, *args, **kwargs): if os.path.exists(fullpath) and os.listdir(fullpath): txt += self.module_generator.prepend_paths(PYTHONPATH, path) - return super(PythonPackage, self).make_module_extra(txt, *args, **kwargs) + return super().make_module_extra(txt, *args, **kwargs) diff --git a/easybuild/easyblocks/generic/rpackage.py b/easybuild/easyblocks/generic/rpackage.py index ee77d0555ec..5ffb3f2260a 100644 --- a/easybuild/easyblocks/generic/rpackage.py +++ b/easybuild/easyblocks/generic/rpackage.py @@ -83,7 +83,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Initliaze RPackage-specific class variables.""" - super(RPackage, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.configurevars = [] self.configureargs = [] @@ -295,7 +295,7 @@ def prepare_r_ext_install(self): mkdir(lib_install_prefix, parents=True) if self.src: - super(RPackage, self).install_extension(unpack_src=True) + super().install_extension(unpack_src=True) self.ext_src = self.src self.update_config_guess(self.ext_dir) self.log.debug("Installing R package %s version %s." % (self.name, self.version)) @@ -332,7 +332,7 @@ def async_cmd_check(self): :return: True if command completed, False otherwise """ - done = super(RPackage, self).async_cmd_check() + done = super().async_cmd_check() if done: self.check_install_output(self.async_cmd_output) @@ -342,10 +342,10 @@ def sanity_check_step(self, *args, **kwargs): """ Custom sanity check for R packages """ - return super(RPackage, self).sanity_check_step(EXTS_FILTER_R_PACKAGES, *args, **kwargs) + return super().sanity_check_step(EXTS_FILTER_R_PACKAGES, *args, **kwargs) def make_module_extra(self): """Add install path to R_LIBS_SITE""" # prepend R_LIBS_SITE with install path extra = self.module_generator.prepend_paths("R_LIBS_SITE", [self.cfg['exts_subdir']]) - return super(RPackage, self).make_module_extra(extra) + return super().make_module_extra(extra) diff --git a/easybuild/easyblocks/generic/rpm.py b/easybuild/easyblocks/generic/rpm.py index baf6a8c2020..a81f82fbe9f 100644 --- a/easybuild/easyblocks/generic/rpm.py +++ b/easybuild/easyblocks/generic/rpm.py @@ -101,7 +101,7 @@ class Rpm(Binary): def __init__(self, *args, **kwargs): """Initialize class variables.""" - super(Rpm, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.rebuild_rpm = False @@ -126,7 +126,7 @@ def extract_step(self): """ Extract sources if requested, retain resulting list of RPMs as new list of sources. """ - super(Rpm, self).extract_step() + super().extract_step() if self.cfg.get('extract_sources', False): self.src = [] diff --git a/easybuild/easyblocks/generic/rubygem.py b/easybuild/easyblocks/generic/rubygem.py index fc83ea20b4f..637db4d7534 100644 --- a/easybuild/easyblocks/generic/rubygem.py +++ b/easybuild/easyblocks/generic/rubygem.py @@ -53,7 +53,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """RubyGem easyblock constructor.""" - super(RubyGem, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.ext_src = None def install_extension(self): @@ -61,7 +61,7 @@ def install_extension(self): if not self.src: raise EasyBuildError("No source found for Ruby Gem %s, required for installation.", self.name) - super(RubyGem, self).install_extension() + super().install_extension() self.ext_src = self.src self.log.debug("Installing Ruby gem %s version %s." % (self.name, self.version)) @@ -80,7 +80,7 @@ def extract_step(self): src['finalpath'] = self.builddir else: # unpack zipped gems, use specified path to gem file - super(RubyGem, self).extract_step() + super().extract_step() def configure_step(self): """No separate configuration for Ruby Gems.""" @@ -136,7 +136,7 @@ def install_step(self): def make_module_extra(self): """Extend $GEM_PATH in module file.""" - txt = super(RubyGem, self).make_module_extra() + txt = super().make_module_extra() # for stand-alone Ruby gem installs, $GEM_PATH needs to be updated if not self.is_extension or self.master.name != 'Ruby': txt += self.module_generator.prepend_paths('GEM_PATH', ['']) diff --git a/easybuild/easyblocks/generic/systemmpi.py b/easybuild/easyblocks/generic/systemmpi.py index 0a5348a7188..40a6e2b06e6 100644 --- a/easybuild/easyblocks/generic/systemmpi.py +++ b/easybuild/easyblocks/generic/systemmpi.py @@ -82,7 +82,7 @@ def extract_ompi_setting(self, pattern, txt): def __init__(self, *args, **kwargs): """Extra initialization: keep track of values that may change due to modifications to the version.""" - super(SystemMPI, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # Keep track of original values of vars that are subject to change, for restoring later. # The version is determined/matched from the installation and the installdir is determined from the system @@ -288,7 +288,7 @@ def make_module_extend_modpath(self): self.cfg['version'] = self.orig_version # Retrieve module path extensions - res = super(SystemMPI, self).make_module_extend_modpath() + res = super().make_module_extend_modpath() # Reset to actual MPI version (e.g., "2.0.2") self.cfg['version'] = self.mpi_version @@ -308,7 +308,7 @@ def make_module_extra(self, *args, **kwargs): extras += self.module_generator.set_environment(key, val) self.log.debug("make_module_extra added this: %s" % extras) else: - extras = super(SystemMPI, self).make_module_extra(*args, **kwargs) + extras = super().make_module_extra(*args, **kwargs) return extras def cleanup_step(self): diff --git a/easybuild/easyblocks/generic/toolchain.py b/easybuild/easyblocks/generic/toolchain.py index ba4dfbefa1e..b017013d5ce 100644 --- a/easybuild/easyblocks/generic/toolchain.py +++ b/easybuild/easyblocks/generic/toolchain.py @@ -55,7 +55,7 @@ def make_module_extra(self): Define $EBROOT* and $EBVERSION* environment for toolchain components marked as external module, if corresponding metadata is available. """ - txt = super(Toolchain, self).make_module_extra() + txt = super().make_module_extra() # include $EBROOT* and $EBVERSION* definitions for toolchain components marked as external modules (if any) # in the generated module file for this toolchain; diff --git a/easybuild/easyblocks/generic/versionindependentpythonpackage.py b/easybuild/easyblocks/generic/versionindependentpythonpackage.py index d03c5d8b62b..c7f5a7c4073 100644 --- a/easybuild/easyblocks/generic/versionindependentpythonpackage.py +++ b/easybuild/easyblocks/generic/versionindependentpythonpackage.py @@ -49,7 +49,7 @@ def build_step(self): def set_pylibdirs(self): """Set pylibdir.""" - super(VersionIndependentPythonPackage, self).set_pylibdirs() + super().set_pylibdirs() self.pylibdir = 'lib' self.all_pylibdirs = ['lib'] diff --git a/easybuild/easyblocks/generic/vscpythonpackage.py b/easybuild/easyblocks/generic/vscpythonpackage.py index fe9fbd6fe3c..6222dba4481 100644 --- a/easybuild/easyblocks/generic/vscpythonpackage.py +++ b/easybuild/easyblocks/generic/vscpythonpackage.py @@ -39,12 +39,12 @@ class VSCPythonPackage(VersionIndependentPythonPackage): def __init__(self, *args, **kwargs): """Custom constructor for VSC Python packages.""" - super(VSCPythonPackage, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def sanity_check_step(self, *args, **kwargs): """Custom sanity check for VSC-tools packages.""" pythonpath = os.environ.get('PYTHONPATH', '') os.environ['PYTHONPATH'] = '' kwargs.update({'exts_filter': ('%s -s -S -c "import %%(ext_name)s"' % self.python_cmd, "")}) - super(VSCPythonPackage, self).sanity_check_step(*args, **kwargs) + super().sanity_check_step(*args, **kwargs) os.environ['PYTHONPATH'] = pythonpath diff --git a/easybuild/easyblocks/h/hadoop.py b/easybuild/easyblocks/h/hadoop.py index b1162f828dd..50d4ac6d848 100644 --- a/easybuild/easyblocks/h/hadoop.py +++ b/easybuild/easyblocks/h/hadoop.py @@ -72,9 +72,9 @@ def install_step(self): """Custom install procedure for Hadoop: install-by-copy.""" if self.cfg['build_native_libs']: src = os.path.join(self.cfg['start_dir'], 'hadoop-dist', 'target', 'hadoop-%s' % self.version) - super(EB_Hadoop, self).install_step(src=src) + super().install_step(src=src) else: - super(EB_Hadoop, self).install_step() + super().install_step() def post_processing_step(self): """After the install, copy the extra native libraries into place.""" @@ -106,7 +106,7 @@ def sanity_check_step(self): 'files': ['bin/hadoop'] + native_files, 'dirs': ['etc', 'libexec'], } - super(EB_Hadoop, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) fake_mod_data = self.load_fake_module(purge=True) # exit code is ignored, since this cmd exits with 1 if not all native libraries were found @@ -125,7 +125,7 @@ def sanity_check_step(self): def make_module_extra(self): """Custom extra module file entries for Hadoop.""" - txt = super(EB_Hadoop, self).make_module_extra() + txt = super().make_module_extra() mapreduce_subdir = os.path.join('share', 'hadoop', 'mapreduce') txt += self.module_generator.prepend_paths('HADOOP_HOME', mapreduce_subdir) return txt diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 313b3b4e5a7..865449dd9d2 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -57,7 +57,7 @@ class EB_HDF5(ConfigureMake): def __init__(self, *args, **kwargs): """Initialize HDF5-specific variables.""" - super(EB_HDF5, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # configure options for dependencies self.known_deps = [ {'name': 'Szip', 'with': 'szlib', 'lib': '-lsz'}, @@ -103,12 +103,12 @@ def configure_step(self): if self.toolchain.options.get('usempi', None): env.setvar('RUNPARALLEL', r'mpirun -np $${NPROCS:=3}') - super(EB_HDF5, self).configure_step() + super().configure_step() # default make and make install are ok but add a pkconfig file def install_step(self): """Custom install step for HDF5""" - super(EB_HDF5, self).install_step() + super().install_step() hdf5_lib_deps = '' for dep in self.known_deps: root = get_software_root(dep['name']) @@ -141,10 +141,10 @@ def sanity_check_step(self): 'files': [os.path.join("bin", x) for x in binaries] + [os.path.join("lib", lib) for lib in libs], 'dirs': ['include'], } - super(EB_HDF5, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Also define $HDF5_DIR to installation directory.""" - txt = super(EB_HDF5, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('HDF5_DIR', self.installdir) return txt diff --git a/easybuild/easyblocks/h/hpcc.py b/easybuild/easyblocks/h/hpcc.py index 9f2f75f08cb..7e27a28966f 100644 --- a/easybuild/easyblocks/h/hpcc.py +++ b/easybuild/easyblocks/h/hpcc.py @@ -46,14 +46,14 @@ def configure_step(self): Create Make.UNKNOWN file to build from """ # the build script file should be created in the hpl subdir - super(EB_HPCC, self).configure_step(subdir='hpl') + super().configure_step(subdir='hpl') def build_step(self): """ Build with make and correct make options """ # TOPdir should always be ../../.. regardless of what it was in the HPL build script file - super(EB_HPCC, self).build_step(topdir='../../..') + super().build_step(topdir='../../..') def install_step(self): """ @@ -78,4 +78,4 @@ def sanity_check_step(self): custom_commands = ['hpcc'] - super(EB_HPL, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/h/hpcg.py b/easybuild/easyblocks/h/hpcg.py index 9d4ef99245a..0fdade871ae 100644 --- a/easybuild/easyblocks/h/hpcg.py +++ b/easybuild/easyblocks/h/hpcg.py @@ -110,4 +110,4 @@ def sanity_check_step(self): 'files': ['bin/xhpcg', 'bin/hpcg.dat'], 'dirs': [], } - super(EB_HPCG, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 472656a322b..1871fbe6e5e 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -106,7 +106,7 @@ def build_step(self, topdir=None): # set options and build self.cfg.update('buildopts', extra_makeopts) - super(EB_HPL, self).build_step() + super().build_step() def install_step(self): """ @@ -129,4 +129,4 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_HPL, self).sanity_check_step(custom_paths) + super().sanity_check_step(custom_paths) diff --git a/easybuild/easyblocks/h/hypre.py b/easybuild/easyblocks/h/hypre.py index 9e142d2de38..fea286cca10 100644 --- a/easybuild/easyblocks/h/hypre.py +++ b/easybuild/easyblocks/h/hypre.py @@ -45,7 +45,7 @@ class EB_Hypre(ConfigureMake): def __init__(self, *args, **kwargs): """Easyblock constructor.""" - super(EB_Hypre, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.config_shared = False self.config_static = False @@ -83,7 +83,7 @@ def configure_step(self): cuda_cc_string = ' '.join([x.replace('.', '') for x in cuda_cc]) self.cfg.update('configopts', '--with-gpu-arch="%s"' % cuda_cc_string) - super(EB_Hypre, self).configure_step() + super().configure_step() def sanity_check_step(self): """Custom sanity check for Hypre.""" @@ -101,4 +101,4 @@ def sanity_check_step(self): 'dirs': ['include'] } - super(EB_Hypre, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 6482931c54b..30ba98c3724 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -65,7 +65,7 @@ class EB_icc(IntelBase): def __init__(self, *args, **kwargs): """Constructor, initialize class variables.""" - super(EB_icc, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.comp_libs_subdir = "" @@ -183,7 +183,7 @@ def sanity_check_step(self): custom_commands = ["which icc"] - super(EB_icc, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_step(self, *args, **kwargs): """ @@ -198,7 +198,7 @@ def make_module_step(self, *args, **kwargs): def make_module_extra(self, *args, **kwargs): """Additional custom variables for icc: $INTEL_PYTHONHOME.""" - txt = super(EB_icc, self).make_module_extra(*args, **kwargs) + txt = super().make_module_extra(*args, **kwargs) intel_pythonhome = os.path.join(self.installdir, self.debuggerpath, 'python', 'intel64') if os.path.isdir(intel_pythonhome): diff --git a/easybuild/easyblocks/i/iccifort.py b/easybuild/easyblocks/i/iccifort.py index b9064ca459b..dc503fe6285 100644 --- a/easybuild/easyblocks/i/iccifort.py +++ b/easybuild/easyblocks/i/iccifort.py @@ -69,7 +69,7 @@ def sanity_check_step(self): EB_ifort.sanity_check_step(self) def make_module_extra(self): - txt = super(EB_iccifort, self).make_module_extra() + txt = super().make_module_extra() # also define $EBROOT* and $EBVERSION* for icc/ifort txt += self.module_generator.set_environment('EBROOTICC', self.installdir) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 47cbcc96405..2459d06ff20 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -72,7 +72,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Constructor for imkl easyblock.""" - super(EB_imkl, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if LooseVersion(self.version) < LooseVersion('2020'): raise EasyBuildError( f"Version {self.version} of {self.name} is unsupported. Mininum supported version is 2020.0." @@ -108,7 +108,7 @@ def prepare_step(self, *args, **kwargs): """Prepare build environment.""" kwargs['requires_runtime_license'] = False - super(EB_imkl, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) # build the mkl interfaces, if desired if self.cfg['interfaces']: @@ -150,7 +150,7 @@ def install_step(self): silent_cfg_extras = { 'COMPONENTS': 'ALL', } - super(EB_imkl, self).install_step(silent_cfg_extras=silent_cfg_extras) + super().install_step(silent_cfg_extras=silent_cfg_extras) def build_mkl_fftw_interfaces(self, libdir): """Build the Intel MKL FFTW interfaces.""" @@ -328,7 +328,7 @@ def post_processing_step(self): """ Install group libraries and interfaces (if desired). """ - super(EB_imkl, self).post_processing_step() + super().post_processing_step() # extract examples examples_subdir = os.path.join(self.installdir, self.mkl_basedir, self.examples_subdir) @@ -432,7 +432,7 @@ def sanity_check_step(self): 'dirs': mkldirs, } - super(EB_imkl, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_step(self, *args, **kwargs): """ @@ -486,7 +486,7 @@ def make_module_extra(self): 'MKL_EXAMPLES': os.path.join(self.installdir, self.mkl_basedir, self.examples_subdir), }) - txt = super(EB_imkl, self).make_module_extra() + txt = super().make_module_extra() mklroot = os.path.join(self.installdir, self.mkl_basedir) txt += self.module_generator.set_environment('MKLROOT', mklroot) diff --git a/easybuild/easyblocks/i/imkl_fftw.py b/easybuild/easyblocks/i/imkl_fftw.py index fdc8b5fe5b1..8d5e45eaf4c 100644 --- a/easybuild/easyblocks/i/imkl_fftw.py +++ b/easybuild/easyblocks/i/imkl_fftw.py @@ -42,7 +42,7 @@ class EB_imkl_minus_FFTW(EB_imkl): def prepare_step(self, *args, **kwargs): """Custom prepare step: make sure imkl is available as dependency.""" - super(EB_imkl_minus_FFTW, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) imkl_root = get_software_root('imkl') if not imkl_root: @@ -59,12 +59,12 @@ def make_module_step(self, *args, **kwargs): Custom paths of imkl are unnecessary as imkl-FFTW only ships libraries under the 'lib' subdir Use generic make_module_step skipping imkl """ - return super(EB_imkl, self).make_module_step(*args, **kwargs) + return super().make_module_step(*args, **kwargs) def make_module_extra(self): """Custom extra variables to set in module file""" # bypass extra module variables for imkl - return super(EB_imkl, self).make_module_extra() + return super().make_module_extra() def post_processing_step(self): """Custom post install step for imkl-FFTW""" @@ -77,4 +77,4 @@ def sanity_check_step(self): 'files': [os.path.join(self.installdir, 'lib', x) for x in self.get_mkl_fftw_interface_libs()], 'dirs': [], } - super(EB_imkl, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index b6a4726c2c2..bafc37e324b 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -74,7 +74,7 @@ def extra_options(): def prepare_step(self, *args, **kwargs): kwargs['requires_runtime_license'] = False - super(EB_impi, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) def install_step(self): """ @@ -90,13 +90,13 @@ def install_step(self): ) if impiver >= LooseVersion('2021'): - super(EB_impi, self).install_step() + super().install_step() else: # impi starting from version 4.0.1.x uses standard installation procedure. silent_cfg_names_map = {} - super(EB_impi, self).install_step(silent_cfg_names_map=silent_cfg_names_map) + super().install_step(silent_cfg_names_map=silent_cfg_names_map) # since v5.0.1 installers create impi/ subdir, so stuff needs to be moved afterwards - super(EB_impi, self).move_after_install() + super().move_after_install() # recompile libfabric (if requested) # some Intel MPI versions (like 2019 update 6) no longer ship libfabric sources @@ -169,7 +169,7 @@ def rebuild_f08_bindings(self): def post_processing_step(self): """Custom post install step for IMPI, fix broken env scripts after moving installed files.""" - super(EB_impi, self).post_processing_step() + super().post_processing_step() impiver = LooseVersion(self.version) @@ -273,7 +273,7 @@ def sanity_check_step(self): mpi_cmd_tmpl % params, # run test program ]) - super(EB_impi, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_step(self, *args, **kwargs): """ @@ -351,7 +351,7 @@ def make_module_extra(self, *args, **kwargs): else: mpiroot = self.installdir - txt = super(EB_impi, self).make_module_extra(*args, **kwargs) + txt = super().make_module_extra(*args, **kwargs) txt += self.module_generator.set_environment('I_MPI_ROOT', mpiroot) if self.cfg['set_mpi_wrappers_compiler'] or self.cfg['set_mpi_wrappers_all']: for var in ['CC', 'CXX', 'F77', 'F90', 'FC']: diff --git a/easybuild/easyblocks/i/inspector.py b/easybuild/easyblocks/i/inspector.py index 65403ce0aef..cf4239ea065 100644 --- a/easybuild/easyblocks/i/inspector.py +++ b/easybuild/easyblocks/i/inspector.py @@ -43,7 +43,7 @@ class EB_Inspector(IntelBase): def __init__(self, *args, **kwargs): """Easyblock constructor; define class variables.""" - super(EB_Inspector, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) loosever = LooseVersion(self.version) if loosever < LooseVersion('2020'): @@ -63,10 +63,10 @@ def __init__(self, *args, **kwargs): def make_installdir(self): """Do not create installation directory, install script handles that already.""" - super(EB_Inspector, self).make_installdir(dontcreate=True) + super().make_installdir(dontcreate=True) def sanity_check_step(self): """Custom sanity check paths for Intel Inspector.""" binaries = ['inspxe-cl', 'inspxe-feedback', 'inspxe-gui', 'inspxe-runmc', 'inspxe-runtc'] custom_paths = self.get_custom_paths_tools(binaries) - super(EB_Inspector, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/i/intel_compilers.py b/easybuild/easyblocks/i/intel_compilers.py index eddfadd7927..b3064bad04b 100644 --- a/easybuild/easyblocks/i/intel_compilers.py +++ b/easybuild/easyblocks/i/intel_compilers.py @@ -46,7 +46,7 @@ def __init__(self, *args, **kwargs): """ Easyblock constructor: check version """ - super(EB_intel_minus_compilers, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # this easyblock is only valid for recent versions of the Intel compilers (2021.x, oneAPI) if LooseVersion(self.version) < LooseVersion('2021'): @@ -72,7 +72,7 @@ def prepare_step(self, *args, **kwargs): # avoid that IntelBase trips over not having license info specified kwargs['requires_runtime_license'] = False - super(EB_intel_minus_compilers, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) def configure_step(self): """Configure installation.""" @@ -92,7 +92,7 @@ def install_step(self): for idx, src in enumerate(srcs): print_msg("installing part %d/%s (%s)..." % (idx + 1, cnt, src['name'])) self.src = [src] - super(EB_intel_minus_compilers, self).install_step() + super().install_step() def sanity_check_step(self): """ @@ -132,8 +132,7 @@ def sanity_check_step(self): else: custom_commands.extend("%s --version | grep %s" % (c, self.version) for c in all_compiler_cmds) - super(EB_intel_minus_compilers, self).sanity_check_step(custom_paths=custom_paths, - custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_step(self, *args, **kwargs): """ @@ -170,7 +169,7 @@ def make_module_step(self, *args, **kwargs): def make_module_extra(self): """Additional custom variables for intel-compiler""" - txt = super(EB_intel_minus_compilers, self).make_module_extra() + txt = super().make_module_extra() # On Debian/Ubuntu, /usr/include/x86_64-linux-gnu, or whatever dir gcc uses, needs to be included # in $CPATH for Intel C compiler diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index aecf7894c46..cd76c0b35fe 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -78,7 +78,7 @@ def prepare_step(self, *args, **kwargs): if LooseVersion(self.version) >= LooseVersion('2021'): kwargs['requires_runtime_license'] = False - super(EB_itac, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) def install_step_classic(self): """ @@ -87,9 +87,9 @@ def install_step_classic(self): - create silent cfg file - execute command """ - super(EB_itac, self).install_step_classic(silent_cfg_names_map=None) + super().install_step_classic(silent_cfg_names_map=None) # since itac v9.0.1 installer create itac/ subdir, so stuff needs to be moved afterwards - super(EB_itac, self).move_after_install() + super().move_after_install() def install_step_oneapi(self, *args, **kwargs): """ @@ -117,7 +117,7 @@ def install_step_oneapi(self, *args, **kwargs): run_shell_cmd(cmd) # itac installer create itac/ subdir, so stuff needs to be moved afterwards - super(EB_itac, self).move_after_install() + super().move_after_install() def sanity_check_step(self): """Custom sanity check paths for ITAC.""" @@ -127,11 +127,11 @@ def sanity_check_step(self): 'dirs': ["bin", "lib", "slib"], } - super(EB_itac, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Overwritten from IntelBase to add extra txt""" - txt = super(EB_itac, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('VT_ROOT', self.installdir) txt += self.module_generator.set_environment('VT_MPI', self.cfg['preferredmpi']) txt += self.module_generator.set_environment('VT_ADD_LIBS', "-ldwarf -lelf -lvtunwind -lnsl -lm -ldl -lpthread") diff --git a/easybuild/easyblocks/j/java.py b/easybuild/easyblocks/j/java.py index 039e251388e..548258eace1 100644 --- a/easybuild/easyblocks/j/java.py +++ b/easybuild/easyblocks/j/java.py @@ -61,7 +61,7 @@ def __init__(self, *args, **kwargs): else: raise EasyBuildError("Architecture %s is not supported for Java on EasyBuild", myarch) - super(EB_Java, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cfg.template_values['jdkarch'] = jdkarch self.cfg.generate_template_values() @@ -92,7 +92,7 @@ def post_processing_step(self): Custom post-installation step: - ensure correct glibc is used when installing into custom sysroot and using RPATH """ - super(EB_Java, self).post_processing_step() + super().post_processing_step() # patch binaries and libraries when using alternate sysroot in combination with RPATH sysroot = build_option('sysroot') @@ -205,7 +205,7 @@ def sanity_check_step(self): "javac -help", ] - super(EB_Java, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): """ diff --git a/easybuild/easyblocks/j/jaxlib.py b/easybuild/easyblocks/j/jaxlib.py index e876258b089..6192f236300 100644 --- a/easybuild/easyblocks/j/jaxlib.py +++ b/easybuild/easyblocks/j/jaxlib.py @@ -65,7 +65,7 @@ def extra_options(): def configure_step(self): """Custom configure step for jaxlib.""" - super(EB_jaxlib, self).configure_step() + super().configure_step() binutils_root = get_software_root('binutils') if not binutils_root: diff --git a/easybuild/easyblocks/l/lammps.py b/easybuild/easyblocks/l/lammps.py index 53f00452b5a..1ca118d50e9 100644 --- a/easybuild/easyblocks/l/lammps.py +++ b/easybuild/easyblocks/l/lammps.py @@ -188,7 +188,7 @@ class EB_LAMMPS(CMakeMake): def __init__(self, *args, **kwargs): """LAMMPS easyblock constructor: determine whether we should build with CUDA support enabled.""" - super(EB_LAMMPS, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) cuda_dep = 'cuda' in [dep['name'].lower() for dep in self.cfg.dependencies()] cuda_toolchain = hasattr(self.toolchain, 'COMPILER_CUDA_FAMILY') @@ -247,7 +247,7 @@ def update_kokkos_cpu_mapping(self): def prepare_step(self, *args, **kwargs): """Custom prepare step for LAMMPS.""" - super(EB_LAMMPS, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) # Unset LIBS when using both KOKKOS and CUDA - it will mix lib paths otherwise if self.cfg['kokkos'] and self.cuda: @@ -459,11 +459,11 @@ def configure_step(self, **kwargs): else: raise EasyBuildError("Expected to find a Python dependency as sanity check commands rely on it!") - return super(EB_LAMMPS, self).configure_step() + return super().configure_step() def install_step(self): """Install LAMMPS and examples/potentials.""" - super(EB_LAMMPS, self).install_step() + super().install_step() # Copy over the examples so we can repeat the sanity check # (some symlinks may be broken) examples_dir = os.path.join(self.start_dir, 'examples') @@ -555,7 +555,7 @@ def sanity_check_step(self, *args, **kwargs): pythonpath = os.path.join('lib', 'python%s' % pyshortver, 'site-packages') custom_paths['dirs'].append(pythonpath) - return super(EB_LAMMPS, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + return super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) def get_cuda_gpu_arch(cuda_cc): diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 5e052519139..aa21864fb72 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -159,7 +159,7 @@ def build_step(self): else: # default make suffices (for now) - super(EB_LAPACK, self).build_step() + super().build_step() def install_step(self): """ @@ -196,7 +196,7 @@ def install_step(self): def load_module(self, *args, **kwargs): """Don't try to load (non-existing) LAPACK module when performing a test build.""" if not self.cfg['test_only']: - super(EB_LAPACK, self).load_module(*args, **kwargs) + super().load_module(*args, **kwargs) def test_step(self): """ @@ -217,7 +217,7 @@ def test_step(self): cmd = "make BLASLIB='%s' %s_testing" % (blaslib, lib) run_shell_cmd(cmd) else: - super(EB_LAPACK, self).test_step() + super().test_step() # don't create a module if we're only testing def make_module_step(self, fake=False): @@ -227,7 +227,7 @@ def make_module_step(self, fake=False): if self.cfg['test_only']: pass else: - return super(EB_LAPACK, self).make_module_step(fake) + return super().make_module_step(fake) def sanity_check_step(self): """ @@ -239,4 +239,4 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_LAPACK, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/l/libdrm.py b/easybuild/easyblocks/l/libdrm.py index 75902e4cef0..8eed0de8c23 100644 --- a/easybuild/easyblocks/l/libdrm.py +++ b/easybuild/easyblocks/l/libdrm.py @@ -50,4 +50,4 @@ def sanity_check_step(self): if arch == X86_64: custom_paths['files'].append('lib/libdrm_intel.%s' % shlib_ext) - super(EB_libdrm, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/l/libint.py b/easybuild/easyblocks/l/libint.py index 67f8c87eba5..006553c7b98 100644 --- a/easybuild/easyblocks/l/libint.py +++ b/easybuild/easyblocks/l/libint.py @@ -55,7 +55,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Easyblock constructor.""" - super(EB_Libint, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # add custom paths to headers to module load environment libint_includes = ['include'] @@ -141,14 +141,14 @@ def configure_step(self): # specify current directory as source directory (that contains CMakeLists.txt), # since that's the path to the unpacked source tarball for Libint library (created by 'make export') - super(EB_Libint, self).configure_step(srcdir=os.getcwd()) + super().configure_step(srcdir=os.getcwd()) def test_step(self): """Run Libint test suite for recent versions""" if LooseVersion(self.version) >= LooseVersion('2.1') and self.cfg['runtest'] is None: self.cfg['runtest'] = 'check' - super(EB_Libint, self).test_step() + super().test_step() def sanity_check_step(self): """Custom sanity check for Libint.""" @@ -180,4 +180,4 @@ def sanity_check_step(self): 'files': headers + libs, 'dirs': [], } - super(EB_Libint, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/l/libqglviewer.py b/easybuild/easyblocks/l/libqglviewer.py index 10bc1e5dfaa..55cd229987a 100644 --- a/easybuild/easyblocks/l/libqglviewer.py +++ b/easybuild/easyblocks/l/libqglviewer.py @@ -71,4 +71,4 @@ def sanity_check_step(self): 'dirs': ['include/QGLViewer'], } - super(EB_libQGLViewer, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/l/libxml2.py b/easybuild/easyblocks/l/libxml2.py index 931bddc7762..ce231872dc3 100644 --- a/easybuild/easyblocks/l/libxml2.py +++ b/easybuild/easyblocks/l/libxml2.py @@ -134,7 +134,7 @@ def make_module_extra(self): if self.with_python_bindings: txt = PythonPackage.make_module_extra(self) else: - txt = super(EB_libxml2, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.prepend_paths('CPATH', [os.path.join('include', 'libxml2')]) return txt diff --git a/easybuild/easyblocks/l/llvm.py b/easybuild/easyblocks/l/llvm.py index 637e1babfc5..71822d75cac 100644 --- a/easybuild/easyblocks/l/llvm.py +++ b/easybuild/easyblocks/l/llvm.py @@ -237,7 +237,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize LLVM-specific variables.""" - super(EB_LLVM, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.llvm_src_dir = None self.llvm_obj_dir_stage1 = None @@ -646,7 +646,7 @@ def configure_step(self): self.add_cmake_opts() src_dir = os.path.join(self.llvm_src_dir, 'llvm') - super(EB_LLVM, self).configure_step(builddir=self.llvm_obj_dir_stage1, srcdir=src_dir) + super().configure_step(builddir=self.llvm_obj_dir_stage1, srcdir=src_dir) def disable_sanitizer_tests(self): """Disable the tests of all the sanitizers by removing the test directories from the build system""" @@ -826,7 +826,7 @@ def build_step(self, *args, **kwargs): print_msg("Building stage 1/1") change_dir(self.llvm_obj_dir_stage1) - super(EB_LLVM, self).build_step(*args, **kwargs) + super().build_step(*args, **kwargs) if self.cfg['bootstrap']: self.log.info("Building stage 2") @@ -961,11 +961,11 @@ def install_step(self): self.cfg.update('preinstallopts', f'LD_LIBRARY_PATH={lib_path}') - super(EB_LLVM, self).install_step() + super().install_step() def post_processing_step(self): """Install python bindings.""" - super(EB_LLVM, self).post_processing_step() + super().post_processing_step() # copy Python bindings here in post-install step so that it is not done more than once in multi_deps context if self.cfg['python_bindings']: @@ -1225,7 +1225,7 @@ def sanity_check_step(self, custom_paths=None, custom_commands=None, extension=F else: self._sanity_check_gcc_prefix(gcc_prefix_compilers, self.gcc_prefix, self.installdir) - return super(EB_LLVM, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + return super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_step(self, *args, **kwargs): """ @@ -1249,7 +1249,7 @@ def make_module_step(self, *args, **kwargs): def make_module_extra(self): """Custom variables for Clang module.""" - txt = super(EB_LLVM, self).make_module_extra() + txt = super().make_module_extra() # we set the symbolizer path so that asan/tsan give meanfull output by default asan_symbolizer_path = os.path.join(self.installdir, 'bin', 'llvm-symbolizer') txt += self.module_generator.set_environment('ASAN_SYMBOLIZER_PATH', asan_symbolizer_path) diff --git a/easybuild/easyblocks/l/lua.py b/easybuild/easyblocks/l/lua.py index f857f8acb78..18d82795cd8 100644 --- a/easybuild/easyblocks/l/lua.py +++ b/easybuild/easyblocks/l/lua.py @@ -88,11 +88,11 @@ def sanity_check_step(self): } custom_commands = ["lua -e 'io.write(package.path)' | grep %s" % self.installdir] - super(EB_Lua, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): """Also define $LUA_DIR in generated module file.""" - txt = super(EB_Lua, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('LUA_DIR', self.installdir) diff --git a/easybuild/easyblocks/m/mamba.py b/easybuild/easyblocks/m/mamba.py index 3e7bda8c5a2..4f2096a2391 100644 --- a/easybuild/easyblocks/m/mamba.py +++ b/easybuild/easyblocks/m/mamba.py @@ -46,4 +46,4 @@ def sanity_check_step(self): 'dirs': ['etc', 'lib', 'pkgs'], } # Directly call EB_Anaconda's super, as this sanity_check_step should _overwrite_ Anaconda's (not call it) - super(EB_Anaconda, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 6bcb41d2c6e..fb395e540f6 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -120,4 +120,4 @@ def sanity_check_step(self): 'files': ['bin/maple', 'lib/maple.mla'], 'dirs': [], } - super(EB_Maple, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/mathematica.py b/easybuild/easyblocks/m/mathematica.py index 85b13b0f926..fbb952b31d1 100644 --- a/easybuild/easyblocks/m/mathematica.py +++ b/easybuild/easyblocks/m/mathematica.py @@ -51,7 +51,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Easyblock constructor.""" - super(EB_Mathematica, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # custom paths in module load environment self.module_load_environment.PATH = ['bin', 'Executables'] @@ -133,7 +133,7 @@ def post_processing_step(self): else: self.log.info("No activation key provided, so skipping activation of the installation.") - super(EB_Mathematica, self).post_processing_step() + super().post_processing_step() def sanity_check_step(self): """Custom sanity check for Mathematica.""" @@ -148,4 +148,4 @@ def sanity_check_step(self): custom_commands = ['mathematica --version'] - super(EB_Mathematica, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/m/matlab.py b/easybuild/easyblocks/m/matlab.py index 3097cdc03ac..8ba81b012be 100644 --- a/easybuild/easyblocks/m/matlab.py +++ b/easybuild/easyblocks/m/matlab.py @@ -51,7 +51,7 @@ class EB_MATLAB(PackedBinary): def __init__(self, *args, **kwargs): """Add extra config options specific to MATLAB.""" - super(EB_MATLAB, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.comp_fam = None self.configfile = os.path.join(self.builddir, 'my_installer_input.txt') self.outputfile = os.path.join(self.builddir, 'my_installer_output.txt') @@ -214,11 +214,11 @@ def sanity_check_step(self): 'files': ["bin/matlab", "bin/glnxa64/MATLAB", "toolbox/local/classpath.txt"], 'dirs': ["java/jar"], } - super(EB_MATLAB, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Extend PATH and set proper _JAVA_OPTIONS (e.g., -Xmx).""" - txt = super(EB_MATLAB, self).make_module_extra() + txt = super().make_module_extra() if self.cfg['java_options']: txt += self.module_generator.set_environment('_JAVA_OPTIONS', self.cfg['java_options']) diff --git a/easybuild/easyblocks/m/mcr.py b/easybuild/easyblocks/m/mcr.py index 04cd4db7f29..25a6baeedf1 100644 --- a/easybuild/easyblocks/m/mcr.py +++ b/easybuild/easyblocks/m/mcr.py @@ -52,7 +52,7 @@ class EB_MCR(PackedBinary): def __init__(self, *args, **kwargs): """Add extra config options specific to MCR.""" - super(EB_MCR, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.comp_fam = None self.configfilename = "my_installer_input.txt" self.subdir = None @@ -135,11 +135,11 @@ def sanity_check_step(self): os.path.join(self.subdir, 'runtime', 'glnxa64'), os.path.join(self.subdir, 'sys', 'os', 'glnxa64'), ]) - super(EB_MCR, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Extend PATH and set proper _JAVA_OPTIONS (e.g., -Xmx).""" - txt = super(EB_MCR, self).make_module_extra() + txt = super().make_module_extra() self.set_subdir() # if no subdir was selected, set it to NOTFOUND diff --git a/easybuild/easyblocks/m/mesa.py b/easybuild/easyblocks/m/mesa.py index 9fa4c20d27a..e81b08566bd 100644 --- a/easybuild/easyblocks/m/mesa.py +++ b/easybuild/easyblocks/m/mesa.py @@ -45,7 +45,7 @@ class EB_Mesa(MesonNinja): def __init__(self, *args, **kwargs): """Constructor for custom Mesa easyblock: figure out which values to pass to swr-arches configuration option.""" - super(EB_Mesa, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.gallium_configopts = [] @@ -133,12 +133,12 @@ def configure_step(self): if self.gallium_configopts: self.cfg.update('configopts', self.gallium_configopts) - return super(EB_Mesa, self).configure_step() + return super().configure_step() def install_step(self): """Also copy additional header files after installing Mesa.""" - super(EB_Mesa, self).install_step() + super().install_step() # also install header files located in include/GL/internal, unless they're available already; # we can't enable both DRI and Gallium drivers, @@ -179,12 +179,12 @@ def sanity_check_step(self): swr_arch_libs = [os.path.join('lib', 'libswr%s.%s' % (a.upper(), shlib_ext)) for a in self.swr_arches] custom_paths['files'].extend(swr_arch_libs) - super(EB_Mesa, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self, *args, **kwargs): """ Append to EGL vendor library path, so that any NVidia libraries take precedence. """ - txt = super(EB_Mesa, self).make_module_extra(*args, **kwargs) + txt = super().make_module_extra(*args, **kwargs) # Append rather than prepend path to ensure that system NVidia drivers have priority. txt += self.module_generator.append_paths('__EGL_VENDOR_LIBRARY_DIRS', 'share/glvnd/egl_vendor.d') return txt diff --git a/easybuild/easyblocks/m/metagenome_atlas.py b/easybuild/easyblocks/m/metagenome_atlas.py index 98818882cd7..0a8bf629723 100644 --- a/easybuild/easyblocks/m/metagenome_atlas.py +++ b/easybuild/easyblocks/m/metagenome_atlas.py @@ -84,7 +84,7 @@ def sanity_check_step(self): 'atlas init --help', 'atlas run --help', ] - super(PythonPackage, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) # obtained from diff --git a/easybuild/easyblocks/m/metalwalls.py b/easybuild/easyblocks/m/metalwalls.py index 59fa7841ff4..be67461a412 100644 --- a/easybuild/easyblocks/m/metalwalls.py +++ b/easybuild/easyblocks/m/metalwalls.py @@ -44,7 +44,7 @@ class EB_MetalWalls(MakeCp): def __init__(self, *args, **kwargs): """Add extra config options specific to `metalwalls`.""" - super(EB_MetalWalls, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self._build_python_interface = False self._extra_schecks = [] @@ -149,12 +149,12 @@ def test_step(self): self.log.info('Setting PYTHONPATH for testing to %s' % ppath) env.setvar('PYTHONPATH', ppath) - super(EB_MetalWalls, self).test_step() + super().test_step() def make_module_extra(self, extra=None): """Add custom entries to module.""" - txt = super(EB_MetalWalls, self).make_module_extra() + txt = super().make_module_extra() if self._build_python_interface: txt += self.module_generator.prepend_paths('PYTHONPATH', 'python') @@ -171,4 +171,4 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_MetalWalls, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/metis.py b/easybuild/easyblocks/m/metis.py index c4283ca784a..bf75501817e 100644 --- a/easybuild/easyblocks/m/metis.py +++ b/easybuild/easyblocks/m/metis.py @@ -47,7 +47,7 @@ class EB_METIS(ConfigureMake): def __init__(self, *args, **kwargs): """Define custom class variables for METIS.""" - super(EB_METIS, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.lib_exts = [] def configure_step(self, *args, **kwargs): @@ -75,7 +75,7 @@ def build_step(self): if self.toolchain.options['pic']: self.cfg.update('buildopts', 'CC="$CC -fPIC"') - super(EB_METIS, self).build_step() + super().build_step() def install_step(self): """ @@ -123,7 +123,7 @@ def install_step(self): raise EasyBuildError("Something went wrong during symlink creation: %s", err) else: - super(EB_METIS, self).install_step() + super().install_step() def sanity_check_step(self): """Custom sanity check for METIS (more extensive for recent version (>= v5))""" @@ -145,4 +145,4 @@ def sanity_check_step(self): ['lib/libmetis.%s' % x for x in self.lib_exts], 'dirs': dirs, } - super(EB_METIS, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/molpro.py b/easybuild/easyblocks/m/molpro.py index fbeeab78e6d..848989c98d8 100644 --- a/easybuild/easyblocks/m/molpro.py +++ b/easybuild/easyblocks/m/molpro.py @@ -60,7 +60,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Easyblock constructor, initialize class variables specific to Molpro and check on license token.""" - super(EB_Molpro, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.full_prefix = '' # no None, to make easyblock compatible with --module-only self.orig_launcher = None @@ -170,7 +170,7 @@ def configure_step(self): def build_step(self): """Custom build procedure for Molpro, unless it is a binary install.""" if not self.cfg['precompiled_binaries']: - super(EB_Molpro, self).build_step() + super().build_step() def test_step(self): """ @@ -229,7 +229,7 @@ def install_step(self): if os.path.isfile(self.license_token): run_shell_cmd("make tuning") - super(EB_Molpro, self).install_step() + super().install_step() # put original LAUNCHER definition back in place in bin/molpro that got installed, # since the value used during installation point to temporary files @@ -267,4 +267,4 @@ def sanity_check_step(self): 'files': [os.path.join(prefix_subdir, x) for x in files_to_check], 'dirs': [os.path.join(prefix_subdir, x) for x in dirs_to_check], } - super(EB_Molpro, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/motioncor2.py b/easybuild/easyblocks/m/motioncor2.py index e1a287842a4..14096c88d6d 100644 --- a/easybuild/easyblocks/m/motioncor2.py +++ b/easybuild/easyblocks/m/motioncor2.py @@ -48,7 +48,7 @@ class EB_MotionCor2(PackedBinary): def __init__(self, *args, **kwargs): """Constructor of MotionCor2 easyblock.""" - super(EB_MotionCor2, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.cuda_mod_name, self.cuda_name = None, None self.motioncor2_bin = None @@ -60,7 +60,7 @@ def prepare_step(self, *args, **kwargs): """ Determine name of MotionCor2 binary to install based on CUDA version. """ - super(EB_MotionCor2, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) if not get_software_root('CUDA') and not get_software_root('CUDAcore'): raise EasyBuildError("CUDA(core) must be a direct (build)dependency of MotionCor2") @@ -140,4 +140,4 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_MotionCor2, self).sanity_check_step(custom_paths) + super().sanity_check_step(custom_paths) diff --git a/easybuild/easyblocks/m/mpich.py b/easybuild/easyblocks/m/mpich.py index edf6356d7eb..b8bece1c9eb 100644 --- a/easybuild/easyblocks/m/mpich.py +++ b/easybuild/easyblocks/m/mpich.py @@ -129,14 +129,14 @@ def configure_step(self, add_mpich_configopts=True): # things might go wrong if a previous install dir is present, so let's get rid of it if not self.cfg['keeppreviousinstall']: self.log.info("Making sure any old installation is removed before we start the build...") - super(EB_MPICH, self).make_dir(self.installdir, True, dontcreateinstalldir=True) + super().make_dir(self.installdir, True, dontcreateinstalldir=True) if add_mpich_configopts: self.add_mpich_configopts() self.correct_mpich_build_env() - super(EB_MPICH, self).configure_step() + super().configure_step() # make and make install are default @@ -175,4 +175,4 @@ def sanity_check_step(self, custom_paths=None, use_new_libnames=None, check_laun custom_paths.setdefault('dirs', []).extend(['bin', 'include', ('lib', 'lib64')]) custom_paths.setdefault('files', []).extend(bins + headers + libs) - super(EB_MPICH, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index accde4bd57e..bba13040dcc 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -49,7 +49,7 @@ class EB_MrBayes(ConfigureMake): """Support for building/installing MrBayes.""" def __init__(self, *args, **kwargs): - super(EB_MrBayes, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # For later MrBayes versions, no longer need to use this easyblock last_supported_version = '3.2.6' if LooseVersion(self.version) > LooseVersion(last_supported_version): @@ -90,7 +90,7 @@ def configure_step(self): self.cfg.update('configopts', '--enable-mpi') # configure - super(EB_MrBayes, self).configure_step() + super().configure_step() else: # no configure script prior to v3.2 @@ -117,4 +117,4 @@ def sanity_check_step(self): custom_commands = ["mb <<< %s" % x for x in ["about", "help"]] - super(EB_MrBayes, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/m/mrtrix.py b/easybuild/easyblocks/m/mrtrix.py index df978077f87..31a111c8304 100644 --- a/easybuild/easyblocks/m/mrtrix.py +++ b/easybuild/easyblocks/m/mrtrix.py @@ -41,7 +41,7 @@ class EB_MRtrix(EasyBlock): def __init__(self, *args, **kwargs): """Initialize easyblock, enable build-in-installdir based on version.""" - super(EB_MRtrix, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if LooseVersion(self.version) >= LooseVersion('0.3') and LooseVersion(self.version) < LooseVersion('0.3.14'): self.build_in_installdir = True @@ -58,7 +58,7 @@ def extract_step(self): if LooseVersion(self.version) >= LooseVersion('0.3'): self.cfg.update('unpack_options', '--strip-components=1') - super(EB_MRtrix, self).extract_step() + super().extract_step() def configure_step(self): """No configuration step for MRtrix.""" @@ -112,4 +112,4 @@ def sanity_check_step(self): if LooseVersion(self.version) >= LooseVersion('3.0'): custom_commands.append("python -c 'import mrtrix3'") - super(EB_MRtrix, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/m/mummer.py b/easybuild/easyblocks/m/mummer.py index 11696c5c9b8..003613d54b9 100644 --- a/easybuild/easyblocks/m/mummer.py +++ b/easybuild/easyblocks/m/mummer.py @@ -44,7 +44,7 @@ class EB_MUMmer(ConfigureMake): def __init__(self, *args, **kwargs): """Define list of bin/aux_bin files.""" - super(EB_MUMmer, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.bin_files = [ "mummer", "annotate", "combineMUMs", "delta-filter", "gaps", "mgaps", @@ -69,7 +69,7 @@ def build_step(self): # make sure that compiler options specified by EasyBuild are used self.cfg.update('buildopts', 'CXXFLAGS="$CXXFLAGS" CFLAGS="$CFLAGS"') - super(EB_MUMmer, self).build_step() + super().build_step() def install_step(self): """Patch files to avoid use of build dir, install by copying files to install dir.""" @@ -106,7 +106,7 @@ def make_module_extra(self): perlmajver = get_major_perl_version() # set $PATH and $PERLXLIB correctly - txt = super(EB_MUMmer, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.prepend_paths("PATH", ['bin/aux_bin']) txt += self.module_generator.prepend_paths("PERL%sLIB" % perlmajver, ['bin/scripts']) return txt @@ -124,4 +124,4 @@ def sanity_check_step(self): custom_commands = ["mummer -h"] - super(EB_MUMmer, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/m/mumps.py b/easybuild/easyblocks/m/mumps.py index 238ef160b11..ecfbdb68f2b 100644 --- a/easybuild/easyblocks/m/mumps.py +++ b/easybuild/easyblocks/m/mumps.py @@ -170,4 +170,4 @@ def sanity_check_step(self): 'dirs': [], } - super(EB_MUMPS, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/mxnet.py b/easybuild/easyblocks/m/mxnet.py index 3fe7df0e19f..38e085c988c 100644 --- a/easybuild/easyblocks/m/mxnet.py +++ b/easybuild/easyblocks/m/mxnet.py @@ -77,7 +77,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize custom class variables.""" - super(EB_MXNet, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.mxnet_src_dir = None self.py_ext = PythonPackage(self, {'name': self.name, 'version': self.version}) @@ -98,7 +98,7 @@ def extract_step(self): to their right place. """ # Extract everything into separate directories. - super(EB_MXNet, self).extract_step() + super().extract_step() mxnet_dirs = glob.glob(os.path.join(self.builddir, '*mxnet-*')) if len(mxnet_dirs) == 1: @@ -142,7 +142,7 @@ def extract_step(self): def prepare_step(self, *args, **kwargs): """Prepare for building and installing MXNet.""" - super(EB_MXNet, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) self.py_ext.prepare_python() def configure_step(self): @@ -172,14 +172,14 @@ def configure_step(self): if get_software_root('NNPACK'): self.cfg.update('buildopts', 'USE_NNPACK=1') - super(EB_MXNet, self).configure_step() + super().configure_step() def install_step(self): """Specify list of files to copy""" self.cfg['files_to_copy'] = ['bin', 'include', 'lib'] if LooseVersion(self.version) < LooseVersion('1.0'): self.cfg.update('files_to_copy', [(['dmlc-core/include/dmlc', 'nnvm/include/nnvm'], 'include')]) - super(EB_MXNet, self).install_step() + super().install_step() def extensions_step(self): """Build & Install both Python and R extension""" @@ -231,7 +231,7 @@ def sanity_check_step(self): 'files': ['lib/libmxnet.a', 'lib/libmxnet.%s' % get_shared_lib_ext()], 'dirs': [], } - super(EB_MXNet, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) # for the extension we are doing the loading of the fake module ourself try: @@ -250,7 +250,7 @@ def sanity_check_step(self): def make_module_extra(self, *args, **kwargs): """Custom variables for MXNet module.""" - txt = super(EB_MXNet, self).make_module_extra(*args, **kwargs) + txt = super().make_module_extra(*args, **kwargs) txt += self.module_generator.prepend_paths("R_LIBS", ['']) # prepend R_LIBS with install path diff --git a/easybuild/easyblocks/n/namd.py b/easybuild/easyblocks/n/namd.py index ae89f349835..a7a49524162 100644 --- a/easybuild/easyblocks/n/namd.py +++ b/easybuild/easyblocks/n/namd.py @@ -55,12 +55,12 @@ def extra_options(): def __init__(self, *args, **kwargs): """Custom easyblock constructor for NAMD, initialize class variables.""" - super(EB_NAMD, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.namd_arch = None def prepare_step(self, *args, **kwargs): """Prepare build environment.""" - super(EB_NAMD, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) if self.cfg['namd_basearch'] is None: @@ -77,7 +77,7 @@ def prepare_step(self, *args, **kwargs): def extract_step(self): """Custom extract step for NAMD, we need to extract charm++ so we can patch it.""" - super(EB_NAMD, self).extract_step() + super().extract_step() change_dir(self.src[0]['finalpath']) self.charm_tarballs = glob.glob('charm-*.tar') @@ -89,7 +89,7 @@ def extract_step(self): def patch_step(self, *args, **kwargs): """Patch scripts to avoid using hardcoded /bin/csh.""" - super(EB_NAMD, self).patch_step(*args, **kwargs) + super().patch_step(*args, **kwargs) self.charm_dir = self.charm_tarballs[0][:-4] @@ -194,7 +194,7 @@ def configure_step(self): def build_step(self): """Build NAMD for configured architecture""" - super(EB_NAMD, self).build_step(path=self.namd_arch) + super().build_step(path=self.namd_arch) def test_step(self): """Run NAMD test case.""" @@ -243,7 +243,7 @@ def install_step(self): def make_module_extra(self): """Add the install directory to PATH""" - txt = super(EB_NAMD, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.prepend_paths("PATH", ['']) return txt @@ -253,4 +253,4 @@ def sanity_check_step(self): 'files': ['charmrun', 'flipbinpdb', 'flipdcd', 'namd%s' % self.version.split('.')[0], 'psfgen'], 'dirs': ['inc'], } - super(EB_NAMD, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/n/nccl.py b/easybuild/easyblocks/n/nccl.py index cf00c8eee3c..48380466a94 100644 --- a/easybuild/easyblocks/n/nccl.py +++ b/easybuild/easyblocks/n/nccl.py @@ -65,7 +65,7 @@ def build_step(self): # Set PREFIX to correctly generate nccl.pc self.cfg.update('buildopts', "PREFIX=%s" % self.installdir) - super(EB_NCCL, self).build_step() + super().build_step() def install_step(self): """Install NCCL""" @@ -73,7 +73,7 @@ def install_step(self): copy_file(os.path.join(self.cfg['start_dir'], 'LICENSE.txt'), os.path.join(self.installdir, 'LICENSE.txt')) - super(EB_NCCL, self).install_step() + super().install_step() def sanity_check_step(self): """Custom sanity check paths for NCCL""" @@ -83,4 +83,4 @@ def sanity_check_step(self): 'dirs': [], } - super(EB_NCCL, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 38a7aff9da8..d085d2d9d29 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -235,10 +235,10 @@ def sanity_check_step(self): 'files': ['bin/fontc', 'bin/ncl', 'lib/libncl.a', 'lib/libncarg.a'], 'dirs': ['include/ncarg', 'lib/ncarg/fontcaps'], } - super(EB_NCL, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Set NCARG_ROOT environment variable in module.""" - txt = super(EB_NCL, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('NCARG_ROOT', self.installdir) return txt diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index 7477e86d707..eb6737297cb 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -146,7 +146,7 @@ def sanity_check_step(self): "ncgen -h" if LooseVersion(self.version) > LooseVersion("4.6.1") else "ncgen -H", ] - super(EB_netCDF, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) def set_netcdf_env_vars(log): diff --git a/easybuild/easyblocks/n/netcdf4_python.py b/easybuild/easyblocks/n/netcdf4_python.py index 6c76c7ea2b0..34438856764 100644 --- a/easybuild/easyblocks/n/netcdf4_python.py +++ b/easybuild/easyblocks/n/netcdf4_python.py @@ -38,7 +38,7 @@ class EB_netcdf4_minus_python(PythonPackage): def __init__(self, *args, **kwargs): """Custom constructor for netcdf4-python.""" - super(EB_netcdf4_minus_python, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.options['modulename'] = 'netCDF4' def configure_step(self): @@ -65,7 +65,7 @@ def configure_step(self): if curl: env.setvar('CURL_DIR', curl) - super(EB_netcdf4_minus_python, self).configure_step() + super().configure_step() def test_step(self): """Run netcdf4-python tests.""" @@ -82,7 +82,7 @@ def test_step(self): # don't run tests that require network connectivity env.setvar('NO_NET', '1') - super(EB_netcdf4_minus_python, self).test_step() + super().test_step() def sanity_check_step(self): """Custom sanity check for netcdf4-python""" @@ -100,5 +100,4 @@ def sanity_check_step(self): if self.toolchain.options.get('usempi', None): custom_commands = [self.toolchain.mpi_cmd_for(cmd, 1) for cmd in custom_commands] - return super(EB_netcdf4_minus_python, self).sanity_check_step(custom_paths=custom_paths, - custom_commands=custom_commands) + return super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index ed143afe909..fed0603350a 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -55,7 +55,7 @@ def configure_step(self): if self.toolchain.comp_family() == toolchain.GCC: # @UndefinedVariable env.setvar('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS')) - super(EB_netCDF_minus_Fortran, self).configure_step() + super().configure_step() def sanity_check_step(self): """ @@ -67,4 +67,4 @@ def sanity_check_step(self): ["include/%s" % x for x in ["netcdf.inc", "netcdf.mod", "typesizes.mod"]], 'dirs': [], } - super(EB_netCDF_minus_Fortran, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/n/neuron.py b/easybuild/easyblocks/n/neuron.py index 8c2c4c83c3b..68594e90ebb 100644 --- a/easybuild/easyblocks/n/neuron.py +++ b/easybuild/easyblocks/n/neuron.py @@ -58,14 +58,14 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for NEURON.""" - super(EB_NEURON, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.python_root = None self.pylibdir = 'UNKNOWN' def prepare_step(self, *args, **kwargs): """Custom prepare step with python detection""" - super(EB_NEURON, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) self.python_root = get_software_root('Python') @@ -177,7 +177,7 @@ def sanity_check_step(self): if self.python_root: custom_commands.append("python -c 'import neuron; neuron.test()'") - super(EB_NEURON, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_step(self, *args, **kwargs): """ @@ -190,12 +190,12 @@ def make_module_step(self, *args, **kwargs): else: self.module_load_environment.PYTHONPATH = [os.path.join('lib', 'python')] - return super(EB_NEURON, self).make_module_step(*args, **kwargs) + return super().make_module_step(*args, **kwargs) def make_module_extra(self): """Define extra module entries required.""" - txt = super(EB_NEURON, self).make_module_extra() + txt = super().make_module_extra() # we need to make sure the correct compiler is set in the environment, # since NEURON features compilation at runtime diff --git a/easybuild/easyblocks/n/nim.py b/easybuild/easyblocks/n/nim.py index 95643e02a5c..ca7ca5a7926 100644 --- a/easybuild/easyblocks/n/nim.py +++ b/easybuild/easyblocks/n/nim.py @@ -77,4 +77,4 @@ def sanity_check_step(self): 'files': ['bin/nim', 'bin/nimble', 'bin/nimgrep', 'bin/nimsuggest'], 'dirs': ['config', 'doc', 'lib'], } - super(EB_Nim, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/n/nose.py b/easybuild/easyblocks/n/nose.py index 327296da3ec..fa7663a95ac 100644 --- a/easybuild/easyblocks/n/nose.py +++ b/easybuild/easyblocks/n/nose.py @@ -39,7 +39,7 @@ class EB_nose(PythonPackage): def __init__(self, *args, **kwargs): """Set custom class variables (unpack options).""" - super(EB_nose, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # use extra unpack options to avoid problems like # 'tar: Ignoring unknown extended header keyword `SCHILY.nlink' diff --git a/easybuild/easyblocks/n/numexpr.py b/easybuild/easyblocks/n/numexpr.py index 0fb54500210..e158f20522c 100644 --- a/easybuild/easyblocks/n/numexpr.py +++ b/easybuild/easyblocks/n/numexpr.py @@ -39,13 +39,13 @@ class EB_numexpr(PythonPackage): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for numexpr.""" - super(EB_numexpr, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.imkl_root = None def configure_step(self): """Custom configuration procedure for numexpr.""" - super(EB_numexpr, self).configure_step() + super().configure_step() self.imkl_root = get_software_root('imkl') @@ -114,4 +114,4 @@ def sanity_check_step(self): if LooseVersion(self.version) >= LooseVersion('2.7.3'): custom_commands.append("""python -c "import numexpr; numexpr.set_vml_accuracy_mode('low')" """) - return super(EB_numexpr, self).sanity_check_step(custom_commands=custom_commands) + return super().sanity_check_step(custom_commands=custom_commands) diff --git a/easybuild/easyblocks/n/numpy.py b/easybuild/easyblocks/n/numpy.py index 404db621e37..eaf93cf4591 100644 --- a/easybuild/easyblocks/n/numpy.py +++ b/easybuild/easyblocks/n/numpy.py @@ -62,7 +62,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize numpy-specific class variables.""" - super(EB_numpy, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.sitecfg = None self.sitecfgfn = 'site.cfg' @@ -213,7 +213,7 @@ def get_libs_for_mkl(varname): # This variable makes it try `-lm` first and is supported until the Meson backend is used in 1.26+. env.setvar('MATHLIB', 'm') - super(EB_numpy, self).configure_step() + super().configure_step() if LooseVersion(self.version) < LooseVersion('1.21'): # check configuration (for debugging purposes) @@ -267,7 +267,7 @@ def test_step(self): # see http://projects.scipy.org/numpy/ticket/182 self.testcmd = "unset LDFLAGS && cd .. && %%(python)s -c '%s'" % test_code - super(EB_numpy, self).test_step() + super().test_step() # temporarily install numpy, it doesn't alow to be used straight from the source dir tmpdir = tempfile.mkdtemp() @@ -329,7 +329,7 @@ def test_step(self): def install_step(self): """Install numpy and remove numpy build dir, so scipy doesn't find it by accident.""" - super(EB_numpy, self).install_step() + super().install_step() builddir = os.path.join(self.builddir, "numpy") try: @@ -344,7 +344,7 @@ def install_step(self): def install_extension(self): """Install numpy as an extension""" - super(EB_numpy, self).install_extension() + super().install_extension() return self.make_module_extra_numpy_include() @@ -397,7 +397,7 @@ def sanity_check_step(self, *args, **kwargs): # _dotblas is required for decent performance of numpy.dot(), but only there in numpy 1.9.x and older custom_commands.append("python -c 'import numpy.core._dotblas'") - return super(EB_numpy, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + return super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra_numpy_include(self): """ @@ -423,6 +423,6 @@ def make_module_extra(self): """ Add additional update statements in module file specific to numpy """ - txt = super(EB_numpy, self).make_module_extra() + txt = super().make_module_extra() txt += self.make_module_extra_numpy_include() return txt diff --git a/easybuild/easyblocks/n/nvhpc.py b/easybuild/easyblocks/n/nvhpc.py index 84cbc8458ce..2ca29b5fd45 100644 --- a/easybuild/easyblocks/n/nvhpc.py +++ b/easybuild/easyblocks/n/nvhpc.py @@ -99,7 +99,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Easyblock constructor, define custom class variables specific to NVHPC.""" - super(EB_NVHPC, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # Ideally we should be using something like `easybuild.tools.systemtools.get_cpu_architecture` here, however, # on `ppc64le` systems this function returns `POWER` instead of `ppc64le`. Since this path needs to reflect @@ -278,11 +278,11 @@ def sanity_check_step(self): minimal_compiler_cmd = f"cd {tmpdir} && nvc++ -std=c++20 minimal.cpp -o minimal" custom_commands.append(minimal_compiler_cmd) - super(EB_NVHPC, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): """Add environment variable for NVHPC location""" - txt = super(EB_NVHPC, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('NVHPC', self.installdir) if LooseVersion(self.version) >= LooseVersion('22.7'): # NVHPC 22.7+ requires the variable NVHPC_CUDA_HOME for external CUDA. CUDA_HOME has been deprecated. diff --git a/easybuild/easyblocks/n/nwchem.py b/easybuild/easyblocks/n/nwchem.py index 11189ea0295..d376aca2c78 100644 --- a/easybuild/easyblocks/n/nwchem.py +++ b/easybuild/easyblocks/n/nwchem.py @@ -50,7 +50,7 @@ class EB_NWChem(ConfigureMake): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for NWChem.""" - super(EB_NWChem, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.test_cases_dir = None # path for symlink to local copy of default .nwchemrc, required by NWChem at runtime @@ -290,7 +290,7 @@ def build_step(self): os.unsetenv(var) os.environ.pop(var) - super(EB_NWChem, self).build_step(verbose=True) + super().build_step(verbose=True) # build version info try: @@ -371,12 +371,12 @@ def sanity_check_step(self): 'dirs': [os.path.join('data', x) for x in ['amber_q', 'amber_s', 'amber_t', 'amber_u', 'amber_x', 'charmm_s', 'charmm_x', 'solvents', 'libraries', 'libraryps']], } - super(EB_NWChem, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Custom extra module file entries for NWChem.""" - txt = super(EB_NWChem, self).make_module_extra() + txt = super().make_module_extra() # check whether Python module is loaded for compatibility with --module-only python = get_software_root('Python') diff --git a/easybuild/easyblocks/o/ocaml.py b/easybuild/easyblocks/o/ocaml.py index 395223cec17..8cc6048dfbd 100644 --- a/easybuild/easyblocks/o/ocaml.py +++ b/easybuild/easyblocks/o/ocaml.py @@ -80,7 +80,7 @@ class EB_OCaml(ConfigureMake): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for OCaml.""" - super(EB_OCaml, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.with_opam = False # custom extra paths/variables to define in generated module for OCaml @@ -97,14 +97,14 @@ def configure_step(self): if 'world.opt' not in self.cfg['buildopts']: self.cfg.update('buildopts', 'world.opt') - super(EB_OCaml, self).configure_step() + super().configure_step() def install_step(self): """ Custom install procedure for OCaml. First install OCaml using 'make install', then install OPAM (if sources are provided). """ - super(EB_OCaml, self).install_step() + super().install_step() try: all_dirs = os.listdir(self.builddir) @@ -138,7 +138,7 @@ def prepare_for_extensions(self): # build and install additional packages with OCamlPackage easyblock self.cfg['exts_defaultclass'] = "OCamlPackage" self.cfg['exts_filter'] = EXTS_FILTER_OCAML_PACKAGES - super(EB_OCaml, self).prepare_for_extensions() + super().prepare_for_extensions() def collect_exts_file_info(self, *args, **kwargs): """Don't fetch extension sources, OPAM takes care of that (and archiving too).""" @@ -166,4 +166,4 @@ def sanity_check_step(self): 'dirs': dirs, } - super(EB_OCaml, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/o/octave.py b/easybuild/easyblocks/o/octave.py index c6eac52a7fa..8bfd2b7ff24 100644 --- a/easybuild/easyblocks/o/octave.py +++ b/easybuild/easyblocks/o/octave.py @@ -76,14 +76,14 @@ def configure_step(self): else: self.log.debug("No Qt included as dependency") - super(EB_Octave, self).configure_step() + super().configure_step() def prepare_for_extensions(self): """Set default class and filter for Octave toolboxes.""" # build and install additional packages with OctavePackage easyblock self.cfg['exts_defaultclass'] = 'OctavePackage' self.cfg['exts_filter'] = EXTS_FILTER_OCTAVE_PACKAGES - super(EB_Octave, self).prepare_for_extensions() + super().prepare_for_extensions() def sanity_check_step(self): """Custom sanity check for Octave.""" @@ -99,4 +99,4 @@ def sanity_check_step(self): custom_commands = ["octave --eval '1+2'"] - super(EB_Octave, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/o/openbabel.py b/easybuild/easyblocks/o/openbabel.py index d7edc915fcb..a8d041b6a75 100644 --- a/easybuild/easyblocks/o/openbabel.py +++ b/easybuild/easyblocks/o/openbabel.py @@ -52,7 +52,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize OpenBabel-specific variables.""" - super(EB_OpenBabel, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.with_python = False def configure_step(self): @@ -94,7 +94,7 @@ def configure_step(self): else: self.log.info("Not using Eigen") - super(EB_OpenBabel, self).configure_step() + super().configure_step() def sanity_check_step(self): """Custom sanity check for OpenBabel.""" @@ -102,11 +102,11 @@ def sanity_check_step(self): 'files': ['bin/obabel', 'lib/libopenbabel.%s' % get_shared_lib_ext()], 'dirs': ['share/openbabel'], } - super(EB_OpenBabel, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Custom variables for OpenBabel module.""" - txt = super(EB_OpenBabel, self).make_module_extra() + txt = super().make_module_extra() babel_libdir = os.path.join(self.installdir, 'lib', 'openbabel', self.version) txt += self.module_generator.set_environment('BABEL_LIBDIR', babel_libdir) babel_datadir = os.path.join(self.installdir, 'share', 'openbabel', self.version) diff --git a/easybuild/easyblocks/o/openblas.py b/easybuild/easyblocks/o/openblas.py index 3f6ab39db30..e9a672256aa 100644 --- a/easybuild/easyblocks/o/openblas.py +++ b/easybuild/easyblocks/o/openblas.py @@ -176,4 +176,4 @@ def sanity_check_step(self): 'lib/libopenblas.a', 'lib/libopenblas.%s' % get_shared_lib_ext()], 'dirs': [], } - super(EB_OpenBLAS, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/o/opencv.py b/easybuild/easyblocks/o/opencv.py index 807f790fc62..f957bb055d4 100644 --- a/easybuild/easyblocks/o/opencv.py +++ b/easybuild/easyblocks/o/opencv.py @@ -58,14 +58,14 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for OpenCV.""" - super(EB_OpenCV, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # can't be set before prepare_step is run self.pylibdir = None def prepare_step(self, *args, **kwargs): """Prepare environment for installing OpenCV.""" - super(EB_OpenCV, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) self.pylibdir = det_pylibdir() @@ -200,13 +200,13 @@ def configure_step(self): if 'f16c' not in avail_cpu_features: self.cfg.update('configopts', '-DCPU_BASELINE_DISABLE=FP16') - super(EB_OpenCV, self).configure_step() + super().configure_step() def install_step(self): """ Custom installation procedure for OpenCV: also copy IPP library into lib subdirectory of installation directory. """ - super(EB_OpenCV, self).install_step() + super().install_step() if 'WITH_IPP=ON' in self.cfg['configopts']: common_dir = os.path.join('3rdparty', 'ippicv', 'ippicv_lnx') @@ -237,11 +237,11 @@ def sanity_check_step(self): if get_software_root('Python'): custom_commands.append("python -c 'import cv2'") - super(EB_OpenCV, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): """Custom extra module file entries for OpenCV.""" - txt = super(EB_OpenCV, self).make_module_extra() + txt = super().make_module_extra() if LooseVersion(self.version) >= LooseVersion('4.0'): txt += self.module_generator.prepend_paths('CPATH', os.path.join('include', 'opencv4')) diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 72709013b24..23a5e6833b7 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -71,7 +71,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Specify that OpenFOAM should be built in install dir.""" - super(EB_OpenFOAM, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.build_in_installdir = True @@ -124,7 +124,7 @@ def __init__(self, *args, **kwargs): def extract_step(self): """Extract sources as expected by the OpenFOAM(-Extend) build scripts.""" - super(EB_OpenFOAM, self).extract_step() + super().extract_step() # make sure that the expected subdir is really there after extracting # if not, the build scripts (e.g., the etc/bashrc being sourced) will likely fail openfoam_installdir = os.path.join(self.installdir, self.openfoamdir) @@ -153,7 +153,7 @@ def extract_step(self): def patch_step(self, beginpath=None): """Adjust start directory and start path for patching to correct directory.""" self.cfg['start_dir'] = os.path.join(self.installdir, self.openfoamdir) - super(EB_OpenFOAM, self).patch_step(beginpath=self.cfg['start_dir']) + super().patch_step(beginpath=self.cfg['start_dir']) def configure_step(self): """Configure OpenFOAM build by setting appropriate environment variables.""" @@ -614,12 +614,12 @@ def sanity_check_step(self): # because sourcing $FOAM_BASH sets up environment custom_commands.append(' && '.join(cmds)) - super(EB_OpenFOAM, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self, altroot=None, altversion=None): """Define extra environment variables required by OpenFOAM""" - txt = super(EB_OpenFOAM, self).make_module_extra() + txt = super().make_module_extra() env_vars = [ # Set WM_COMPILE_OPTION in the module file diff --git a/easybuild/easyblocks/o/openmpi.py b/easybuild/easyblocks/o/openmpi.py index 44dc9e1aa22..fe51b96291e 100644 --- a/easybuild/easyblocks/o/openmpi.py +++ b/easybuild/easyblocks/o/openmpi.py @@ -140,7 +140,7 @@ def config_opt_used(key, enable_opt=False): else: self.cfg.update('configopts', '--without-verbs') - super(EB_OpenMPI, self).configure_step() + super().configure_step() def test_step(self): """Test step for OpenMPI""" @@ -148,7 +148,7 @@ def test_step(self): if self.cfg['runtest'] is None: self.cfg['runtest'] = 'check' - super(EB_OpenMPI, self).test_step() + super().test_step() def load_module(self, *args, **kwargs): """ @@ -156,7 +156,7 @@ def load_module(self, *args, **kwargs): Also put RPATH wrappers back in place if needed, to ensure that sanity check commands work as expected. """ - super(EB_OpenMPI, self).load_module(*args, **kwargs) + super().load_module(*args, **kwargs) # ensure RPATH wrappers are in place, otherwise compiling minimal test programs will fail if build_option('rpath'): @@ -253,4 +253,4 @@ def sanity_check_step(self): params['nr_ranks'] = 1 custom_commands.append(mpi_cmd_tmpl % params) - super(EB_OpenMPI, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/o/openssl.py b/easybuild/easyblocks/o/openssl.py index e70569436a9..96d7f3f5242 100644 --- a/easybuild/easyblocks/o/openssl.py +++ b/easybuild/easyblocks/o/openssl.py @@ -59,7 +59,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for OpenSSL""" - super(EB_OpenSSL, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # path to SSL certificates ssl_certs_dir = self.cfg.get('ssl_certificates') @@ -117,7 +117,7 @@ def configure_step(self, cmd_prefix=''): def install_step(self): """Installation of OpenSSL and SSL certificates""" - super(EB_OpenSSL, self).install_step() + super().install_step() # SSL certificates # OPENSSLDIR is already populated by the installation of OpenSSL @@ -166,4 +166,4 @@ def sanity_check_step(self): if self.ssl_certs_dir: custom_paths['dirs'].append('ssl/certs') - super(EB_OpenSSL, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/o/openssl_wrapper.py b/easybuild/easyblocks/o/openssl_wrapper.py index 11afb39e15f..dad2225175f 100644 --- a/easybuild/easyblocks/o/openssl_wrapper.py +++ b/easybuild/easyblocks/o/openssl_wrapper.py @@ -69,7 +69,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Locate the installation files of OpenSSL in the host system""" - super(EB_OpenSSL_wrapper, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if LooseVersion(self.version) < LooseVersion('2'): try: @@ -315,12 +315,12 @@ def __init__(self, *args, **kwargs): def fetch_step(self, *args, **kwargs): """Fetch sources if OpenSSL component is needed""" if not all(self.system_ssl[key] for key in ('bin', 'engines', 'include', 'libs')): - super(EB_OpenSSL_wrapper, self).fetch_step(*args, **kwargs) + super().fetch_step(*args, **kwargs) def extract_step(self): """Extract sources if OpenSSL component is needed""" if not all(self.system_ssl[key] for key in ('bin', 'engines', 'include', 'libs')): - super(EB_OpenSSL_wrapper, self).extract_step() + super().extract_step() def install_step(self): """Symlink target OpenSSL installation""" @@ -368,12 +368,12 @@ def install_step(self): elif self.cfg.get('wrap_system_openssl'): # install OpenSSL component due to lack of OpenSSL in host system print_warning("Not all OpenSSL components found in host system, falling back to OpenSSL in EasyBuild!") - super(EB_OpenSSL_wrapper, self).install_step() + super().install_step() else: # install OpenSSL component by user request warn_msg = "Installing OpenSSL from source in EasyBuild by user request ('wrap_system_openssl=%s')" print_warning(warn_msg, self.cfg.get('wrap_system_openssl')) - super(EB_OpenSSL_wrapper, self).install_step() + super().install_step() def sanity_check_step(self): """Custom sanity check for OpenSSL wrapper.""" @@ -412,7 +412,7 @@ def sanity_check_step(self): "| grep 'Verify return code: 0 (ok)'" % proxy_arg), ] - super(Bundle, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def get_openssl_bin_version(self, bin_name): """Check OpenSSL executable version""" diff --git a/easybuild/easyblocks/o/optislang.py b/easybuild/easyblocks/o/optislang.py index b36b1050a53..8e3bb825d12 100644 --- a/easybuild/easyblocks/o/optislang.py +++ b/easybuild/easyblocks/o/optislang.py @@ -43,7 +43,7 @@ class EB_optiSLang(PackedBinary): def __init__(self, *args, **kwargs): """Initialize optiSLang-specific variables.""" - super(EB_optiSLang, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # custom extra module file entries for ANSYS optiSLang bin_dirs = [ @@ -95,4 +95,4 @@ def sanity_check_step(self): } custom_commands = ['optislang --help'] - super(EB_optiSLang, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/o/orca.py b/easybuild/easyblocks/o/orca.py index b5ccfb01a46..10f8d908542 100644 --- a/easybuild/easyblocks/o/orca.py +++ b/easybuild/easyblocks/o/orca.py @@ -60,7 +60,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Init and validate easyconfig parameters and system architecture""" - super(EB_ORCA, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # If user overwrites 'files_to_copy', custom 'sanity_check_paths' must be present if self.cfg['files_to_copy'] and not self.cfg['sanity_check_paths']: @@ -180,4 +180,4 @@ def sanity_check_step(self): "%s | grep -c '%s'" % (test_orca_cmd, test_output_regex), ] - super(EB_ORCA, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/p/palm.py b/easybuild/easyblocks/p/palm.py index 941e7c716b4..9ccbc971920 100644 --- a/easybuild/easyblocks/p/palm.py +++ b/easybuild/easyblocks/p/palm.py @@ -39,7 +39,7 @@ class EB_PALM(EasyBlock): def __init__(self, *args, **kwargs): """Initialise PALM easyblock.""" - super(EB_PALM, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) def configure_step(self): """No configuration procedure for PALM.""" @@ -73,4 +73,4 @@ def sanity_check_step(self): 'files': [os.path.join(self.installdir, 'bin', 'palmrun')], 'dirs': [], } - super(EB_PALM, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/p/paraver.py b/easybuild/easyblocks/p/paraver.py index 3b6c77e7670..30aabf68786 100644 --- a/easybuild/easyblocks/p/paraver.py +++ b/easybuild/easyblocks/p/paraver.py @@ -43,7 +43,7 @@ class EB_Paraver(ConfigureMake): def __init__(self, *args, **kwargs): """Constructor for custom easyblock for Paraver.""" - super(EB_Paraver, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if LooseVersion(self.version) < LooseVersion('4.7'): raise EasyBuildError("Custom easyblock for Paraver only supports Paraver versions >= 4.7") @@ -87,7 +87,7 @@ def configure_step(self): if wxpropgrid: self.cfg.update('configopts', '--with-wxpropgrid=%s' % wxpropgrid) - super(EB_Paraver, self).configure_step() + super().configure_step() def build_step(self): """No build ('make') required for recent versions.""" @@ -99,4 +99,4 @@ def sanity_check_step(self): 'files': ['bin/wxparaver', 'include/paraverconfig.h', 'lib/paraver-kernel/libparaver-kernel.a'], 'dirs': [], } - super(EB_Paraver, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/p/parmetis.py b/easybuild/easyblocks/p/parmetis.py index 1b6d5a20b4f..cc4a0d37575 100644 --- a/easybuild/easyblocks/p/parmetis.py +++ b/easybuild/easyblocks/p/parmetis.py @@ -49,7 +49,7 @@ class EB_ParMETIS(EasyBlock): def __init__(self, *args, **kwargs): """Easyblock constructor.""" - super(EB_ParMETIS, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.config_shared = False self.config_static = False @@ -213,4 +213,4 @@ def sanity_check_step(self): 'dirs': ['Lib'] } - super(EB_ParMETIS, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/p/pdt.py b/easybuild/easyblocks/p/pdt.py index d839f0f2213..66dee11c668 100644 --- a/easybuild/easyblocks/p/pdt.py +++ b/easybuild/easyblocks/p/pdt.py @@ -82,9 +82,9 @@ def configure_step(self): # Configure creates required subfolders in installdir, so create first (but only once, during first iteration) if self.iter_idx == 0: - super(EB_PDT, self).make_installdir() + super().make_installdir() - super(EB_PDT, self).configure_step() + super().configure_step() def build_step(self): """Skip build step""" @@ -101,7 +101,7 @@ def install_step(self): if self.parallel_flag: self.cfg.update('installopts', self.parallel_flag) - super(EB_PDT, self).install_step() + super().install_step() # Link arch-specific directories into prefix arch_dir = find_arch_dir(self.installdir) @@ -122,4 +122,4 @@ def sanity_check_step(self): os.path.join('lib', 'libpdb.a')], 'dirs': [], } - super(EB_PDT, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/p/perl.py b/easybuild/easyblocks/p/perl.py index 9e70f5e2a0d..931b27cafe2 100644 --- a/easybuild/easyblocks/p/perl.py +++ b/easybuild/easyblocks/p/perl.py @@ -173,7 +173,7 @@ def post_processing_step(self, *args, **kwargs): # specify pattern for paths (relative to install dir) of files for which shebang should be patched self.cfg['fix_perl_shebang_for'] = 'bin/*' - super(EB_Perl, self).post_processing_step(*args, **kwargs) + super().post_processing_step(*args, **kwargs) def sanity_check_step(self): """Custom sanity check for Perl.""" @@ -186,7 +186,7 @@ def sanity_check_step(self): 'files': [os.path.join('bin', x) for x in ['perl', 'perldoc']], 'dirs': dirs, } - super(EB_Perl, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def get_major_perl_version(): diff --git a/easybuild/easyblocks/p/petsc.py b/easybuild/easyblocks/p/petsc.py index 2a3ee9b4a4f..3c1c594031a 100644 --- a/easybuild/easyblocks/p/petsc.py +++ b/easybuild/easyblocks/p/petsc.py @@ -75,7 +75,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize PETSc specific variables.""" - super(EB_PETSc, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if LooseVersion(self.version) < LooseVersion("3.9"): raise EasyBuildError( @@ -144,7 +144,7 @@ def inc_dirs(self): def prepare_step(self, *args, **kwargs): """Prepare build environment.""" - super(EB_PETSc, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) # build with Python support if Python is loaded as a non-build (runtime) dependency build_deps = self.cfg.dependencies(build_only=True) @@ -331,7 +331,7 @@ def configure_step(self): res = run_shell_cmd(cmd) out = res.output else: - out = super(EB_PETSc, self).configure_step() + out = super().configure_step() # check for errors in configure error_regexp = re.compile("ERROR") @@ -384,7 +384,7 @@ def install_step(self): Install using make install (for non-source installations) """ if not self.cfg['sourceinstall']: - super(EB_PETSc, self).install_step() + super().install_step() # Remove MPI-CXX flags added during configure to prevent them from being passed to consumers of PETsc petsc_variables_path = os.path.join(self.petsc_root, 'lib', 'petsc', 'conf', 'petscvariables') @@ -395,7 +395,7 @@ def install_step(self): def make_module_extra(self): """Set PETSc specific environment variables (PETSC_DIR, PETSC_ARCH).""" - txt = super(EB_PETSc, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('PETSC_DIR', self.petsc_root) if self.cfg['sourceinstall']: @@ -428,4 +428,4 @@ def sanity_check_step(self): if self.with_python: custom_commands.append("python -m PetscBinaryIO --help") - super(EB_PETSc, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/p/psi.py b/easybuild/easyblocks/p/psi.py index 1b558fe51db..b129f5906b0 100644 --- a/easybuild/easyblocks/p/psi.py +++ b/easybuild/easyblocks/p/psi.py @@ -51,7 +51,7 @@ class EB_PSI(CMakeMake): def __init__(self, *args, **kwargs): """Initialize class variables custom to PSI.""" - super(EB_PSI, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.psi_srcdir = None self.install_psi_objdir = None @@ -197,7 +197,7 @@ def configure_step(self): def install_step(self): """Custom install procedure for PSI.""" - super(EB_PSI, self).install_step() + super().install_step() # the obj and unpacked sources must remain available for working with plugins try: @@ -223,7 +223,7 @@ def test_step(self): cmd = "ctest %s %s" % (paracmd, self.cfg['runtest']) run_shell_cmd(cmd) else: - super(EB_PSI, self).test_step() + super().test_step() try: shutil.rmtree(testdir) @@ -236,11 +236,11 @@ def sanity_check_step(self): 'files': ['bin/psi4'], 'dirs': ['include', ('share/psi', 'share/psi4')], } - super(EB_PSI, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Custom variables for PSI module.""" - txt = super(EB_PSI, self).make_module_extra() + txt = super().make_module_extra() share_dir = os.path.join(self.installdir, 'share') if os.path.exists(share_dir): psi4datadir = glob.glob(os.path.join(share_dir, 'psi*')) diff --git a/easybuild/easyblocks/p/psmpi.py b/easybuild/easyblocks/p/psmpi.py index 8e9af9644ea..23f83f62471 100644 --- a/easybuild/easyblocks/p/psmpi.py +++ b/easybuild/easyblocks/p/psmpi.py @@ -139,7 +139,7 @@ def configure_step(self): pscom_flags += ' export PSCOM_CPPFLAGS="-I{0}/include $PSCOM_CPPFLAGS" &&'.format(pscom_path) self.cfg.update('preconfigopts', pscom_flags) - super(EB_psmpi, self).configure_step(add_mpich_configopts=False) + super().configure_step(add_mpich_configopts=False) # make and make install are default @@ -154,6 +154,6 @@ def sanity_check_step(self): # ParaStationMPI < 5.1.1-1 is based on MPICH < 3.1.1. use_new_libnames = LooseVersion(self.version) >= LooseVersion('5.1.1-1') - super(EB_psmpi, self).sanity_check_step(use_new_libnames=use_new_libnames, - check_launchers=False, - check_static_libs=False) + super().sanity_check_step(use_new_libnames=use_new_libnames, + check_launchers=False, + check_static_libs=False) diff --git a/easybuild/easyblocks/p/pybind11.py b/easybuild/easyblocks/p/pybind11.py index 73a43ed4c7c..7f7eb31af3a 100644 --- a/easybuild/easyblocks/p/pybind11.py +++ b/easybuild/easyblocks/p/pybind11.py @@ -57,14 +57,14 @@ def configure_step(self): self.log.info("Adding %s to configopts since it is not specified yet", configopt) self.cfg.update('configopts', configopt) - super(EB_pybind11, self).configure_step() + super().configure_step() def test_step(self): """Run pybind11 tests""" # run tests unless explicitly disabled if self.cfg['runtest'] is not False: self.cfg['runtest'] = 'check' - super(EB_pybind11, self).test_step() + super().test_step() def install_step(self): """Install with cmake install and pip install""" diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index c7723e73477..e62f77ced98 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -138,7 +138,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Constructor for Python easyblock.""" - super(EB_Python, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.pyshortver = '.'.join(self.version.split('.')[:2]) @@ -183,7 +183,7 @@ def patch_step(self, *args, **kwargs): * patch setup.py when --sysroot EasyBuild configuration setting is used """ - super(EB_Python, self).patch_step(*args, **kwargs) + super().patch_step(*args, **kwargs) if self.install_pip: # Ignore user site dir. -E ignores PYTHONNOUSERSITE, so we have to add -s @@ -435,7 +435,7 @@ def configure_step(self): # This matters e.g. when python installs the bundled pip & setuptools (for >= 3.4) env.setvar('PYTHONNOUSERSITE', '1') - super(EB_Python, self).configure_step() + super().configure_step() def build_step(self, *args, **kwargs): """Custom build procedure for Python, ensure stack size limit is set to 'unlimited' (if desired).""" @@ -476,7 +476,7 @@ def build_step(self, *args, **kwargs): print_warning(msg % (curr_ulimit_s, UNLIMITED, max_ulimit_s, max_ulimit_s)) self.cfg.update('prebuildopts', "ulimit -s %s && " % max_ulimit_s) - super(EB_Python, self).build_step(*args, **kwargs) + super().build_step(*args, **kwargs) @property def site_packages_path(self): @@ -490,7 +490,7 @@ def install_step(self): env.setvar('XDG_CACHE_HOME', tempfile.gettempdir()) self.log.info("Using %s as pip cache directory", os.environ['XDG_CACHE_HOME']) - super(EB_Python, self).install_step() + super().install_step() # Create non-versioned, relative symlinks for python, python-config and pip python_binary_path = os.path.join(self.installdir, 'bin', 'python') @@ -634,4 +634,4 @@ def sanity_check_step(self): else: raise EasyBuildError("Expected to find exactly one _tkinter*.so: %s", tkinter_so_hits) - super(EB_Python, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/p/pytorch.py b/easybuild/easyblocks/p/pytorch.py index 98bc1cc66f1..6e386d16ded 100755 --- a/easybuild/easyblocks/p/pytorch.py +++ b/easybuild/easyblocks/p/pytorch.py @@ -278,7 +278,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Constructor for PyTorch easyblock.""" - super(EB_PyTorch, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.options['modulename'] = 'torch' self.has_xml_test_reports = False @@ -304,7 +304,7 @@ def __init__(self, *args, **kwargs): def fetch_step(self, skip_checksums=False): """Fetch sources for installing PyTorch, including those for tests.""" - super(EB_PyTorch, self).fetch_step(skip_checksums) + super().fetch_step(skip_checksums) # Resolve tests early to avoid failures later. Use obtain_file if path is not absolute tests = [test if os.path.isabs(test) else self.obtain_file(test) for test in self.cfg['tests']] self.cfg['tests'] = tests @@ -357,7 +357,7 @@ def is_version_ok(version_range): def prepare_step(self, *args, **kwargs): """Make sure that versioned CMake alias exists""" - super(EB_PyTorch, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) # PyTorch preferes cmake3 over cmake which usually does not exist cmake_root = get_software_root('CMake') cmake_version = get_software_version('CMake') @@ -373,7 +373,7 @@ def prepare_step(self, *args, **kwargs): def configure_step(self): """Custom configure procedure for PyTorch.""" - super(EB_PyTorch, self).configure_step() + super().configure_step() pytorch_version = LooseVersion(self.version) @@ -614,7 +614,7 @@ def test_step(self): 'excluded_tests': ' '.join(excluded_tests) }) - parsed_test_result = super(EB_PyTorch, self).test_step(return_output_ec=True) + parsed_test_result = super().test_step(return_output_ec=True) if parsed_test_result is None: if self.cfg['runtest'] is False: msg = "Do not set 'runtest' to False, use --skip-test-step instead." @@ -767,7 +767,7 @@ def test_step(self): def test_cases_step(self): self._set_cache_dir() - super(EB_PyTorch, self).test_cases_step() + super().test_cases_step() def sanity_check_step(self, *args, **kwargs): """Custom sanity check for PyTorch""" @@ -783,7 +783,7 @@ def sanity_check_step(self, *args, **kwargs): fail_msg = 'found one or more downloaded dependencies: %s' % ', '.join(downloaded_deps) self.sanity_check_fail_msgs.append(fail_msg) - super(EB_PyTorch, self).sanity_check_step(*args, **kwargs) + super().sanity_check_step(*args, **kwargs) # ###################################### Code for parsing PyTorch Test XML files ###################################### diff --git a/easybuild/easyblocks/p/pyzmq.py b/easybuild/easyblocks/p/pyzmq.py index b0f18ebb0b8..43a652a47eb 100644 --- a/easybuild/easyblocks/p/pyzmq.py +++ b/easybuild/easyblocks/p/pyzmq.py @@ -48,4 +48,4 @@ def configure_step(self): else: self.log.info("External ZeroMQ not found, PyZMQ will (try to) use shipped ZeroMQ.") - super(EB_PyZMQ, self).configure_step() + super().configure_step() diff --git a/easybuild/easyblocks/q/qscintilla.py b/easybuild/easyblocks/q/qscintilla.py index b51e6e37669..5c683f3bb35 100644 --- a/easybuild/easyblocks/q/qscintilla.py +++ b/easybuild/easyblocks/q/qscintilla.py @@ -46,7 +46,7 @@ class EB_QScintilla(ConfigureMake): def prepare_step(self, *args, **kwargs): """Prepare build environment for building & installing QScintilla.""" - super(EB_QScintilla, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) pyqt5 = get_software_root('PyQt5') pyqt = get_software_root('PyQt') @@ -94,12 +94,12 @@ def build_step(self): # make sure that $CXXFLAGS is being passed down self.cfg.update('buildopts', r'CXXFLAGS="$CXXFLAGS \$(DEFINES)"') - super(EB_QScintilla, self).build_step() + super().build_step() def install_step(self): """Custom install procedure for QScintilla.""" - super(EB_QScintilla, self).install_step() + super().install_step() # also install Python bindings if Python is included as a dependency python = get_software_root('Python') @@ -157,8 +157,8 @@ def install_step(self): run_shell_cmd("python configure.py %s" % ' '.join(cfgopts)) - super(EB_QScintilla, self).build_step() - super(EB_QScintilla, self).install_step() + super().build_step() + super().install_step() target_dir = os.path.join(self.installdir, pylibdir) pyqt_pylibdir = os.path.join(self.pyqt_root, pylibdir) @@ -199,4 +199,4 @@ def sanity_check_step(self): ]) custom_commands.append("python -c 'import %s.Qsci'" % self.pyqt_pkg_name) - super(EB_QScintilla, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/q/qt.py b/easybuild/easyblocks/q/qt.py index e12fd4a30a5..9f94b76d7e8 100644 --- a/easybuild/easyblocks/q/qt.py +++ b/easybuild/easyblocks/q/qt.py @@ -175,7 +175,7 @@ def build_step(self): libdirs = [os.path.join(self.cfg['start_dir'], d, 'lib') for d in libdirs] self.cfg.update('prebuildopts', 'LD_LIBRARY_PATH=%s' % os.pathsep.join(libdirs + ['$LD_LIBRARY_PATH'])) - super(EB_Qt, self).build_step() + super().build_step() def sanity_check_step(self): """Custom sanity check for Qt.""" @@ -211,4 +211,4 @@ def sanity_check_step(self): if LooseVersion(self.version) >= LooseVersion('4'): custom_paths['files'].append('bin/xmlpatterns') - super(EB_Qt, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/q/quantumespresso.py b/easybuild/easyblocks/q/quantumespresso.py index f4a17e22eed..4664e7e6e12 100644 --- a/easybuild/easyblocks/q/quantumespresso.py +++ b/easybuild/easyblocks/q/quantumespresso.py @@ -74,7 +74,7 @@ def __getattribute__(self, name): def __init__(self, ec, *args, **kwargs): """Select the correct EB depending on version.""" - super(EB_QuantumESPRESSO, self).__init__(ec, *args, **kwargs) + super().__init__(ec, *args, **kwargs) if LooseVersion(self.version) < LooseVersion('7.3.1'): self.log.info('Using legacy easyblock for Quantum ESPRESSO') @@ -135,7 +135,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Add extra config options specific to Quantum ESPRESSO.""" - super(EB_QuantumESPRESSOcmake, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.install_subdir = 'qe-%s' % self.version @@ -344,7 +344,7 @@ def configure_step(self): ldflags += ' -Wl,--copy-dt-needed-entries ' env.setvar('LDFLAGS', ldflags) - super(EB_QuantumESPRESSOcmake, self).configure_step() + super().configure_step() def test_step(self): """ @@ -480,7 +480,7 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_QuantumESPRESSOcmake, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) # Legacy version of Quantum ESPRESSO easyblock # Do not update further @@ -527,13 +527,13 @@ def extra_options(): def __init__(self, *args, **kwargs): """Add extra config options specific to Quantum ESPRESSO.""" - super(EB_QuantumESPRESSOconfig, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.install_subdir = "qe-%s" % self.version def patch_step(self): """Patch files from build dir (not start dir).""" - super(EB_QuantumESPRESSOconfig, self).patch_step(beginpath=self.builddir) + super().patch_step(beginpath=self.builddir) def _add_compiler_flags(self, comp_fam): """Add compiler flags to the build.""" @@ -849,7 +849,7 @@ def configure_step(self): self._adjust_compiler_flags(comp_fam) - super(EB_QuantumESPRESSOconfig, self).configure_step() + super().configure_step() # always include -w to supress warnings self.dflags.append('-w') @@ -1300,7 +1300,7 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_QuantumESPRESSOconfig, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) EB_QuantumESPRESSOconfig = EB_QuantumESPRESSO.EB_QuantumESPRESSOconfig diff --git a/easybuild/easyblocks/r/r.py b/easybuild/easyblocks/r/r.py index 42e2e7f1281..2291d5e78a2 100644 --- a/easybuild/easyblocks/r/r.py +++ b/easybuild/easyblocks/r/r.py @@ -52,7 +52,7 @@ class EB_R(ConfigureMake): def __init__(self, *args, **kwargs): """Constructor for R easyblock.""" - super(EB_R, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) r_lib_subdirs = [os.path.join(libdir, 'R', 'lib') for libdir in SEARCH_PATH_LIB_DIRS] self.module_load_environment.LD_LIBRARY_PATH.extend(r_lib_subdirs) @@ -138,4 +138,4 @@ def sanity_check_step(self): [(os.path.join('lib64', 'R', f), os.path.join('lib', 'R', f)) for f in libfiles], 'dirs': [], } - super(EB_R, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/r/repeatmasker.py b/easybuild/easyblocks/r/repeatmasker.py index 98505d12732..58e695bba41 100644 --- a/easybuild/easyblocks/r/repeatmasker.py +++ b/easybuild/easyblocks/r/repeatmasker.py @@ -40,14 +40,14 @@ class EB_RepeatMasker(Tarball): def __init__(self, *args, **kwargs): """Easyblock constructor.""" - super(EB_RepeatMasker, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # custom path-like environment variables for RepeatMaskerConfig self.module_load_environment.PATH = [''] def install_step(self): """Custom install procedure for RepeatMasker.""" - super(EB_RepeatMasker, self).install_step() + super().install_step() # check for required dependencies perl_root = get_software_root('Perl') @@ -130,4 +130,4 @@ def sanity_check_step(self): custom_commands = ['RepeatMasker'] - super(EB_RepeatMasker, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/r/repeatmodeler.py b/easybuild/easyblocks/r/repeatmodeler.py index 24cb40433f0..03ff1e1084b 100644 --- a/easybuild/easyblocks/r/repeatmodeler.py +++ b/easybuild/easyblocks/r/repeatmodeler.py @@ -61,14 +61,14 @@ class EB_RepeatModeler(Tarball): def __init__(self, *args, **kwargs): """Easyblock constructor.""" - super(EB_RepeatModeler, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # custom path-like environment variables for RepeatModelerConfig self.module_load_environment.PATH = [''] def install_step(self): """Custom install procedure for RepeatModeler.""" - super(EB_RepeatModeler, self).install_step() + super().install_step() # Required dependencies, and bin path relative to software root required_deps = { @@ -187,7 +187,7 @@ def sanity_check_step(self): custom_commands = [("RepeatModeler -help 2>&1 | grep 'RepeatModeler - Model repetitive DNA'", '')] - super(EB_RepeatModeler, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) def make_module_step(self, *args, **kwargs): """Additional path-like environment variables that depend on installation files""" diff --git a/easybuild/easyblocks/r/reticulate.py b/easybuild/easyblocks/r/reticulate.py index a5d8fe32001..537acd513ee 100644 --- a/easybuild/easyblocks/r/reticulate.py +++ b/easybuild/easyblocks/r/reticulate.py @@ -39,7 +39,7 @@ class EB_reticulate(RPackage): def install_extension(self): """Add extra environment variables to modulefile""" - txt = super(EB_reticulate, self).install_extension() + txt = super().install_extension() if not txt: txt = "" diff --git a/easybuild/easyblocks/r/rmpi.py b/easybuild/easyblocks/r/rmpi.py index ddf8ee2ca3f..ff8baa4d43d 100644 --- a/easybuild/easyblocks/r/rmpi.py +++ b/easybuild/easyblocks/r/rmpi.py @@ -72,7 +72,7 @@ def install_extension(self): """ self.prepare_rmpi_configureargs() # it might be needed to get the R cmd and run it with mympirun... - super(EB_Rmpi, self).install_extension() + super().install_extension() def install_extension_async(self, *args, **kwargs): """ @@ -80,4 +80,4 @@ def install_extension_async(self, *args, **kwargs): """ self.prepare_rmpi_configureargs() # it might be needed to get the R cmd and run it with mympirun... - return super(EB_Rmpi, self).install_extension_async(*args, **kwargs) + return super().install_extension_async(*args, **kwargs) diff --git a/easybuild/easyblocks/r/root.py b/easybuild/easyblocks/r/root.py index b2b94eaabb7..4547d223b43 100644 --- a/easybuild/easyblocks/r/root.py +++ b/easybuild/easyblocks/r/root.py @@ -57,7 +57,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Easyblock constructor.""" - super(EB_ROOT, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # additional subdirectories specific to ROOT self.module_load_environment.LD_LIBRARY_PATH.append(os.path.join('lib', 'root')) @@ -151,10 +151,10 @@ def sanity_check_step(self): if get_software_root('Python'): custom_commands.append("python -c 'import ROOT'") - super(EB_ROOT, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) def make_module_extra(self): """Custom extra module file entries for ROOT.""" - txt = super(EB_ROOT, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('ROOTSYS', self.installdir) return txt diff --git a/easybuild/easyblocks/r/rosetta.py b/easybuild/easyblocks/r/rosetta.py index f628b878e59..104bd34af8d 100644 --- a/easybuild/easyblocks/r/rosetta.py +++ b/easybuild/easyblocks/r/rosetta.py @@ -51,14 +51,14 @@ class EB_Rosetta(EasyBlock): def __init__(self, *args, **kwargs): """Add extra config options specific to Rosetta.""" - super(EB_Rosetta, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.srcdir = None self.cxx = None def extract_step(self): """Extract sources, if they haven't been already.""" - super(EB_Rosetta, self).extract_step() + super().extract_step() # locate sources, and unpack if necessary # old 'bundles' tarballs contain a gzipped tarball for source, recent ones contain unpacked source try: @@ -260,7 +260,7 @@ def extract_and_copy(dirname_tmpl, optional=False, symlinks=False): def make_module_extra(self): """Define extra environment variables specific to Rosetta.""" - txt = super(EB_Rosetta, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('ROSETTA3_DB', os.path.join(self.installdir, 'database')) return txt @@ -282,4 +282,4 @@ def sanity_check_step(self): 'files': ["bin/%s.%slinux%srelease" % (x, infix, self.cxx) for x in binaries], 'dirs': [], } - super(EB_Rosetta, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/r/rserve.py b/easybuild/easyblocks/r/rserve.py index 30a29871fc1..5bc778069c6 100644 --- a/easybuild/easyblocks/r/rserve.py +++ b/easybuild/easyblocks/r/rserve.py @@ -40,9 +40,9 @@ class EB_Rserve(RPackage): def install_extension(self): """Set LIBS environment variable correctly prior to building.""" self.configurevars = ['LIBS="$LIBS -lpthread"'] - super(EB_Rserve, self).install_extension() + super().install_extension() def install_extension_async(self, *args, **kwargs): """Set LIBS environment variable correctly prior to building.""" self.configurevars = ['LIBS="$LIBS -lpthread"'] - return super(EB_Rserve, self).install_extension_async(*args, **kwargs) + return super().install_extension_async(*args, **kwargs) diff --git a/easybuild/easyblocks/r/ruby.py b/easybuild/easyblocks/r/ruby.py index 48b39a9ac2b..338ec7956c5 100644 --- a/easybuild/easyblocks/r/ruby.py +++ b/easybuild/easyblocks/r/ruby.py @@ -48,7 +48,7 @@ def configure_step(self): """Updates configure options for the Ruby base install""" self.cfg.update('configopts', "--disable-install-doc --enable-shared") - super(EB_Ruby, self).configure_step() + super().configure_step() def sanity_check_step(self): """Custom sanity check for Ruby gems""" @@ -58,4 +58,4 @@ def sanity_check_step(self): 'lib/libruby.%s' % get_shared_lib_ext()], 'dirs': ['include/ruby-%s.0' % majver, 'lib/pkgconfig', 'lib/ruby/%s.0' % majver, 'lib/ruby/gems'], } - return super(EB_Ruby, self).sanity_check_step(custom_paths=custom_paths) + return super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/r/rust.py b/easybuild/easyblocks/r/rust.py index e8586cf981d..229dc13bed8 100644 --- a/easybuild/easyblocks/r/rust.py +++ b/easybuild/easyblocks/r/rust.py @@ -47,7 +47,7 @@ class EB_Rust(ConfigureMake): def __init__(self, *args, **kwargs): """Custom easyblock constructor for Rust.""" - super(EB_Rust, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # see https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#what-is-xpy # note: ConfigureMake.build_step automatically adds '-j ' @@ -107,7 +107,7 @@ def configure_step(self): if 'Ninja' not in build_dep_names: self.cfg.update('configopts', "--set=llvm.ninja=false") - super(EB_Rust, self).configure_step() + super().configure_step() # avoid failure when home directory is an NFS mount, # see https://github.com/rust-lang/cargo/issues/6652 @@ -117,7 +117,7 @@ def configure_step(self): def install_step(self): """Custom install step for Rust""" - super(EB_Rust, self).install_step() + super().install_step() if build_option('rpath'): self._convert_runpaths_to_rpaths() @@ -134,4 +134,4 @@ def sanity_check_step(self): "cargo --version", "rustc --version", ] - return super(EB_Rust, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + return super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/s/samtools.py b/easybuild/easyblocks/s/samtools.py index 3e83da067a3..6fd864ddf0b 100644 --- a/easybuild/easyblocks/s/samtools.py +++ b/easybuild/easyblocks/s/samtools.py @@ -37,7 +37,7 @@ class EB_SAMtools(ConfigureMake): def __init__(self, *args, **kwargs): """Define lists of files to install.""" - super(EB_SAMtools, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.bin_files = ["misc/blast2sam.pl", "misc/bowtie2sam.pl", "misc/export2sam.pl", "misc/interpolate_sam.pl", @@ -94,7 +94,7 @@ def configure_step(self): # configuring with --prefix only supported with v1.3 and more recent if LooseVersion(self.version) >= LooseVersion('1.3'): - super(EB_SAMtools, self).configure_step() + super().configure_step() def install_step(self): """ @@ -133,7 +133,7 @@ def install_step(self): # v1.3 and more recent supports 'make install', but this only installs (some of) the binaries... if LooseVersion(self.version) >= LooseVersion('1.3'): - super(EB_SAMtools, self).install_step() + super().install_step() # figure out which bin files are missing, and try copying them missing_bin_files = [] @@ -173,4 +173,4 @@ def sanity_check_step(self): 'files': bins + incs + libs, 'dirs': [os.path.join('include', os.path.basename(d)) for d in self.include_dirs], } - super(EB_SAMtools, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 9e58568cdf4..4c84fd69fac 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -59,7 +59,7 @@ class EB_ScaLAPACK(CMakeMake): def __init__(self, *args, **kwargs): """Constructor of ScaLAPACK easyblock.""" - super(EB_ScaLAPACK, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.loosever = LooseVersion(self.version) @@ -72,7 +72,7 @@ def configure_step(self): # use CMake for recent versions, but only if CMake is listed as a build dep if self.use_cmake: - super(EB_ScaLAPACK, self).configure_step() + super().configure_step() else: src = os.path.join(self.cfg['start_dir'], 'SLmake.inc.example') dest = os.path.join(self.cfg['start_dir'], 'SLmake.inc') @@ -196,13 +196,13 @@ def build_step(self): if not self.use_cmake: self.build_libscalapack_make() - super(EB_ScaLAPACK, self).build_step() + super().build_step() def install_step(self): """Install by copying files to install dir.""" if self.use_cmake: - super(EB_ScaLAPACK, self).install_step() + super().install_step() else: # 'manually' install ScaLAPACK by copying headers and libraries if we're not using CMake path_info = [ @@ -222,7 +222,7 @@ def banned_linked_shared_libs(self): """ List of shared libraries which are not allowed to be linked in any installed binary/library. """ - res = super(EB_ScaLAPACK, self).banned_linked_shared_libs() + res = super().banned_linked_shared_libs() # register FlexiBLAS backends as banned libraries, # ScaLAPACK should not be linking to those directly @@ -239,4 +239,4 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_ScaLAPACK, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/s/scipion.py b/easybuild/easyblocks/s/scipion.py index dce04dbea2a..5760ad5339d 100644 --- a/easybuild/easyblocks/s/scipion.py +++ b/easybuild/easyblocks/s/scipion.py @@ -44,7 +44,7 @@ class EB_Scipion(ExtensionEasyBlock): def __init__(self, *args, **kwargs): """Initialize Scipion-specific variables.""" - super(EB_Scipion, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # strip off 'scipion-*' part to avoid having everything in a subdirectory self.unpack_options = '--strip-components=1' @@ -185,7 +185,7 @@ def install_extension(self, *args, **kwargs): """Perform the actual Scipion package configure/installation procedure""" # The ExtensionEasyBlock run does unpack and patch - super(EB_Scipion, self).install_extension(unpack_src=True) + super().install_extension(unpack_src=True) self.builddir = self.ext_dir # configure, build, install @@ -200,4 +200,4 @@ def sanity_check_step(self): 'files': [os.path.join('bin', 'scipion')], 'dirs': ['config', 'data', 'pyworkflow', 'software'], } - return super(EB_Scipion, self).sanity_check_step(custom_paths=custom_paths) + return super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/s/score_p.py b/easybuild/easyblocks/s/score_p.py index 6d7072961ef..3948df03eb8 100644 --- a/easybuild/easyblocks/s/score_p.py +++ b/easybuild/easyblocks/s/score_p.py @@ -189,4 +189,4 @@ def configure_step(self, *args, **kwargs): pass self.cfg.update('configopts', configure_opt) - super(EB_Score_minus_P, self).configure_step(*args, **kwargs) + super().configure_step(*args, **kwargs) diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index c6adf2989d6..53812ca26aa 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -171,4 +171,4 @@ def sanity_check_step(self): # (for '5.1.12b_esmumps', check with 'version 5.1.12') custom_commands.append("acpl -V 2>&1 | grep 'version %s'" % self.version.split('_')[0].strip('ab')) - super(EB_SCOTCH, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/s/sepp.py b/easybuild/easyblocks/s/sepp.py index 9c4d721bb0b..48e1cc0573c 100644 --- a/easybuild/easyblocks/s/sepp.py +++ b/easybuild/easyblocks/s/sepp.py @@ -38,7 +38,7 @@ class EB_SEPP(PythonPackage): def configure_step(self, *args, **kwargs): """Configure SEPP using setup.py.""" - super(EB_SEPP, self).configure_step(*args, **kwargs) + super().configure_step(*args, **kwargs) # Configure sepp run_shell_cmd("python setup.py config -c") @@ -49,7 +49,7 @@ def install_step(self, *args, **kwargs): home.path - file specifying path to SEPP config dir (.sepp) main.config - SEPP configuration file """ - super(EB_SEPP, self).install_step(*args, **kwargs) + super().install_step(*args, **kwargs) python_site_packages_dir = os.path.join(self.installdir, self.pylibdir) @@ -86,4 +86,4 @@ def sanity_check_step(self): } custom_commands = ["%s --help" % s for s in scripts] - super(EB_SEPP, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/s/siesta.py b/easybuild/easyblocks/s/siesta.py index 3fb167f1cb9..40d6f444678 100644 --- a/easybuild/easyblocks/s/siesta.py +++ b/easybuild/easyblocks/s/siesta.py @@ -151,7 +151,7 @@ def configure_step(self): self.cfg.update('configopts', '--with-netcdf=-lnetcdff') # Configure is run in obj_dir, configure script is in ../Src - super(EB_Siesta, self).configure_step(cmd_prefix='../Src/') + super().configure_step(cmd_prefix='../Src/') if loose_ver > LooseVersion('4.0'): regex_subs_Makefile = [ @@ -446,7 +446,7 @@ def build_step(self): def test_step(self): """Custom test step for Siesta.""" change_dir(os.path.join(self.cfg['start_dir'], 'Obj', 'Tests')) - super(EB_Siesta, self).test_step() + super().test_step() def install_step(self): """Custom install procedure for Siesta: copy binaries.""" @@ -476,4 +476,4 @@ def sanity_check_step(self): mpi_test_cmd = mpi_test_cmd + "echo 'SystemName test' | mpirun -np 2 siesta 2>/dev/null | grep PARALLEL" custom_commands.append(mpi_test_cmd) - super(EB_Siesta, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/s/slepc.py b/easybuild/easyblocks/s/slepc.py index 1f663c1a43e..2af3f04ff74 100644 --- a/easybuild/easyblocks/s/slepc.py +++ b/easybuild/easyblocks/s/slepc.py @@ -57,14 +57,14 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize SLEPc custom variables.""" - super(EB_SLEPc, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if self.cfg['sourceinstall']: self.build_in_installdir = True def prepare_step(self, *args, **kwargs): """Prepare build environment.""" - super(EB_SLEPc, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) # PETSc installed in 'sourceinstall' mode defines $PETSC_ARCH self.petsc_arch = os.environ.get('PETSC_ARCH', '') @@ -120,7 +120,7 @@ def configure_step(self): # regular './configure --prefix=X' for non-source install # make sure old install dir is removed first self.make_installdir(dontcreate=True) - out = super(EB_SLEPc, self).configure_step() + out = super().configure_step() # check for errors in configure error_regexp = re.compile("ERROR") @@ -136,11 +136,11 @@ def install_step(self): Install using make install (for non-source installations) """ if not self.cfg['sourceinstall']: - super(EB_SLEPc, self).install_step() + super().install_step() def make_module_extra(self): """Set SLEPc specific environment variables (SLEPC_DIR).""" - txt = super(EB_SLEPc, self).make_module_extra() + txt = super().make_module_extra() if self.cfg['sourceinstall']: subdir = '%s-%s' % (self.name.lower(), self.version) @@ -161,4 +161,4 @@ def sanity_check_step(self): os.path.join(self.slepc_subdir, 'lib', 'slepc', 'conf'), ], } - super(EB_SLEPc, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/s/star_ccm.py b/easybuild/easyblocks/s/star_ccm.py index 8cb3b13949a..84198612fd9 100644 --- a/easybuild/easyblocks/s/star_ccm.py +++ b/easybuild/easyblocks/s/star_ccm.py @@ -42,7 +42,7 @@ class EB_STAR_minus_CCM_plus_(EasyBlock): def __init__(self, *args, **kwargs): """Initialise STAR-CCM+ easyblock.""" - super(EB_STAR_minus_CCM_plus_, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.starccm_subdir = None self.starview_subdir = None @@ -115,14 +115,14 @@ def sanity_check_step(self): os.path.join(self.installdir, self.starview_subdir, 'bin', 'starview+')], 'dirs': [], } - super(EB_STAR_minus_CCM_plus_, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Extra statements specific to STAR-CCM+ to include in generated module file.""" if self.starccm_subdir is None or self.starview_subdir is None: self.find_starccm_subdirs() - txt = super(EB_STAR_minus_CCM_plus_, self).make_module_extra() + txt = super().make_module_extra() bin_dirs = [ os.path.join(self.starccm_subdir, 'star', 'bin'), diff --git a/easybuild/easyblocks/s/stata.py b/easybuild/easyblocks/s/stata.py index dffa8b86684..233da6e5b65 100644 --- a/easybuild/easyblocks/s/stata.py +++ b/easybuild/easyblocks/s/stata.py @@ -67,7 +67,7 @@ def sanity_check_step(self): 'files': ['stata', 'xstata'], 'dirs': [], } - super(EB_Stata, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) # make sure required libpng library is there for Stata # Stata depends on a very old version of libpng, so we need to provide it diff --git a/easybuild/easyblocks/s/suitesparse.py b/easybuild/easyblocks/s/suitesparse.py index 160e1f37a5b..d3a8802cdc4 100644 --- a/easybuild/easyblocks/s/suitesparse.py +++ b/easybuild/easyblocks/s/suitesparse.py @@ -61,7 +61,7 @@ def extra_options(extra_vars=None): def __init__(self, *args, **kwargs): """Custom constructor for SuiteSparse easyblock, initialize custom class parameters.""" - super(EB_SuiteSparse, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.config_name = 'UNKNOWN' def configure_step(self): @@ -212,7 +212,7 @@ def install_step(self): mkdir(os.path.join(self.installdir, 'lib')) mkdir(os.path.join(self.installdir, 'include')) - super(EB_SuiteSparse, self).install_step() + super().install_step() def sanity_check_step(self): """Custom sanity check for SuiteSparse.""" @@ -235,4 +235,4 @@ def sanity_check_step(self): 'dirs': [], } - super(EB_SuiteSparse, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/s/superlu.py b/easybuild/easyblocks/s/superlu.py index 86e338bcab7..cb9ae3e749d 100644 --- a/easybuild/easyblocks/s/superlu.py +++ b/easybuild/easyblocks/s/superlu.py @@ -52,7 +52,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Constructor for SuperLU easyblock.""" - super(EB_SuperLU, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # if self.lib_ext is not set by CMakeMake, fall back to .a (static libraries by default) self.lib_ext = self.lib_ext or 'a' @@ -118,7 +118,7 @@ def configure_step(self): # This BLAS library is not supported yet raise EasyBuildError("BLAS library '%s' is not supported yet", toolchain_blas) - super(EB_SuperLU, self).configure_step() + super().configure_step() def test_step(self): """ @@ -126,13 +126,13 @@ def test_step(self): """ if self.cfg['runtest'] is None: self.cfg['runtest'] = 'test' - super(EB_SuperLU, self).test_step() + super().test_step() def install_step(self): """ Custom install procedure for SuperLU """ - super(EB_SuperLU, self).install_step() + super().install_step() libbits = 'lib' if not os.path.exists(os.path.join(self.installdir, libbits)): @@ -159,4 +159,4 @@ def sanity_check_step(self): 'files': ["include/supermatrix.h", os.path.join('lib', 'libsuperlu.%s' % self.lib_ext)], 'dirs': [], } - super(EB_SuperLU, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/s/swig.py b/easybuild/easyblocks/s/swig.py index bb24f1030d4..04b95d66fd1 100644 --- a/easybuild/easyblocks/s/swig.py +++ b/easybuild/easyblocks/s/swig.py @@ -49,7 +49,7 @@ def configure_step(self): else: self.cfg.update('configopts', '--without-python') - super(EB_SWIG, self).configure_step() + super().configure_step() def sanity_check_step(self): """Custom sanity check for SWIG.""" @@ -58,4 +58,4 @@ def sanity_check_step(self): 'files': ['bin/ccache-swig', 'bin/swig'], 'dirs': [], } - super(EB_SWIG, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/s/sympy.py b/easybuild/easyblocks/s/sympy.py index 56d84bb0bd7..14220a12cca 100644 --- a/easybuild/easyblocks/s/sympy.py +++ b/easybuild/easyblocks/s/sympy.py @@ -51,7 +51,7 @@ def test_step(self): msg += "to avoid failing tests due to the temporary directory being a symlinked path..." self.log.info(msg) - super(EB_sympy, self).test_step(self) + super().test_step(self) # restore original temporary directory tempfile.tempdir = original_tmpdir @@ -69,4 +69,4 @@ def sanity_check_step(self, *args, **kwargs): custom_commands = ["isympy --help"] - return super(EB_sympy, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + return super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index c606da8565f..e3703665e56 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -84,7 +84,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for tbb""" - super(EB_tbb, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if LooseVersion(self.version) < LooseVersion('2020'): raise EasyBuildError( @@ -117,7 +117,7 @@ def extract_step(self): if not self.toolchain.is_system_toolchain(): # strip off 'tbb-' subdirectory self.cfg['unpack_options'] = "--strip-components=1" - super(EB_tbb, self).extract_step() + super().extract_step() def configure_step(self): """Configure TBB build/installation.""" @@ -222,11 +222,11 @@ def sanity_check_step(self): custom_paths['dirs'].append(os.path.join(self.tbb_subdir, 'python')) custom_commands.extend(['python -c "import tbb"']) - super(EB_tbb, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH. and intel license file""" - txt = super(EB_tbb, self).make_module_extra() + txt = super().make_module_extra() if self.toolchain.is_system_toolchain(): txt += self.module_generator.prepend_paths('CPATH', [os.path.join(self.tbb_subdir, 'include')]) diff --git a/easybuild/easyblocks/t/tensorflow.py b/easybuild/easyblocks/t/tensorflow.py index 67b1e7ee5c0..0b914f5fc28 100644 --- a/easybuild/easyblocks/t/tensorflow.py +++ b/easybuild/easyblocks/t/tensorflow.py @@ -251,7 +251,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize TensorFlow easyblock.""" - super(EB_TensorFlow, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) with self.cfg.disable_templating(): self.cfg['exts_defaultclass'] = 'PythonPackage' @@ -1195,7 +1195,7 @@ def sanity_check_step(self): # tf_should_use importsweakref.finalize, which requires backports.weakref for Python < 3.4 "%s -c 'from tensorflow.python.util import tf_should_use'" % self.python_cmd, ] - res = super(EB_TensorFlow, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + res = super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) # test installation using MNIST tutorial examples if self.cfg['runtest']: diff --git a/easybuild/easyblocks/t/tensorflow_compression.py b/easybuild/easyblocks/t/tensorflow_compression.py index 436f1b03cf8..0f580ec6f73 100644 --- a/easybuild/easyblocks/t/tensorflow_compression.py +++ b/easybuild/easyblocks/t/tensorflow_compression.py @@ -157,4 +157,4 @@ def install_step(self): if len(whl_paths) == 1: self.cfg['install_src'] = whl_paths[0] - super(EB_tensorflow_minus_compression, self).install_step() + super().install_step() diff --git a/easybuild/easyblocks/t/tensorrt.py b/easybuild/easyblocks/t/tensorrt.py index fe7f5dd8bf5..b155e8a3647 100644 --- a/easybuild/easyblocks/t/tensorrt.py +++ b/easybuild/easyblocks/t/tensorrt.py @@ -58,7 +58,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize TensorRT easyblock.""" - super(EB_TensorRT, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # Setup for the Binary easyblock self.cfg['extract_sources'] = True @@ -88,7 +88,7 @@ def install_step(self): def extensions_step(self): """Custom extensions procedure for TensorRT.""" - super(EB_TensorRT, self).extensions_step() + super().extensions_step() pyver = ''.join(get_software_version('Python').split('.')[:2]) whls = [ @@ -131,6 +131,6 @@ def sanity_check_step(self): custom_commands = ["%s -c 'import tensorrt'" % self.python_cmd] - res = super(EB_TensorRT, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + res = super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) return res diff --git a/easybuild/easyblocks/t/tinker.py b/easybuild/easyblocks/t/tinker.py index 2235524cce2..72df4e5d1a1 100644 --- a/easybuild/easyblocks/t/tinker.py +++ b/easybuild/easyblocks/t/tinker.py @@ -47,7 +47,7 @@ class EB_TINKER(EasyBlock): def __init__(self, *args, **kwargs): """Custom easyblock constructor for TINKER: initialise class variables.""" - super(EB_TINKER, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.build_subdir = None self.build_in_installdir = True @@ -150,4 +150,4 @@ def sanity_check_step(self): 'files': ['tinker/source/libtinker.a'], 'dirs': ['tinker/bin'], } - super(EB_TINKER, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/t/tkinter.py b/easybuild/easyblocks/t/tkinter.py index 62ae65322a8..96b1ebd42b1 100644 --- a/easybuild/easyblocks/t/tkinter.py +++ b/easybuild/easyblocks/t/tkinter.py @@ -61,7 +61,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Initialize Tkinter-specific variables.""" - super(EB_Tkinter, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.tkinter_so_basename = None def configure_step(self): @@ -78,11 +78,11 @@ def configure_step(self): # Use a temporary install directory, as we only want the Tkinter part of the full install. self.orig_installdir = self.installdir self.installdir = tempfile.mkdtemp(dir=self.builddir) - super(EB_Tkinter, self).configure_step() + super().configure_step() def install_step(self): """Install python but only keep the bits we need""" - super(EB_Tkinter, self).install_step() + super().install_step() if LooseVersion(self.version) >= LooseVersion('3'): tklibdir = "tkinter" @@ -133,4 +133,4 @@ def sanity_check_step(self): 'files': [os.path.join(det_pylibdir(), self.tkinter_so_basename)], 'dirs': ['lib'] } - super(EB_Python, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) diff --git a/easybuild/easyblocks/t/torchvision.py b/easybuild/easyblocks/t/torchvision.py index 667d3a07e41..297bb350db5 100644 --- a/easybuild/easyblocks/t/torchvision.py +++ b/easybuild/easyblocks/t/torchvision.py @@ -42,7 +42,7 @@ class EB_torchvision(PythonPackage): def __init__(self, *args, **kwargs): """Initialize torchvision easyblock.""" - super(EB_torchvision, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) dep_names = set(dep['name'] for dep in self.cfg.dependencies()) @@ -75,7 +75,7 @@ def configure_step(self): if libjpeg_root and 'TORCHVISION_INCLUDE' not in self.cfg['preinstallopts']: env.setvar('TORCHVISION_INCLUDE', os.path.join(libjpeg_root, 'include')) - super(EB_torchvision, self).configure_step() + super().configure_step() def sanity_check_step(self): """Custom sanity check for torchvision.""" @@ -114,4 +114,4 @@ def sanity_check_step(self): ]) custom_commands.append('python -c "%s"' % python_code) - return super(EB_torchvision, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + return super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) diff --git a/easybuild/easyblocks/t/tornado.py b/easybuild/easyblocks/t/tornado.py index 1ade72c987d..8b171344e76 100644 --- a/easybuild/easyblocks/t/tornado.py +++ b/easybuild/easyblocks/t/tornado.py @@ -40,12 +40,12 @@ def sanity_check_step(self): 'files': [], 'dirs': ["Tornado/bin/linux/", "ThirdParty/bin/linux/"], } - super(EB_Tornado, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Add correct path to lib to LD_LIBRARY_PATH.""" - txt = super(EB_Tornado, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.prepend_paths('LD_LIBRARY_PATH', ["Tornado/bin/linux/", "ThirdParty/bin/linux/"]) txt += self.module_generator.prepend_paths('PATH', ["Tornado/bin/linux/"]) diff --git a/easybuild/easyblocks/t/trilinos.py b/easybuild/easyblocks/t/trilinos.py index 53366a6567c..4b5e5f3b9dd 100644 --- a/easybuild/easyblocks/t/trilinos.py +++ b/easybuild/easyblocks/t/trilinos.py @@ -64,7 +64,7 @@ def extra_options(): def __init__(self, *args, **kwargs): """Constructor of custom easyblock for Trilinos.""" - super(EB_Trilinos, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) if self.cfg['shared_libs'] is not None: self.log.deprecated("Use 'build_shared_libs' instead of 'shared_libs' easyconfig parameter", '5.0') @@ -254,11 +254,11 @@ def configure_step(self): symlink(obj_dir, short_build_dir) # configure using cmake - super(EB_Trilinos, self).configure_step(srcdir=short_src_dir, builddir=short_build_dir) + super().configure_step(srcdir=short_src_dir, builddir=short_build_dir) def build_step(self): """Build with make (verbose logging enabled).""" - super(EB_Trilinos, self).build_step(verbose=True) + super().build_step(verbose=True) def sanity_check_step(self): """Custom sanity check for Trilinos.""" @@ -307,7 +307,7 @@ def sanity_check_step(self): 'dirs': ['bin', 'include'] } - super(EB_Trilinos, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def cleanup_step(self): """Complete cleanup by also removing custom created short build directory.""" diff --git a/easybuild/easyblocks/t/trinity.py b/easybuild/easyblocks/t/trinity.py index 08977eebb4d..ca098de6b9b 100644 --- a/easybuild/easyblocks/t/trinity.py +++ b/easybuild/easyblocks/t/trinity.py @@ -363,4 +363,4 @@ def sanity_check_step(self): custom_commands = ["Trinity --version | grep 'Trinity version'"] - super(EB_Trinity, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) diff --git a/easybuild/easyblocks/u/ucx_plugins.py b/easybuild/easyblocks/u/ucx_plugins.py index 6d734e59d82..0876e238c2d 100644 --- a/easybuild/easyblocks/u/ucx_plugins.py +++ b/easybuild/easyblocks/u/ucx_plugins.py @@ -44,7 +44,7 @@ class EB_UCX_Plugins(ConfigureMake): def __init__(self, *args, **kwargs): """Custom initialization for UCX-Plugins.""" - super(EB_UCX_Plugins, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self._plugins = None self.makefile_dirs = [] @@ -101,7 +101,7 @@ def configure_step(self): self.cfg.update('configopts', configopts) - super(EB_UCX_Plugins, self).configure_step() + super().configure_step() def build_step(self): """Build plugins""" @@ -115,7 +115,7 @@ def install_step(self): def make_module_extra(self, *args, **kwargs): """Add extra statements to generated module file specific to UCX plugins""" - txt = super(EB_UCX_Plugins, self).make_module_extra(*args, **kwargs) + txt = super().make_module_extra(*args, **kwargs) base_conf = dict() cmd = ['ucx_info', '-b'] @@ -161,4 +161,4 @@ def sanity_check_step(self): 'dirs': [], } - super(EB_UCX_Plugins, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) diff --git a/easybuild/easyblocks/v/velvet.py b/easybuild/easyblocks/v/velvet.py index 5d041ac7825..4c77ae84b90 100644 --- a/easybuild/easyblocks/v/velvet.py +++ b/easybuild/easyblocks/v/velvet.py @@ -60,4 +60,4 @@ def sanity_check_step(self): 'dirs': [] } - super(EB_Velvet, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/v/vep.py b/easybuild/easyblocks/v/vep.py index 46a05bb5305..abb5b1b23f2 100644 --- a/easybuild/easyblocks/v/vep.py +++ b/easybuild/easyblocks/v/vep.py @@ -42,7 +42,7 @@ class EB_VEP(EasyBlock): def __init__(self, *args, **kwargs): """VEP easyblock constructor.""" - super(EB_VEP, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.build_in_installdir = True self.cfg['unpack_options'] = "--strip-components=1" @@ -145,7 +145,7 @@ def sanity_check_step(self): custom_commands = ['vep --help'] - super(EB_VEP, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_step(self, *args, **kwargs): """Custom guesses for environment variables (PATH, ...) for VEP.""" @@ -159,4 +159,4 @@ def make_module_step(self, *args, **kwargs): self.module_load_environment.PATH = '' setattr(self.module_load_environment, f'PERL{perl_majver}LIB', perl_libpath) - return super(EB_VEP, self).make_module_step(*args, **kwargs) + return super().make_module_step(*args, **kwargs) diff --git a/easybuild/easyblocks/v/vmd.py b/easybuild/easyblocks/v/vmd.py index ef99a5531f3..d79bced95ba 100644 --- a/easybuild/easyblocks/v/vmd.py +++ b/easybuild/easyblocks/v/vmd.py @@ -47,7 +47,7 @@ class EB_VMD(ConfigureMake): def __init__(self, *args, **kwargs): """Initialize VMD-specific variables.""" - super(EB_VMD, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # source tarballs contains a 'plugins' and 'vmd-' directory self.vmddir = os.path.join(self.builddir, '%s-%s' % (self.name.lower(), self.version)) self.surf_dir = os.path.join(self.vmddir, 'lib', 'surf') @@ -55,7 +55,7 @@ def __init__(self, *args, **kwargs): def extract_step(self): """Custom extract step for VMD.""" - super(EB_VMD, self).extract_step() + super().extract_step() if LooseVersion(self.version) >= LooseVersion("1.9.3"): change_dir(self.surf_dir) @@ -196,7 +196,7 @@ def configure_step(self): def build_step(self): """Custom build step for VMD.""" - super(EB_VMD, self).build_step() + super().build_step() self.have_stride = False # Build Surf, which is part of VMD as of VMD version 1.9.3 @@ -218,7 +218,7 @@ def install_step(self): # Install must also be done in 'src' subdir change_dir(os.path.join(self.vmddir, 'src')) - super(EB_VMD, self).install_step() + super().install_step() if LooseVersion(self.version) >= LooseVersion("1.9.3"): surf_bin = os.path.join(self.surf_dir, 'surf') @@ -233,4 +233,4 @@ def sanity_check_step(self): 'files': ['bin/vmd'], 'dirs': ['lib'], } - super(EB_VMD, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/v/vtune.py b/easybuild/easyblocks/v/vtune.py index d39d46c128e..9bb0abf4056 100644 --- a/easybuild/easyblocks/v/vtune.py +++ b/easybuild/easyblocks/v/vtune.py @@ -43,7 +43,7 @@ class EB_VTune(IntelBase): def __init__(self, *args, **kwargs): """Easyblock constructor; define class variables.""" - super(EB_VTune, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) # recent versions of VTune are installed to a subdirectory self.subdir = '' @@ -66,11 +66,11 @@ def __init__(self, *args, **kwargs): def prepare_step(self, *args, **kwargs): """Since 2019u3 there is no license required.""" kwargs['requires_runtime_license'] = False - super(EB_VTune, self).prepare_step(*args, **kwargs) + super().prepare_step(*args, **kwargs) def make_installdir(self): """Do not create installation directory, install script handles that already.""" - super(EB_VTune, self).make_installdir(dontcreate=True) + super().make_installdir(dontcreate=True) def sanity_check_step(self): """Custom sanity check paths for VTune.""" @@ -78,4 +78,4 @@ def sanity_check_step(self): custom_paths = self.get_custom_paths_tools(binaries) custom_commands = ['vtune --version'] - super(EB_VTune, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) diff --git a/easybuild/easyblocks/w/wien2k.py b/easybuild/easyblocks/w/wien2k.py index 723a676dd29..8563098d848 100644 --- a/easybuild/easyblocks/w/wien2k.py +++ b/easybuild/easyblocks/w/wien2k.py @@ -57,7 +57,7 @@ class EB_WIEN2k(EasyBlock): def __init__(self, *args, **kwargs): """Enable building in install dir.""" - super(EB_WIEN2k, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.build_in_installdir = True @staticmethod @@ -81,7 +81,7 @@ def extra_options(): def extract_step(self): """Unpack WIEN2k sources using gunzip and provided expand_lapw script.""" - super(EB_WIEN2k, self).extract_step() + super().extract_step() run_shell_cmd("gunzip *gz") @@ -582,12 +582,12 @@ def sanity_check_step(self): 'dirs': [], } - super(EB_WIEN2k, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Set WIENROOT environment variable, and correctly prepend PATH.""" - txt = super(EB_WIEN2k, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment("WIENROOT", self.installdir) txt += self.module_generator.prepend_paths("PATH", [""]) diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 1e0ffc2f9de..25316f3241d 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -57,7 +57,7 @@ class EB_WPS(EasyBlock): def __init__(self, *args, **kwargs): """Add extra config options specific to WPS.""" - super(EB_WPS, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.build_in_installdir = True self.comp_fam = None @@ -390,11 +390,11 @@ def sanity_check_step(self): 'files': [os.path.join(self.wps_subdir, x) for x in ['geogrid.exe', 'metgrid.exe', 'ungrib.exe']], 'dirs': [], } - super(EB_WPS, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Add netCDF environment variables to module file.""" - txt = super(EB_WPS, self).make_module_extra() + txt = super().make_module_extra() for var in ['NETCDF', 'NETCDFF']: # check whether value is defined for compatibility with --module-only if os.getenv(var) is not None: diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index 77f6c1b2d33..48f0b553334 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -69,7 +69,7 @@ class EB_WRF(EasyBlock): def __init__(self, *args, **kwargs): """Add extra config options specific to WRF.""" - super(EB_WRF, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.build_in_installdir = True self.comp_fam = None @@ -430,11 +430,11 @@ def sanity_check_step(self): 'dirs': [os.path.join(self.wrfsubdir, d) for d in ['main', 'run']], } - super(EB_WRF, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Add netCDF environment variables to module file.""" - txt = super(EB_WRF, self).make_module_extra() + txt = super().make_module_extra() for netcdf_var in ['NETCDF', 'NETCDFF']: if os.getenv(netcdf_var) is not None: txt += self.module_generator.set_environment(netcdf_var, os.getenv(netcdf_var)) diff --git a/easybuild/easyblocks/w/wxpython.py b/easybuild/easyblocks/w/wxpython.py index 0901edbe16e..c2fac539cd8 100644 --- a/easybuild/easyblocks/w/wxpython.py +++ b/easybuild/easyblocks/w/wxpython.py @@ -165,11 +165,11 @@ def sanity_check_step(self): # also test importing wx.lib.wxcairo custom_commands = [(self.python_cmd, '-c "import wx.lib.wxcairo"')] - return super(EB_wxPython, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) + return super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) def make_module_extra(self): """Custom update for $PYTHONPATH for wxPython.""" - txt = super(EB_wxPython, self).make_module_extra() + txt = super().make_module_extra() if LooseVersion(self.version) < LooseVersion("4"): # make sure that correct subdir is also included to $PYTHONPATH diff --git a/easybuild/easyblocks/x/xalt.py b/easybuild/easyblocks/x/xalt.py index 06e9defaf3f..ec48d44e48a 100644 --- a/easybuild/easyblocks/x/xalt.py +++ b/easybuild/easyblocks/x/xalt.py @@ -152,10 +152,10 @@ def configure_step(self): self.cfg.update('configopts', '--with-xaltFilePrefix=%s' % self.cfg['file_prefix']) # Configure - super(EB_XALT, self).configure_step() + super().configure_step() def make_module_extra(self, *args, **kwargs): - txt = super(EB_XALT, self).make_module_extra(*args, **kwargs) + txt = super().make_module_extra(*args, **kwargs) txt += self.module_generator.prepend_paths('LD_PRELOAD', 'lib64/libxalt_init.%s' % get_shared_lib_ext()) txt += self.module_generator.set_environment('XALT_DIR', self.installdir) @@ -187,5 +187,4 @@ def sanity_check_step(self): } custom_commands = ['xalt_configuration_report'] - super(EB_XALT, self).sanity_check_step(custom_commands=custom_commands, - custom_paths=custom_paths) + super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) diff --git a/easybuild/easyblocks/x/xcrysden.py b/easybuild/easyblocks/x/xcrysden.py index e43cdb15152..60addf6d82a 100644 --- a/easybuild/easyblocks/x/xcrysden.py +++ b/easybuild/easyblocks/x/xcrysden.py @@ -44,7 +44,7 @@ class EB_XCrySDen(ConfigureMake): def __init__(self, *args, **kwargs): """Initialisation of custom class variables for XCrySDen""" - super(EB_XCrySDen, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.tclroot = self.tclver = self.tkroot = self.tkver = 'UNKNOWN' def configure_step(self): @@ -142,11 +142,11 @@ def sanity_check_step(self): 'dirs': [], } - super(EB_XCrySDen, self).sanity_check_step(custom_paths=custom_paths) + super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Set extra environment variables in module file.""" - txt = super(EB_XCrySDen, self).make_module_extra() + txt = super().make_module_extra() tclpath = os.path.join(self.tclroot, 'lib', "tcl%s" % self.tclver) txt += self.module_generator.set_environment('TCL_LIBRARY', tclpath) diff --git a/easybuild/easyblocks/x/xmipp.py b/easybuild/easyblocks/x/xmipp.py index 2c338d3c543..6aa93b8bb31 100644 --- a/easybuild/easyblocks/x/xmipp.py +++ b/easybuild/easyblocks/x/xmipp.py @@ -49,7 +49,7 @@ class EB_Xmipp(SCons): def __init__(self, *args, **kwargs): """Initialize Xmipp-specific variables.""" - super(EB_Xmipp, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.xmipp_modules = ['xmippCore', 'xmipp', 'xmippViz'] @@ -76,7 +76,7 @@ def extract_step(self): # Xmipp >= 3.20.07 assumes that everything is unpacked in the "src" dir of Xmipp itself mkdir(self.srcdir) self.cfg.update('unpack_options', '--directory %s' % os.path.basename(self.srcdir)) - super(EB_Xmipp, self).extract_step() + super().extract_step() for module in self.xmipp_modules: if LooseVersion(self.version) >= LooseVersion('3.20.07') and module == 'xmipp': pass @@ -86,9 +86,9 @@ def extract_step(self): def patch_step(self): """Patch files from self.srcdir dir.""" if LooseVersion(self.version) >= LooseVersion('3.20.07'): - super(EB_Xmipp, self).patch_step() + super().patch_step() else: - super(EB_Xmipp, self).patch_step(beginpath=self.srcdir) + super().patch_step(beginpath=self.srcdir) def setup_xmipp_env(self): """Setup environment before running SCons.""" @@ -229,7 +229,7 @@ def configure_step(self): # Temp workaround for missing include/pythonx.y in CPATH env.setvar('CPATH', os.pathsep.join([os.environ['CPATH'], pyincpath])) - super(EB_Xmipp, self).configure_step() + super().configure_step() def build_step(self): """Custom build step for Xmipp.""" @@ -256,7 +256,7 @@ def build_step(self): moddir = os.path.join(os.path.basename(self.srcdir), module) symlink(self.cfgfile, os.path.join(self.srcdir, module, 'install', 'xmipp.conf')) cwd = change_dir(moddir) - super(EB_Xmipp, self).build_step() + super().build_step() change_dir(cwd) def install_step(self): @@ -294,11 +294,11 @@ def sanity_check_step(self): [os.path.join('lib', 'lib%s.%s') % (x, shlib_ext) for x in libs], 'dirs': ['resources'], } - return super(EB_Xmipp, self).sanity_check_step(custom_paths=custom_paths) + return super().sanity_check_step(custom_paths=custom_paths) def make_module_extra(self): """Set the install directory as XMIPP_HOME""" - txt = super(EB_Xmipp, self).make_module_extra() + txt = super().make_module_extra() txt += self.module_generator.set_environment('XMIPP_HOME', self.installdir) self.log.debug("make_module_extra added this: %s", txt) return txt diff --git a/easybuild/easyblocks/x/xml.py b/easybuild/easyblocks/x/xml.py index 5c617da27b6..1719de29261 100644 --- a/easybuild/easyblocks/x/xml.py +++ b/easybuild/easyblocks/x/xml.py @@ -52,4 +52,4 @@ def install_R_package(self, *args, **kwargs): else: raise EasyBuildError("zlib module not loaded (required)") - return super(EB_XML, self).install_R_package(*args, **kwargs) + return super().install_R_package(*args, **kwargs) diff --git a/test/easyblocks/easyblock_specific.py b/test/easyblocks/easyblock_specific.py index d76d9b98dec..5f7db337b66 100644 --- a/test/easyblocks/easyblock_specific.py +++ b/test/easyblocks/easyblock_specific.py @@ -70,7 +70,7 @@ class EasyBlockSpecificTest(TestCase): def setUp(self): """Test setup.""" - super(EasyBlockSpecificTest, self).setUp() + super().setUp() self.tmpdir = tempfile.mkdtemp() self.orig_sys_stdout = sys.stdout @@ -87,7 +87,7 @@ def tearDown(self): # restore original environment modify_env(os.environ, self.orig_environ, verbose=False) - super(EasyBlockSpecificTest, self).tearDown() + super().tearDown() def mock_stdout(self, enable): """Enable/disable mocking stdout.""" diff --git a/test/easyblocks/general.py b/test/easyblocks/general.py index c874e7ec5df..deecd08bc1a 100644 --- a/test/easyblocks/general.py +++ b/test/easyblocks/general.py @@ -85,13 +85,13 @@ class GeneralEasyblockTest(TestCase): def setUp(self): """Test setup.""" - super(GeneralEasyblockTest, self).setUp() + super().setUp() self.tmpdir = tempfile.mkdtemp() self.cwd = os.getcwd() def tearDown(self): """Test cleanup.""" - super(GeneralEasyblockTest, self).tearDown() + super().tearDown() os.chdir(self.cwd) shutil.rmtree(self.tmpdir) diff --git a/test/easyblocks/module.py b/test/easyblocks/module.py index f5898c3295d..9c7bdb55c03 100644 --- a/test/easyblocks/module.py +++ b/test/easyblocks/module.py @@ -137,7 +137,7 @@ def writeEC(self, easyblock, name='foo', version='1.3.2', extratxt='', toolchain def setUp(self): """Setup test.""" - super(ModuleOnlyTest, self).setUp() + super().setUp() self.log = fancylogger.getLogger("EasyblocksModuleOnlyTest", fname=False) fd, self.eb_file = tempfile.mkstemp(prefix='easyblocks_module_only_test_', suffix='.eb') @@ -147,7 +147,7 @@ def setUp(self): def tearDown(self): """Clean up after running test.""" - super(ModuleOnlyTest, self).tearDown() + super().tearDown() os.environ = self.orig_environ From f0a824b2f09dc35c18aea88bbafc773a6eecaa03 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 1 Apr 2025 12:56:08 +0200 Subject: [PATCH 2/5] Fix super.make_module_extra calls --- easybuild/easyblocks/c/code_server.py | 3 +-- easybuild/easyblocks/generic/juliabundle.py | 3 +-- easybuild/easyblocks/generic/rpackage.py | 4 ++-- easybuild/easyblocks/j/java.py | 2 +- test/easyblocks/suite.py | 0 5 files changed, 5 insertions(+), 7 deletions(-) mode change 100644 => 100755 test/easyblocks/suite.py diff --git a/easybuild/easyblocks/c/code_server.py b/easybuild/easyblocks/c/code_server.py index bc54817195c..cbe87488b8a 100644 --- a/easybuild/easyblocks/c/code_server.py +++ b/easybuild/easyblocks/c/code_server.py @@ -81,5 +81,4 @@ def sanity_check_step(self): def make_module_extra(self): """Add the default directories to the PATH.""" - txt = EasyBlock.make_module_extra(self) - return txt + return EasyBlock.make_module_extra(self) diff --git a/easybuild/easyblocks/generic/juliabundle.py b/easybuild/easyblocks/generic/juliabundle.py index 45b2ae06c52..1d478a1ee5b 100644 --- a/easybuild/easyblocks/generic/juliabundle.py +++ b/easybuild/easyblocks/generic/juliabundle.py @@ -95,5 +95,4 @@ def sanity_check_step(self, *args, **kwargs): def make_module_extra(self, *args, **kwargs): """Custom module environment from JuliaPackage""" - mod = super().make_module_extra(*args, **kwargs) - return mod + return super().make_module_extra(*args, **kwargs) diff --git a/easybuild/easyblocks/generic/rpackage.py b/easybuild/easyblocks/generic/rpackage.py index 5ffb3f2260a..7fa64356737 100644 --- a/easybuild/easyblocks/generic/rpackage.py +++ b/easybuild/easyblocks/generic/rpackage.py @@ -344,8 +344,8 @@ def sanity_check_step(self, *args, **kwargs): """ return super().sanity_check_step(EXTS_FILTER_R_PACKAGES, *args, **kwargs) - def make_module_extra(self): + def make_module_extra(self, *args, **kwargs): """Add install path to R_LIBS_SITE""" # prepend R_LIBS_SITE with install path extra = self.module_generator.prepend_paths("R_LIBS_SITE", [self.cfg['exts_subdir']]) - return super().make_module_extra(extra) + return super().make_module_extra(*args, **kwargs) + extra diff --git a/easybuild/easyblocks/j/java.py b/easybuild/easyblocks/j/java.py index 548258eace1..e357f4f477b 100644 --- a/easybuild/easyblocks/j/java.py +++ b/easybuild/easyblocks/j/java.py @@ -211,6 +211,6 @@ def make_module_extra(self): """ Set $JAVA_HOME to installation directory """ - txt = PackedBinary.make_module_extra(self) + txt = super().make_module_extra() txt += self.module_generator.set_environment('JAVA_HOME', self.installdir) return txt diff --git a/test/easyblocks/suite.py b/test/easyblocks/suite.py old mode 100644 new mode 100755 From 80c804e078be4fc60a4352bce43cc1f9c7baeef3 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 28 Apr 2025 09:31:18 +0200 Subject: [PATCH 3/5] Address review --- easybuild/easyblocks/i/imkl.py | 1 - easybuild/easyblocks/i/imkl_fftw.py | 10 +++------- easybuild/easyblocks/m/mamba.py | 2 +- easybuild/easyblocks/m/metagenome_atlas.py | 5 +++++ easybuild/easyblocks/t/tkinter.py | 3 ++- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 2459d06ff20..b0ddceafd58 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -431,7 +431,6 @@ def sanity_check_step(self): 'files': mklfiles, 'dirs': mkldirs, } - super().sanity_check_step(custom_paths=custom_paths) def make_module_step(self, *args, **kwargs): diff --git a/easybuild/easyblocks/i/imkl_fftw.py b/easybuild/easyblocks/i/imkl_fftw.py index 8d5e45eaf4c..db3b30673eb 100644 --- a/easybuild/easyblocks/i/imkl_fftw.py +++ b/easybuild/easyblocks/i/imkl_fftw.py @@ -59,12 +59,7 @@ def make_module_step(self, *args, **kwargs): Custom paths of imkl are unnecessary as imkl-FFTW only ships libraries under the 'lib' subdir Use generic make_module_step skipping imkl """ - return super().make_module_step(*args, **kwargs) - - def make_module_extra(self): - """Custom extra variables to set in module file""" - # bypass extra module variables for imkl - return super().make_module_extra() + return super(EB_imkl, self).make_module_step(*args, **kwargs) def post_processing_step(self): """Custom post install step for imkl-FFTW""" @@ -77,4 +72,5 @@ def sanity_check_step(self): 'files': [os.path.join(self.installdir, 'lib', x) for x in self.get_mkl_fftw_interface_libs()], 'dirs': [], } - super().sanity_check_step(custom_paths=custom_paths) + # Skip imkl sanity check + super(EB_imkl, self).sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/mamba.py b/easybuild/easyblocks/m/mamba.py index 4f2096a2391..3e7bda8c5a2 100644 --- a/easybuild/easyblocks/m/mamba.py +++ b/easybuild/easyblocks/m/mamba.py @@ -46,4 +46,4 @@ def sanity_check_step(self): 'dirs': ['etc', 'lib', 'pkgs'], } # Directly call EB_Anaconda's super, as this sanity_check_step should _overwrite_ Anaconda's (not call it) - super().sanity_check_step(custom_paths=custom_paths) + super(EB_Anaconda, self).sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/metagenome_atlas.py b/easybuild/easyblocks/m/metagenome_atlas.py index 0a8bf629723..e77a4f62f45 100644 --- a/easybuild/easyblocks/m/metagenome_atlas.py +++ b/easybuild/easyblocks/m/metagenome_atlas.py @@ -39,6 +39,11 @@ class EB_Metagenome_Atlas(PythonPackage): Support for building/installing Metagenome-Atlas. """ + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + if not self.cfg.get('options').get('modulename'): + self.options['modulename'] = 'atlas' + def post_processing_step(self): """Create snakemake config files""" diff --git a/easybuild/easyblocks/t/tkinter.py b/easybuild/easyblocks/t/tkinter.py index 96b1ebd42b1..31a0b776f09 100644 --- a/easybuild/easyblocks/t/tkinter.py +++ b/easybuild/easyblocks/t/tkinter.py @@ -133,4 +133,5 @@ def sanity_check_step(self): 'files': [os.path.join(det_pylibdir(), self.tkinter_so_basename)], 'dirs': ['lib'] } - super().sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) + # Skip the sanity check of the Python easyblock + super(EB_Python, self).sanity_check_step(custom_commands=custom_commands, custom_paths=custom_paths) From 992698f877158eaaecd0d98bb8a717aadd479dec Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 5 May 2025 10:13:51 +0200 Subject: [PATCH 4/5] Remove `extra` argument from PythonPackage:make_module_extra --- easybuild/easyblocks/generic/pythonpackage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/generic/pythonpackage.py b/easybuild/easyblocks/generic/pythonpackage.py index fcb31a82a28..2cf5c8807da 100644 --- a/easybuild/easyblocks/generic/pythonpackage.py +++ b/easybuild/easyblocks/generic/pythonpackage.py @@ -1190,4 +1190,4 @@ def make_module_extra(self, *args, **kwargs): if os.path.exists(fullpath) and os.listdir(fullpath): txt += self.module_generator.prepend_paths(PYTHONPATH, path) - return super().make_module_extra(txt, *args, **kwargs) + return super().make_module_extra(*args, **kwargs) + txt From 02b00e7f4b998d12c758f6fdcedeeac24f02370c Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 5 May 2025 10:59:33 +0200 Subject: [PATCH 5/5] Add IMKL_FFTW function back --- easybuild/easyblocks/i/imkl_fftw.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/easybuild/easyblocks/i/imkl_fftw.py b/easybuild/easyblocks/i/imkl_fftw.py index db3b30673eb..b1080ed0cb3 100644 --- a/easybuild/easyblocks/i/imkl_fftw.py +++ b/easybuild/easyblocks/i/imkl_fftw.py @@ -61,6 +61,11 @@ def make_module_step(self, *args, **kwargs): """ return super(EB_imkl, self).make_module_step(*args, **kwargs) + def make_module_extra(self): + """Custom extra variables to set in module file""" + # bypass extra module variables for imkl + return super(EB_imkl, self).make_module_extra() + def post_processing_step(self): """Custom post install step for imkl-FFTW""" # bypass post_processing_step of imkl easyblock