Skip to content

Commit

Permalink
Merge pull request #1053 from hpcugent/eb301
Browse files Browse the repository at this point in the history
release EasyBuild v3.0.1
  • Loading branch information
boegel committed Nov 30, 2016
2 parents aa24671 + 561d502 commit b1ebbad
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 34 deletions.
11 changes: 11 additions & 0 deletions RELEASE_NOTES
Expand Up @@ -5,6 +5,17 @@ These release notes can also be consulted at http://easybuild.readthedocs.org/en

The latest version of easybuild-easyblocks provides 179 software-specific easyblocks and 30 generic easyblocks.

v3.0.1 (November 30th 2016)
---------------------------

bugfix release
- various enhancements, including:
- update SAMtools easyblock for recent versions (#1048)
- various bugfixes, including:
- fix QuantumESPRESSO easyblock to handle gipaw correctly (#1041)
- always specify name of serial Fortran compiler to ALADIN, it already knows to use MPI wrapper commands (#1050)


v3.0.0 (November 16th 2016)
---------------------------

Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/__init__.py
Expand Up @@ -44,7 +44,7 @@
# recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like
# UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0'
# This causes problems further up the dependency chain...
VERSION = LooseVersion('3.0.0')
VERSION = LooseVersion('3.0.1')
UNKNOWN = 'UNKNOWN'


Expand Down
6 changes: 3 additions & 3 deletions easybuild/easyblocks/a/aladin.py
Expand Up @@ -74,7 +74,7 @@ def configure_step(self):
if 'LIBRARY_PATH' in os.environ:
self.log.debug("Unsetting $LIBRARY_PATH (was: %s)" % os.environ['LIBRARY_PATH'])
self.orig_library_path = os.environ.pop('LIBRARY_PATH')

# build auxiliary libraries
auxlibs_dir = None

Expand Down Expand Up @@ -131,7 +131,7 @@ def configure_step(self):
}

run_cmd_qa("./build_gmkpack", qa)

os.chdir(cwd)

paths = os.getenv('PATH').split(':')
Expand Down Expand Up @@ -241,7 +241,7 @@ def configure_step(self):

stdqa = OrderedDict([
(r'Confirm library .* is .*', 'y'), # this one needs to be tried first!
(r'.*fortran 90 compiler name .*\s*:\n\(suggestions\s*: .*\)', os.getenv('F90')),
(r'.*fortran 90 compiler name .*\s*:\n\(suggestions\s*: .*\)', f90_seq),
(r'.*fortran 90 compiler interfaced with .*\s*:\n\(suggestions\s*: .*\)', f90_seq),
(r'Please type the ABSOLUTE name of .*library.*, or ignore\s*[:]*\s*[\n]*.*', ''),
(r'Please .* to save this draft configuration file :\n.*', '%s.x' % self.conf_file),
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyblocks/q/quantumespresso.py
Expand Up @@ -242,6 +242,9 @@ def configure_step(self):
self.log.info("Moved %s into %s" % (dirname, targetdir))

dirname_head = dirname.split('-')[0]
# Handle the case where the directory is preceded by 'qe-'
if dirname_head == 'qe':
dirname_head = dirname.split('-')[1]
linkname = None
if dirname_head == 'sax':
linkname = 'SaX'
Expand Down
72 changes: 42 additions & 30 deletions easybuild/easyblocks/s/samtools.py
Expand Up @@ -16,14 +16,14 @@
@author: Fotis Georgatos (Uni.Lu)
@author: Kenneth Hoste (Ghent University)
"""
from distutils.version import LooseVersion
import os
import shutil
import stat
from distutils.version import LooseVersion

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.filetools import adjust_permissions
from easybuild.tools.filetools import adjust_permissions, copy_file

class EB_SAMtools(ConfigureMake):
"""
Expand All @@ -41,7 +41,7 @@ def __init__(self, *args, **kwargs):
"misc/soap2sam.pl", "misc/varfilter.py", "misc/wgsim_eval.pl",
"misc/zoom2sam.pl", "misc/md5sum-lite", "misc/md5fa", "misc/maq2sam-short",
"misc/maq2sam-long", "misc/wgsim", "samtools"]

self.include_files = ["bam.h", "bam2bcf.h", "bam_endian.h", "errmod.h",
"kprobaln.h", "sam.h", "sam_header.h", "sample.h"]

Expand All @@ -55,7 +55,7 @@ def __init__(self, *args, **kwargs):

if LooseVersion(self.version) >= LooseVersion('0.1.19') and LooseVersion(self.version) < LooseVersion('1.0'):
self.bin_files += ["misc/bamcheck", "misc/plot-bamcheck"]

if LooseVersion(self.version) < LooseVersion('1.0'):
self.bin_files += ["bcftools/vcfutils.pl", "bcftools/bcftools"]
self.include_files += [ "bgzf.h", "faidx.h", "khash.h", "klist.h", "knetfile.h", "razf.h",
Expand All @@ -75,38 +75,50 @@ def configure_step(self):
if var in os.environ:
self.cfg.update('buildopts', '%s="%s"' % (var, os.getenv(var)))

# configuring with --prefix only supported with v1.3 and more recent
if LooseVersion(self.version) >= LooseVersion('1.3'):
super(EB_SAMtools, self).configure_step()

def install_step(self):
"""
Install by copying files to install dir
"""

for (srcdir, dest, files) in [
(self.cfg['start_dir'], 'bin', self.bin_files),
(self.cfg['start_dir'], 'lib', self.lib_files),
(self.cfg['start_dir'], 'include/bam', self.include_files)
]:

destdir = os.path.join(self.installdir, dest)
srcfile = None
try:
os.makedirs(destdir)
for filename in files:
srcfile = os.path.join(srcdir, filename)
shutil.copy2(srcfile, destdir)
except OSError, err:
raise EasyBuildError("Copying %s to installation dir %s failed: %s", srcfile, destdir, err)

# fix permissions so ownwer group and others have R-X
adjust_permissions(self.installdir, stat.S_IRGRP|stat.S_IXGRP|stat.S_IROTH|stat.S_IXOTH, add=True, recursive=True)
install_files = [
('include/bam', self.include_files),
('lib', self.lib_files),
]

# v1.3 and more recent supports 'make install', but this only installs (some of) the binaries...
if LooseVersion(self.version) >= LooseVersion('1.3'):
super(EB_SAMtools, self).install_step()

# figure out which bin files are missing, and try copying them
missing_bin_files = []
for binfile in self.bin_files:
if not os.path.exists(os.path.join(self.installdir, 'bin', os.path.basename(binfile))):
missing_bin_files.append(binfile)
install_files.append(('bin', missing_bin_files))

else:
# copy binaries manually for older versions
install_files.append(('bin', self.bin_files))

self.log.debug("Installing files by copying them 'manually': %s", install_files)
for (destdir, files) in install_files:
for fn in files:
dest = os.path.join(self.installdir, destdir, os.path.basename(fn))
copy_file(os.path.join(self.cfg['start_dir'], fn), dest)

# enable r-x permissions for group/others
perms = stat.S_IRGRP|stat.S_IXGRP|stat.S_IROTH|stat.S_IXOTH
adjust_permissions(self.installdir, perms, add=True, recursive=True)

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

custom_paths = {
'files': ['bin/%s' % x for x in [f.split('/')[-1] for f in self.bin_files]] +
['lib/%s' % x for x in self.lib_files] +
['include/bam/%s' % x for x in self.include_files],
'dirs': []
}

'files': [os.path.join('bin', os.path.basename(f)) for f in self.bin_files] +
[os.path.join('include', 'bam', f) for f in self.include_files] +
[os.path.join('lib', f) for f in self.lib_files],
'dirs': []
}
super(EB_SAMtools, self).sanity_check_step(custom_paths=custom_paths)

0 comments on commit b1ebbad

Please sign in to comment.