Skip to content

Commit

Permalink
Merge pull request #676 from hpcugent/develop
Browse files Browse the repository at this point in the history
release EasyBuild v2.3.0
  • Loading branch information
boegel committed Sep 2, 2015
2 parents 805d019 + a96dad8 commit 4ddb3dc
Show file tree
Hide file tree
Showing 21 changed files with 444 additions and 60 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,6 +2,7 @@
.project
LICENSE_HEADER
*.pyc
*.pyo
*.nja
build/
dist/
Expand Down
24 changes: 23 additions & 1 deletion RELEASE_NOTES
Expand Up @@ -3,7 +3,28 @@ For more detailed information, please see the git log.

These release notes can also be consulted at http://easybuild.readthedocs.org/en/latest/Release_notes.html.

The latest version of easybuild-easyblocks provides 150 software-specific easyblocks and 25 generic easyblocks.
The latest version of easybuild-easyblocks provides 152 software-specific easyblocks and 25 generic easyblocks.

v2.3.0 (September 2nd 2015)
---------------------------

feature + bugfix release
- new easyblocks for 2 software packages that require customized support:
MCR (#623), Molpro (#665)
- various other enhancements, including:
- enhance BWA easyblock to also install man pages (#650)
- enhance tbb easyblock to consider lib dirs in order and also define $CPATH, $LIBRARY_PATH, $TBBROOT (#653, #654)
- call PythonPackage.configure_step in ConfigureMakePythonPackage.configure_step (#668)
- add 'foldx3b6' as possible binary name in FoldX easyblock (#671)
- enhance/cleanup MATLAB easyblock (#672)
- move preparing of 'intel' subdir in $HOME to configure_step in IntelBase easyblock (#673)
- various bug fixes, including:
- add missing super call in post_install_step of imkl easyblock (#648, #660)
- fix regex used to correct I_MPI_ROOT in impi mpivars.sh scripts (#662)
- fix regex used to patch .mk file in configure step of SuiteSparse easyblock (#666)
- correctly specify installation prefix via $GEM_HOME in RubyGem easyblock (#667)
- add custom sanity check in scipy easyblock (#669)
- specify to always use the bfd linker for OpenFOAM, to stay away from using ld.gold (#670)

v2.2.0 (July 15th 2015)
-----------------------
Expand All @@ -20,6 +41,7 @@ feature + bugfix release
- make out-of-source build with CMake truly out-of-source (#615)
- add support in Bundle easyblock to run full sanity check (#627)
- also take platform-specific Python lib dirs into account in PythonPackage easyblock (#628)
- fix mpivars scripts in Intel MPI installation for versions where the installation is moved (#629)
- don't restrict det_pylibdir function to only EasyBuild-provided Python (#631, #641)
- support snappy and other optional native libs in Hadoop easyblock (#632, #638, #640, #642)
- various bug fixes, including:
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/__init__.py
Expand Up @@ -37,7 +37,7 @@

# note: release candidates should be versioned as a pre-release, e.g. "1.1rc1"
# 1.1-rc1 would indicate a post-release, i.e., and update of 1.1, so beware
VERSION = LooseVersion('2.2.0')
VERSION = LooseVersion('2.3.0')
UNKNOWN = 'UNKNOWN'


Expand Down
6 changes: 6 additions & 0 deletions easybuild/easyblocks/b/bwa.py
Expand Up @@ -53,12 +53,18 @@ def install_step(self):
"""
srcdir = self.cfg['start_dir']
destdir = os.path.join(self.installdir, 'bin')
mandir = os.path.join(self.installdir, 'man')
manman1dir = os.path.join(self.installdir, 'man/man1')
manfile = os.path.join(srcdir, 'bwa.1')
srcfile = None
try:
os.makedirs(destdir)
os.makedirs(mandir)
os.makedirs(manman1dir)
for filename in self.files:
srcfile = os.path.join(srcdir, filename)
shutil.copy2(srcfile, destdir)
shutil.copy2(manfile, manman1dir)
except OSError, err:
raise EasyBuildError("Copying %s to installation dir %s failed: %s", srcfile, destdir, err)

Expand Down
1 change: 1 addition & 0 deletions easybuild/easyblocks/f/foldx.py
Expand Up @@ -49,6 +49,7 @@ def install_step(self):
'foldx_%s.linux' % self.version, # FoldX v2.x
'FoldX.linux64', # FoldX 3.x
'foldx64Linux', # FoldX 3.0-beta6
'foldx3b6', # FoldX 3.0 beta 6.1 >_<
]
try:
os.makedirs(bindir)
Expand Down
3 changes: 2 additions & 1 deletion easybuild/easyblocks/generic/configuremakepythonpackage.py
Expand Up @@ -52,8 +52,9 @@ def __init__(self, *args, **kwargs):
"""Initialize with PythonPackage."""
PythonPackage.__init__(self, *args, **kwargs)

def configure_step(self):
def configure_step(self, *args, **kwargs):
"""Configure build using 'python configure'."""
PythonPackage.configure_step(self, *args, **kwargs)
cmd = "%s python %s" % (self.cfg['preconfigopts'], self.cfg['configopts'])
run_cmd(cmd, log_all=True)

Expand Down
10 changes: 5 additions & 5 deletions easybuild/easyblocks/generic/intelbase.py
Expand Up @@ -45,7 +45,7 @@
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.run import run_cmd

from vsc import fancylogger
from vsc.utils import fancylogger
_log = fancylogger.getLogger('generic.intelbase')


Expand Down Expand Up @@ -91,10 +91,6 @@ def __init__(self, *args, **kwargs):
common_tmp_dir = os.path.dirname(tempfile.gettempdir()) # common tmp directory, same across nodes
self.home_subdir_local = os.path.join(common_tmp_dir, os.getenv('USER'), 'easybuild_intel')

# prepare (local) 'intel' home subdir
self.setup_local_home_subdir()
self.clean_home_subdir()

@staticmethod
def extra_options(extra_vars=None):
extra_vars = EasyBlock.extra_options(extra_vars)
Expand Down Expand Up @@ -165,6 +161,10 @@ def setup_local_home_subdir(self):
def configure_step(self):
"""Configure: handle license file and clean home dir."""

# prepare (local) 'intel' home subdir
self.setup_local_home_subdir()
self.clean_home_subdir()

lic_env_var = None # environment variable that will be used
default_lic_env_var = 'INTEL_LICENSE_FILE'
lic_env_vars = [default_lic_env_var, 'LM_LICENSE_FILE']
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/generic/pythonpackage.py
Expand Up @@ -34,7 +34,7 @@
import os
import tempfile
from os.path import expanduser
from vsc import fancylogger
from vsc.utils import fancylogger
from vsc.utils.missing import nub

import easybuild.tools.environment as env
Expand Down
23 changes: 22 additions & 1 deletion easybuild/easyblocks/generic/rubygem.py
Expand Up @@ -26,11 +26,15 @@
EasyBuild support for Ruby Gems, implemented as an easyblock
@author: Robert Schmidt (Ottawa Hospital Research Institute)
@author: Kenneth Hoste (Ghent University)
"""
import os
import shutil

import easybuild.tools.environment as env
from easybuild.framework.extensioneasyblock import ExtensionEasyBlock
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.modules import get_software_root
from easybuild.tools.run import run_cmd


Expand Down Expand Up @@ -81,4 +85,21 @@ def test_step(self):

def install_step(self):
"""Install Ruby Gems using gem package manager"""
run_cmd('gem install --local %s' % self.ext_src)
ruby_root = get_software_root('Ruby')
if not ruby_root:
raise EasyBuildError("Ruby module not loaded?")

# this is the 'proper' way to specify a custom installation prefix: set $GEM_HOME
if not self.is_extension:
env.setvar('GEM_HOME', self.installdir)

bindir = os.path.join(self.installdir, 'bin')
run_cmd("gem install --bindir %s --local %s" % (bindir, self.ext_src))

def make_module_extra(self):
"""Extend $GEM_PATH in module file."""
txt = super(RubyGem, self).make_module_extra()
# for stand-alone Ruby gem installs, $GEM_PATH needs to be updated
if not self.is_extension:
txt += self.module_generator.prepend_paths('GEM_PATH', [''])
return txt
2 changes: 2 additions & 0 deletions easybuild/easyblocks/i/imkl.py
Expand Up @@ -146,6 +146,8 @@ def post_install_step(self):
"""
Install group libraries and interfaces (if desired).
"""
super(EB_imkl, self).post_install_step()

# reload the dependencies
self.load_dependency_modules()

Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/i/impi.py
Expand Up @@ -138,7 +138,7 @@ def post_install_step(self):
sys.stdout.write(line)
for script in [os.path.join('intel64', 'bin', 'mpivars.sh'), os.path.join('mic', 'bin', 'mpivars.sh')]:
for line in fileinput.input(os.path.join(self.installdir, script), inplace=1, backup='.orig.eb'):
line = re.sub(r"^I_MPI_ROOT=", "I_MPI_ROOT=%s; export I_MPI_ROOT" % self.installdir, line)
line = re.sub(r"^I_MPI_ROOT=.*", "I_MPI_ROOT=%s; export I_MPI_ROOT" % self.installdir, line)
sys.stdout.write(line)

def sanity_check_step(self):
Expand Down
57 changes: 19 additions & 38 deletions easybuild/easyblocks/m/matlab.py
Expand Up @@ -32,14 +32,15 @@
@author: Jens Timmerman (Ghent University)
@author: Fotis Georgatos (Uni.Lu, NTUA)
"""

import re
import os
import shutil
import stat

from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.filetools import adjust_permissions, read_file, write_file
from easybuild.tools.run import run_cmd


Expand All @@ -50,7 +51,7 @@ def __init__(self, *args, **kwargs):
"""Add extra config options specific to MATLAB."""
super(EB_MATLAB, self).__init__(*args, **kwargs)
self.comp_fam = None
self.configfilename = "my_installer_input.txt"
self.configfile = os.path.join(self.builddir, 'my_installer_input.txt')

@staticmethod
def extra_options():
Expand All @@ -66,22 +67,16 @@ def configure_step(self):
licserv = self.cfg['license_server']
licport = self.cfg['license_server_port']
lictxt = '\n'.join([
"SERVER %s 000000000000 %s" % (licserv, licport),
"USE_SERVER",
])
"SERVER %s 000000000000 %s" % (licserv, licport),
"USE_SERVER",
])

licfile = "%s/matlab.lic" % self.builddir
try:
f = file(licfile, "w")
f.write(lictxt)
f.close()
except IOError, err:
raise EasyBuildError("Failed to create license file %s: %s", licfile, err)
licfile = os.path.join(self.builddir, 'matlab.lic')
write_file(licfile, lictxt)

configfile = os.path.join(self.builddir, self.configfilename)
try:
shutil.copyfile("%s/%s/installer_input.txt" % (self.builddir, self.version), configfile)
config = file(configfile).read()
shutil.copyfile(os.path.join(self.cfg['start_dir'], 'installer_input.txt'), self.configfile)
config = read_file(self.configfile)

regdest = re.compile(r"^# destinationFolder=.*", re.M)
regkey = re.compile(r"^# fileInstallationKey=.*", re.M)
Expand All @@ -96,14 +91,12 @@ def configure_step(self):
config = regmode.sub("mode=silent", config)
config = reglicpath.sub("licensePath=%s" % licfile, config)

f = open(configfile, 'w')
f.write(config)
f.close()
write_file(self.configfile, config)

except IOError, err:
raise EasyBuildError("Failed to create installation config file %s: %s", configfile, err)
raise EasyBuildError("Failed to create installation config file %s: %s", self.configfile, err)

self.log.debug('configuration file written to %s:\n %s' % (configfile, config))
self.log.debug('configuration file written to %s:\n %s', self.configfile, config)

def build_step(self):
"""No building of MATLAB, no sources available."""
Expand All @@ -115,14 +108,7 @@ def install_step(self):
src = os.path.join(self.cfg['start_dir'], 'install')

# make sure install script is executable
try:
if os.path.isfile(src):
self.log.info("Doing chmod on source file %s" % src)
os.chmod(src, 0755)
else:
self.log.info("Did not find source file %s" % src)
except OSError, err:
raise EasyBuildError("Failed to chmod install script: %s", err)
adjust_permissions(src, stat.S_IXUSR)

# make sure $DISPLAY is not defined, which may lead to (hard to trace) problems
# this is a workaround for not being able to specify --nodisplay to the install scripts
Expand All @@ -131,27 +117,22 @@ def install_step(self):

if not '_JAVA_OPTIONS' in self.cfg['preinstallopts']:
self.cfg['preinstallopts'] = ('export _JAVA_OPTIONS="%s" && ' % self.cfg['java_options']) + self.cfg['preinstallopts']
configfile = "%s/%s" % (self.builddir, self.configfilename)
cmd = "%s ./install -v -inputFile %s %s" % (self.cfg['preinstallopts'], configfile, self.cfg['installopts'])
cmd = "%s ./install -v -inputFile %s %s" % (self.cfg['preinstallopts'], self.configfile, self.cfg['installopts'])
run_cmd(cmd, log_all=True, simple=True)

def sanity_check_step(self):
"""Custom sanity check for MATLAB."""

custom_paths = {
'files': ["bin/matlab", "bin/mcc", "bin/glnxa64/MATLAB", "bin/glnxa64/mcc",
"runtime/glnxa64/libmwmclmcrrt.so", "toolbox/local/classpath.txt"],
'dirs': ["java/jar", "toolbox/compiler"],
}
'files': ["bin/matlab", "bin/mcc", "bin/glnxa64/MATLAB", "bin/glnxa64/mcc",
"runtime/glnxa64/libmwmclmcrrt.so", "toolbox/local/classpath.txt"],
'dirs': ["java/jar", "toolbox/compiler"],
}

super(EB_MATLAB, self).sanity_check_step(custom_paths=custom_paths)

def make_module_extra(self):
"""Extend PATH and set proper _JAVA_OPTIONS (e.g., -Xmx)."""

txt = super(EB_MATLAB, self).make_module_extra()

txt += self.module_generator.set_environment('_JAVA_OPTIONS', self.cfg['java_options'])

return txt

0 comments on commit 4ddb3dc

Please sign in to comment.