Skip to content

Commit

Permalink
Merge branch 'develop' into 5.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Feb 7, 2024
2 parents e3775ea + 3df2035 commit 12a905a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 11 deletions.
5 changes: 5 additions & 0 deletions easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ def configure_step(self, srcdir=None, builddir=None):
# see https://github.com/Kitware/CMake/commit/3ec9226779776811240bde88a3f173c29aa935b5
options['CMAKE_SKIP_RPATH'] = 'ON'

# make sure that newer CMAKE picks python based on location, not just the newest python
# Avoids issues like e.g. https://github.com/EESSI/software-layer/pull/370#issuecomment-1785594932
if LooseVersion(self.cmake_version) >= '3.15':
options['CMAKE_POLICY_DEFAULT_CMP0094'] = 'NEW'

# show what CMake is doing by default
options['CMAKE_VERBOSE_MAKEFILE'] = 'ON'

Expand Down
9 changes: 7 additions & 2 deletions easybuild/easyblocks/m/mcr.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,13 @@ def set_subdir(self):
"""Determine subdirectory in installation directory"""
# no-op is self.subdir is already set
if self.subdir is None:
# determine subdirectory (e.g. v84 (2014a, 2014b), v85 (2015a), ...)
subdirs = glob.glob(os.path.join(self.installdir, 'v[0-9][0-9]*'))
# determine subdirectory
if LooseVersion(self.version) < LooseVersion('R2022b'):
# (e.g. v84 (2014a, 2014b), v85 (2015a), ...)
subdirs = glob.glob(os.path.join(self.installdir, 'v[0-9][0-9]*'))
else:
# (e.g. R2023a, R2023b, ...)
subdirs = glob.glob(os.path.join(self.installdir, 'R[0-9][0-9][0-9][0-9]*'))
if len(subdirs) == 1:
self.subdir = os.path.basename(subdirs[0])
else:
Expand Down
9 changes: 7 additions & 2 deletions easybuild/easyblocks/p/petsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ def configure_step(self):
ss_libs = ["UMFPACK", "KLU", "SPQR", "CHOLMOD", "BTF", "CCOLAMD",
"COLAMD", "CXSparse", "LDL", "RBio", "SLIP_LU", "CAMD", "AMD"]

# SLIP_LU was replaced by SPEX in SuiteSparse >= 6.0
if LooseVersion(get_software_version('SuiteSparse')) >= LooseVersion("6.0"):
ss_libs = [x if x != "SLIP_LU" else "SPEX" for x in ss_libs]

suitesparse_inc = os.path.join(suitesparse, "include")
inc_spec = "-include=[%s]" % suitesparse_inc

Expand All @@ -274,8 +278,9 @@ def configure_step(self):
self.cfg.update('configopts', ' '.join([withdep + spec for spec in ['=1', inc_spec, lib_spec]]))

# set PETSC_DIR for configure (env) and build_step
env.setvar('PETSC_DIR', self.cfg['start_dir'])
self.cfg.update('buildopts', 'PETSC_DIR=%s' % self.cfg['start_dir'])
petsc_dir = self.cfg['start_dir'].rstrip(os.path.sep)
env.setvar('PETSC_DIR', petsc_dir)
self.cfg.update('buildopts', 'PETSC_DIR=%s' % petsc_dir)

if self.cfg['sourceinstall']:
if self.petsc_arch:
Expand Down
9 changes: 6 additions & 3 deletions easybuild/easyblocks/p/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,16 +376,19 @@ def configure_step(self):
if tcltk_maj_min_ver != '.'.join(tkver.split('.')[:2]):
raise EasyBuildError("Tcl and Tk major/minor versions don't match: %s vs %s", tclver, tkver)

self.cfg.update('configopts', "--with-tcltk-includes='-I%s/include -I%s/include'" % (tcl, tk))

tcl_libdir = os.path.join(tcl, get_software_libdir('Tcl'))
tk_libdir = os.path.join(tk, get_software_libdir('Tk'))
tcltk_libs = "-L%(tcl_libdir)s -L%(tk_libdir)s -ltcl%(maj_min_ver)s -ltk%(maj_min_ver)s" % {
'tcl_libdir': tcl_libdir,
'tk_libdir': tk_libdir,
'maj_min_ver': tcltk_maj_min_ver,
}
self.cfg.update('configopts', "--with-tcltk-libs='%s'" % tcltk_libs)
if LooseVersion(self.version) < '3.11':
self.cfg.update('configopts', "--with-tcltk-includes='-I%s/include -I%s/include'" % (tcl, tk))
self.cfg.update('configopts', "--with-tcltk-libs='%s'" % tcltk_libs)
else:
env.setvar('TCLTK_CFLAGS', '-I%s/include -I%s/include' % (tcl, tk))
env.setvar('TCLTK_LIBS', tcltk_libs)

# don't add user site directory to sys.path (equivalent to python -s)
# This matters e.g. when python installs the bundled pip & setuptools (for >= 3.4)
Expand Down
7 changes: 5 additions & 2 deletions easybuild/easyblocks/r/r.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ def configure_step(self):
for dep in ['Tcl', 'Tk']:
root = get_software_root(dep)
if root:
dep_config = os.path.join(root, 'lib', '%sConfig.sh' % dep.lower())
self.cfg.update('configopts', '--with-%s-config=%s' % (dep.lower(), dep_config))
for libdir in ['lib', 'lib64']:
dep_config = os.path.join(root, libdir, '%sConfig.sh' % dep.lower())
if os.path.exists(dep_config):
self.cfg.update('configopts', '--with-%s-config=%s' % (dep.lower(), dep_config))
break

if "--with-x=" not in self.cfg['configopts'].lower():
if get_software_root('X11'):
Expand Down
14 changes: 12 additions & 2 deletions easybuild/easyblocks/v/vep.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import easybuild.tools.environment as env
from easybuild.easyblocks.perl import get_major_perl_version
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import print_warning
from easybuild.tools.filetools import apply_regex_substitutions
from easybuild.tools.modules import get_software_version, get_software_root
Expand All @@ -48,6 +49,15 @@ def __init__(self, *args, **kwargs):

self.api_mods_subdir = os.path.join('modules', 'api')

@staticmethod
def extra_options(extra_vars=None):
"""Extra easyconfig parameters specific to VEP easyblock."""
extra_vars = EasyBlock.extra_options(extra_vars)
extra_vars.update({
'species': ['all', "Comma-separated list of species to pass to INSTALL.pl", CUSTOM],
})
return extra_vars

def configure_step(self):
"""No custom configuration procedure for VEP."""
pass
Expand Down Expand Up @@ -97,8 +107,8 @@ def install_step(self):
# l: Bio::DB::HTS, should be provided via EasyBuild
# p: plugins
'--AUTO af',
# install all species
'--SPECIES all',
# install selected species
'--SPECIES %s' % self.cfg['species'],
# don't update VEP during installation
'--NO_UPDATE',
# location to install Perl API modules into
Expand Down

0 comments on commit 12a905a

Please sign in to comment.