From 0d750084490bca7316b2eba330fe2a0e486ef238 Mon Sep 17 00:00:00 2001 From: Alex Domingo Date: Wed, 18 Dec 2024 00:30:12 +0100 Subject: [PATCH] remove obsolete globals from IntelBase easyblock --- easybuild/easyblocks/generic/intelbase.py | 14 ++++---------- easybuild/easyblocks/i/icc.py | 3 +-- easybuild/easyblocks/i/ifort.py | 1 - easybuild/easyblocks/i/imkl.py | 2 +- easybuild/easyblocks/i/impi.py | 4 ++-- easybuild/easyblocks/i/inspector.py | 2 +- easybuild/easyblocks/t/tbb.py | 3 +-- easybuild/easyblocks/v/vtune.py | 2 +- 8 files changed, 11 insertions(+), 20 deletions(-) diff --git a/easybuild/easyblocks/generic/intelbase.py b/easybuild/easyblocks/generic/intelbase.py index 89c9055246..e2177251d7 100644 --- a/easybuild/easyblocks/generic/intelbase.py +++ b/easybuild/easyblocks/generic/intelbase.py @@ -48,7 +48,7 @@ from easybuild.framework.easyconfig.types import ensure_iterable_license_specs from easybuild.tools.build_log import EasyBuildError from easybuild.tools.filetools import adjust_permissions, find_flexlm_license -from easybuild.tools.filetools import mkdir, read_file, remove_file, write_file +from easybuild.tools.filetools import read_file, remove_file, write_file from easybuild.tools.run import run_shell_cmd @@ -68,20 +68,14 @@ # silent.cfg parameter name for type of license activation (cfr. options listed above) ACTIVATION_NAME = 'ACTIVATION_TYPE' # since icc/ifort v2013_sp1, impi v4.1.1, imkl v11.1 -ACTIVATION_NAME_2012 = 'ACTIVATION' # previous activation type parameter used in older versions # silent.cfg parameter name for install prefix INSTALL_DIR_NAME = 'PSET_INSTALL_DIR' # silent.cfg parameter name for install mode INSTALL_MODE_NAME = 'PSET_MODE' -# Older (2015 and previous) silent.cfg parameter name for install mode -INSTALL_MODE_NAME_2015 = 'INSTALL_MODE' -# Install mode for 2016 version +# Install mode since 2016 version INSTALL_MODE = 'install' -# Install mode for 2015 and older versions -INSTALL_MODE_2015 = 'NONRPM' # silent.cfg parameter name for license file/server specification LICENSE_FILE_NAME = 'ACTIVATION_LICENSE_FILE' # since icc/ifort v2013_sp1, impi v4.1.1, imkl v11.1 -LICENSE_FILE_NAME_2012 = 'PSET_LICENSE_FILE' # previous license file parameter used in older versions LICENSE_SERIAL_NUMBER = 'ACTIVATION_SERIAL_NUMBER' COMP_ALL = 'ALL' @@ -358,8 +352,8 @@ def install_step_classic(self, silent_cfg_names_map=None, silent_cfg_extras=None ]) % { 'install_dir_name': silent_cfg_names_map.get('install_dir_name', INSTALL_DIR_NAME), 'install_dir': silent_cfg_names_map.get('install_dir', self.installdir), - 'install_mode': silent_cfg_names_map.get('install_mode', INSTALL_MODE_2015), - 'install_mode_name': silent_cfg_names_map.get('install_mode_name', INSTALL_MODE_NAME_2015), + 'install_mode': silent_cfg_names_map.get('install_mode', INSTALL_MODE), + 'install_mode_name': silent_cfg_names_map.get('install_mode_name', INSTALL_MODE_NAME), } if self.install_components is not None: diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index 74efd94dac..bd563169bf 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -38,8 +38,7 @@ import re from easybuild.tools import LooseVersion -from easybuild.easyblocks.generic.intelbase import IntelBase, ACTIVATION_NAME_2012, COMP_ALL -from easybuild.easyblocks.generic.intelbase import LICENSE_FILE_NAME_2012 +from easybuild.easyblocks.generic.intelbase import IntelBase, COMP_ALL from easybuild.easyblocks.t.tbb import get_tbb_gccprefix from easybuild.tools.run import run_shell_cmd from easybuild.tools.systemtools import get_shared_lib_ext diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 67affe0083..ad3232a833 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -34,7 +34,6 @@ """ import os -from easybuild.tools import LooseVersion from easybuild.easyblocks.generic.intelbase import IntelBase from easybuild.easyblocks.icc import EB_icc # @UnresolvedImport diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index f1a414b6c5..1ada8b9419 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -43,7 +43,7 @@ import easybuild.tools.environment as env import easybuild.tools.toolchain as toolchain -from easybuild.easyblocks.generic.intelbase import IntelBase, ACTIVATION_NAME_2012, LICENSE_FILE_NAME_2012 +from easybuild.easyblocks.generic.intelbase import IntelBase from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.build_log import EasyBuildError from easybuild.tools.config import build_option diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 2a4760b495..bec1f1021e 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -38,11 +38,11 @@ from easybuild.tools import LooseVersion import easybuild.tools.toolchain as toolchain -from easybuild.easyblocks.generic.intelbase import IntelBase, ACTIVATION_NAME_2012, LICENSE_FILE_NAME_2012 +from easybuild.easyblocks.generic.intelbase import IntelBase from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.build_log import EasyBuildError from easybuild.tools.config import build_option -from easybuild.tools.filetools import apply_regex_substitutions, change_dir, extract_file, mkdir, write_file +from easybuild.tools.filetools import apply_regex_substitutions, change_dir, extract_file from easybuild.tools.modules import get_software_root, get_software_version from easybuild.tools.run import run_shell_cmd from easybuild.tools.systemtools import get_shared_lib_ext diff --git a/easybuild/easyblocks/i/inspector.py b/easybuild/easyblocks/i/inspector.py index 036287dae4..efa75ae05c 100644 --- a/easybuild/easyblocks/i/inspector.py +++ b/easybuild/easyblocks/i/inspector.py @@ -31,7 +31,7 @@ import os from easybuild.tools import LooseVersion -from easybuild.easyblocks.generic.intelbase import IntelBase, ACTIVATION_NAME_2012, LICENSE_FILE_NAME_2012 +from easybuild.easyblocks.generic.intelbase import IntelBase class EB_Inspector(IntelBase): diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index 9dd6c78be4..17e58da2fd 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -40,8 +40,7 @@ from easybuild.tools import LooseVersion from easybuild.easyblocks.generic.configuremake import ConfigureMake -from easybuild.easyblocks.generic.intelbase import INSTALL_MODE_NAME_2015, INSTALL_MODE_2015 -from easybuild.easyblocks.generic.intelbase import IntelBase, ACTIVATION_NAME_2012, LICENSE_FILE_NAME_2012 +from easybuild.easyblocks.generic.intelbase import IntelBase from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.filetools import find_glob_pattern, move_file, symlink from easybuild.tools.build_log import EasyBuildError diff --git a/easybuild/easyblocks/v/vtune.py b/easybuild/easyblocks/v/vtune.py index 91bdf57129..aeaa4e782e 100644 --- a/easybuild/easyblocks/v/vtune.py +++ b/easybuild/easyblocks/v/vtune.py @@ -31,7 +31,7 @@ from easybuild.tools import LooseVersion import os -from easybuild.easyblocks.generic.intelbase import IntelBase, ACTIVATION_NAME_2012, LICENSE_FILE_NAME_2012 +from easybuild.easyblocks.generic.intelbase import IntelBase class EB_VTune(IntelBase):