From 4a6a1add599bac438a1bedc50427e54839c90637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Wed, 29 Nov 2023 17:16:37 +0000 Subject: [PATCH 1/2] Use EB_COMSOL_LICENSE_FILE variable name --- easybuild/easyblocks/c/comsol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/c/comsol.py b/easybuild/easyblocks/c/comsol.py index 38d778a623..6be902ae17 100644 --- a/easybuild/easyblocks/c/comsol.py +++ b/easybuild/easyblocks/c/comsol.py @@ -59,7 +59,7 @@ def extract_step(self): def configure_step(self): """Configure COMSOL installation: create license file.""" - default_lic_env_var = 'LMCOMSOL_LICENSE_FILE' + default_lic_env_var = 'EB_COMSOL_LICENSE_FILE' lic_specs, self.license_env_var = find_flexlm_license(custom_env_vars=[default_lic_env_var], lic_specs=[self.cfg['license_file']]) From e3bbe0b4a467a5285a95f8556da4d911feee9831 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 29 Dec 2023 10:26:40 +0100 Subject: [PATCH 2/2] consider both $EB_COMSOL_LICENSE_FILE and $LMCOMSOL_LICENSE_FILE in COMSOL easyblock --- easybuild/easyblocks/c/comsol.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/c/comsol.py b/easybuild/easyblocks/c/comsol.py index 6be902ae17..dd69c2dac3 100644 --- a/easybuild/easyblocks/c/comsol.py +++ b/easybuild/easyblocks/c/comsol.py @@ -59,14 +59,14 @@ def extract_step(self): def configure_step(self): """Configure COMSOL installation: create license file.""" - default_lic_env_var = 'EB_COMSOL_LICENSE_FILE' - lic_specs, self.license_env_var = find_flexlm_license(custom_env_vars=[default_lic_env_var], + comsol_lic_env_vars = ['EB_COMSOL_LICENSE_FILE', 'LMCOMSOL_LICENSE_FILE'] + lic_specs, self.license_env_var = find_flexlm_license(custom_env_vars=comsol_lic_env_vars, lic_specs=[self.cfg['license_file']]) if lic_specs: if self.license_env_var is None: self.log.info("Using COMSOL license specifications from 'license_file': %s", lic_specs) - self.license_env_var = default_lic_env_var + self.license_env_var = comsol_lic_env_vars[0] else: self.log.info("Using COMSOL license specifications from $%s: %s", self.license_env_var, lic_specs) @@ -74,7 +74,7 @@ def configure_step(self): env.setvar(self.license_env_var, self.license_file) else: msg = "No viable license specifications found; " - msg += "specify 'license_file', or define $%s" % default_lic_env_var + msg += "specify 'license_file', or define %s" % (', '.join('$%s' % x for x in comsol_lic_env_vars)) raise EasyBuildError(msg) copy_file(os.path.join(self.start_dir, 'setupconfig.ini'), self.configfile)