Skip to content

Commit dc7cb56

Browse files
authored
Merge branch 'easybuilders:develop' into tensorflow-tmp-dir
2 parents 7975912 + 357e3ce commit dc7cb56

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

easybuild/easyblocks/m/mcr.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,17 @@ def configure_step(self):
8181
config = regdest.sub("destinationFolder=%s" % self.installdir, config)
8282
config = regagree.sub("agreeToLicense=Yes", config)
8383
config = regmode.sub("mode=silent", config)
84-
else:
84+
elif LooseVersion(self.version) < LooseVersion('R2024a'):
8585
config = '\n'.join([
8686
"destinationFolder=%s" % self.installdir,
8787
"agreeToLicense=Yes",
8888
"mode=silent",
8989
])
90+
else:
91+
config = '\n'.join([
92+
"destinationFolder=%s" % self.installdir,
93+
"agreeToLicense=yes",
94+
])
9095

9196
write_file(configfile, config)
9297

easybuild/easyblocks/o/openfoam.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@
4141
import shutil
4242
import stat
4343
import tempfile
44+
import textwrap
4445
from easybuild.tools import LooseVersion
4546

4647
import easybuild.tools.environment as env
4748
import easybuild.tools.toolchain as toolchain
4849
from easybuild.easyblocks.generic.cmakemake import setup_cmake_env
4950
from easybuild.framework.easyblock import EasyBlock
5051
from easybuild.tools.build_log import EasyBuildError
51-
from easybuild.tools.filetools import adjust_permissions, apply_regex_substitutions, mkdir
52+
from easybuild.tools.filetools import adjust_permissions, apply_regex_substitutions, mkdir, write_file
5253
from easybuild.tools.modules import get_software_root, get_software_version
5354
from easybuild.tools.run import run_cmd, run_cmd_qa
5455
from easybuild.tools.systemtools import get_shared_lib_ext, get_cpu_architecture, AARCH64, POWER
@@ -293,6 +294,23 @@ def configure_step(self):
293294
else:
294295
env.setvar("%s_ROOT" % depend.upper(), dependloc)
295296

297+
if get_software_root('CGAL') and LooseVersion(get_software_version('CGAL')) >= LooseVersion('5.0'):
298+
# CGAL >= 5.x is header-only, but when using it OpenFOAM still needs MPFR.
299+
# It may fail to find it, so inject the right settings and paths into the "have_cgal" script.
300+
have_cgal_script = os.path.join(self.builddir, self.openfoamdir, 'wmake', 'scripts', 'have_cgal')
301+
if get_software_root('MPFR') and os.path.exists(have_cgal_script):
302+
eb_cgal_config = textwrap.dedent('''
303+
# Injected by EasyBuild
304+
HAVE_CGAL=true
305+
HAVE_MPFR=true
306+
CGAL_FLAVOUR=header
307+
CGAL_INC_DIR=${EBROOTCGAL}/include
308+
CGAL_LIB_DIR=${EBROOTCGAL}/lib
309+
MPFR_INC_DIR=${EBROOTMPFR}/include
310+
MPFR_LIB_DIR=${EBROOTMPFR}/lib
311+
''')
312+
write_file(have_cgal_script, eb_cgal_config, append=True)
313+
296314
def build_step(self):
297315
"""Build OpenFOAM using make after sourcing script to set environment."""
298316

easybuild/easyblocks/o/openssl_wrapper.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
import os
3131
import re
3232

33-
from urllib.parse import urlparse
33+
try:
34+
from urllib.parse import urlparse
35+
except ImportError:
36+
# fallback for Python 2.7, should be removed for EasyBuild >= 5.0
37+
from urlparse import urlparse
3438

3539
from easybuild.tools import LooseVersion
3640

0 commit comments

Comments
 (0)