Skip to content

Commit 7e52f7a

Browse files
Merge branch 'easybuilders:develop' into llvm
2 parents d4917a4 + 51e195e commit 7e52f7a

File tree

13 files changed

+48
-103
lines changed

13 files changed

+48
-103
lines changed

easybuild/easyblocks/a/armadillo.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@
3838
class EB_Armadillo(CMakeMake):
3939
"""Support for building Armadillo."""
4040

41-
@staticmethod
42-
def extra_options():
43-
"""Extra easyconfig parameters for Armadillo."""
44-
extra_vars = CMakeMake.extra_options()
45-
extra_vars['separate_build_dir'][0] = True
46-
return extra_vars
47-
4841
def configure_step(self):
4942
"""Set some extra environment variables before configuring."""
5043

easybuild/easyblocks/c/cgal.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@
4242
class EB_CGAL(CMakeMake):
4343
"""Support for building CGAL."""
4444

45-
@staticmethod
46-
def extra_options():
47-
extra_vars = CMakeMake.extra_options()
48-
extra_vars['separate_build_dir'][0] = True
49-
return extra_vars
50-
5145
def configure_step(self):
5246
"""Set some extra environment variables before configuring."""
5347

easybuild/easyblocks/e/elsi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def extra_options():
5252
extra_vars.update({
5353
'build_internal_pexsi': [None, "Build internal PEXSI solver", CUSTOM],
5454
})
55-
extra_vars['separate_build_dir'][0] = True
5655
extra_vars['build_shared_libs'][0] = True
5756
return extra_vars
5857

easybuild/easyblocks/f/flexiblas.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def extra_options():
6363
"'imkl', which does not need to be a (build)dependency." +
6464
"If not defined, use the list of dependencies.", CUSTOM],
6565
})
66-
extra_vars['separate_build_dir'][0] = True
6766
return extra_vars
6867

6968
def __init__(self, *args, **kwargs):

easybuild/easyblocks/g/geant4.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ def extra_options():
5757
'PhotonEvaporationVersion': [None, "PhotonEvaporation version", CUSTOM],
5858
'G4RadioactiveDecayVersion': [None, "G4RadioactiveDecay version", CUSTOM],
5959
})
60-
# Requires out-of-source build
61-
extra_vars['separate_build_dir'][0] = True
6260
return extra_vars
6361

6462
def make_module_extra(self):

easybuild/easyblocks/g/gromacs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def extra_options():
7575
'plumed': [None, "Try to apply PLUMED patches. None (default) is auto-detect. " +
7676
"True or False forces behaviour.", CUSTOM],
7777
})
78-
extra_vars['separate_build_dir'][0] = True
7978
return extra_vars
8079

8180
def __init__(self, *args, **kwargs):

easybuild/easyblocks/generic/cmakemake.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -407,15 +407,16 @@ def configure_step(self, srcdir=None, builddir=None):
407407

408408
def check_python_paths(self):
409409
"""Check that there are no detected Python paths outside the Python dependency provided by EasyBuild"""
410-
if not os.path.exists('CMakeCache.txt'):
411-
self.log.warning("CMakeCache.txt not found. Python paths checks skipped.")
410+
cache_file_path = os.path.join(os.getcwd(), 'CMakeCache.txt')
411+
if not os.path.exists(cache_file_path):
412+
self.log.warning(f"{cache_file_path} not found. Python paths checks skipped.")
412413
return
413-
cmake_cache = read_file('CMakeCache.txt')
414+
cmake_cache = read_file(cache_file_path)
414415
if not cmake_cache:
415-
self.log.warning("CMake Cache could not be read. Python paths checks skipped.")
416+
self.log.warning(f"CMake Cache ({cache_file_path}) could not be read. Python paths checks skipped.")
416417
return
417418

418-
self.log.info("Checking Python paths")
419+
self.log.info(f"Checking Python paths found by CMake in {cache_file_path}")
419420

420421
python_paths = {
421422
"executable": [],
@@ -438,7 +439,7 @@ def check_python_paths(self):
438439

439440
ebrootpython_path = get_software_root("Python")
440441
if not ebrootpython_path:
441-
if any(python_paths.values()) and not self.toolchain.comp_family() == toolchain.SYSTEM:
442+
if any(python_paths.values()) and self.toolchain.comp_family() != toolchain.SYSTEM:
442443
self.log.warning("Found Python paths in CMake cache but Python is not a dependency")
443444
# Can't do the check
444445
return
@@ -456,8 +457,12 @@ def check_python_paths(self):
456457
if errors:
457458
# Combine all errors into a single message
458459
error_message = "\n".join(errors)
459-
raise EasyBuildError("Python path errors:\n" + error_message)
460-
self.log.info("Python check successful")
460+
raise EasyBuildError("CMake configure of {self.name} picked up (likely) wrong Python paths:\n"
461+
f"{error_message}\n"
462+
"Verify that Python is a dependency. "
463+
"Otherwise, the sources might need patching "
464+
"to pick up the Python provided by EasyBuild.")
465+
self.log.info("Check for Python paths in CMake cache successful")
461466

462467
def test_step(self):
463468
"""CMake specific test setup"""

easybuild/easyblocks/l/lammps.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ def extra_options(**kwargs):
244244
'user_packages': [None, "List user packages (without prefix PKG_ or USER-PKG_).", CUSTOM],
245245
'sanity_check_test_inputs': [None, "List of tests for sanity-check.", CUSTOM],
246246
})
247-
extra_vars['separate_build_dir'][0] = True
248247
return extra_vars
249248

250249
def prepare_step(self, *args, **kwargs):

easybuild/easyblocks/n/netcdf.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@
4747
class EB_netCDF(CMakeMake):
4848
"""Support for building/installing netCDF"""
4949

50-
@staticmethod
51-
def extra_options():
52-
extra_vars = CMakeMake.extra_options()
53-
extra_vars['separate_build_dir'][0] = True
54-
return extra_vars
55-
5650
def configure_step(self):
5751
"""Configure build: set config options and configure"""
5852

easybuild/easyblocks/o/openbabel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def extra_options():
4747
extra_vars.update({
4848
'with_python_bindings': [True, "Try to build Open Babel's Python bindings. (-DPYTHON_BINDINGS=ON)", CUSTOM],
4949
})
50-
extra_vars['separate_build_dir'][0] = True
5150
return extra_vars
5251

5352
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)