Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
easyblock = 'ConfigureMake'

name = 'AFNI'
version = '18.3.00'
versionsuffix = '-Python-%(pyver)s'

homepage = 'http://afni.nimh.nih.gov/'
description = """AFNI is a set of C programs for processing, analyzing, and displaying functional MRI (FMRI) data -
a technique for mapping human brain activity."""

toolchain = {'name': 'foss', 'version': '2018b'}
toolchainopts = {'openmp': True, 'pic': True}

source_urls = ['https://github.com/afni/afni/archive/']
sources = ['AFNI_%(version)s.tar.gz']
patches = ['AFNI-18.1.09_omp-pragma-statement-fix.patch']
checksums = [
'01ecba09b1dfe270937f8cde204c18f38f9c4d543b1af3a7ccb17b04688f632d', # AFNI_18.3.00.tar.gz
'8b739ddc09d6e398ac7fa86d89f6a02f26f2b58b17caea627d5c07de5282aab2', # AFNI-18.1.09_omp-pragma-statement-fix.patch
]

builddependencies = [('M4', '1.4.18')]

dependencies = [
('tcsh', '6.20.00'),
('Python', '3.6.6'),
('X11', '20180604'),
('motif', '2.3.8'),
('R', '3.5.1'),
('PyQt5', '5.11.3', versionsuffix),
('expat', '2.2.5'),
('libpng', '1.6.34'),
('libjpeg-turbo', '2.0.0'),
('GSL', '2.5'),
('GLib', '2.54.3'), # must match version used in Qt5 (via PyQt5)
('zlib', '1.2.11'),
]

skipsteps = ['configure', 'install']

prebuildopts = "cd src && cp Makefile.linux_openmp_64 Makefile && "
buildopts = 'totality LGIFTI="$EBROOTEXPAT/lib/libexpat.a" LDPYTHON="-lpython%(pyshortver)sm" '
buildopts += 'CC="${CC} ${CFLAGS} -fPIC -DREAD_WRITE_64 -DLINUX2 \$(CEXTRA)" '
buildopts += 'CCVOL="${CC} ${CFLAGS} -fPIC -DREAD_WRITE_64 -DLINUX2 \$(CEXTRA)" '
buildopts += 'CCFAST="${CC} ${CFLAGS} -fPIC -DREAD_WRITE_64 -DLINUX2 \$(CEXTRA)" '
buildopts += 'CCOLD="${CC} ${CFLAGS} -fPIC -DREAD_WRITE_64 -DLINUX2 \$(CEXTRA)" '
buildopts += 'CCMIN="${CC} ${CFLAGS} -fPIC -DREAD_WRITE_64 -DLINUX2 \$(CEXTRA)" '
buildopts += 'CCSVD="${CC} ${CFLAGS} -fPIC -DREAD_WRITE_64 -DLINUX2 \$(CEXTRA)" '
buildopts += 'LD="${CC} \$(CPROF)" LZLIB="${EBROOTZLIB}/lib/libz.a" XLIBS="-lXm -lXt" '
buildopts += 'IFLAGS="-I. -I$EBROOTPYTHON/include/python%(pyshortver)sm '
buildopts += '-I$EBROOTGLIB/lib/glib-2.0/include -I$EBROOTGLIB/include/glib-2.0"'
buildopts += ' INSTALLDIR=%(installdir)s'

parallel = 1

modextrapaths = {'PATH': ['']}

sanity_check_paths = {
'files': ['afni'],
'dirs': [],
}

moduleclass = 'bio'
41 changes: 41 additions & 0 deletions easybuild/easyconfigs/t/tcsh/tcsh-6.20.00-GCCcore-7.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
#
# Copyright:: Copyright 2012-2013 University of Luxembourg/Computer Science and Communications Research Unit
# Authors:: Valentin Plugaru <valentin.plugaru@gmail.com>
# License:: MIT/GPL
# $Id$
#
# This work implements a part of the HPCBIOS project and is a component of the policy:
# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_05-06.html
##
easyblock = 'ConfigureMake'

name = 'tcsh'
version = '6.20.00'

homepage = 'http://www.tcsh.org'
description = """Tcsh is an enhanced, but completely compatible version of the Berkeley UNIX C shell (csh).
It is a command language interpreter usable both as an interactive login shell and a shell script command
processor. It includes a command-line editor, programmable word completion, spelling correction, a history
mechanism, job control and a C-like syntax."""

toolchain = {'name': 'GCCcore', 'version': '7.3.0'}

source_urls = [
'ftp://ftp.astron.com/pub/%(namelower)s',
'ftp://ftp.astron.com/pub/%(namelower)s/old',
]
sources = [SOURCELOWER_TAR_GZ]
checksums = ['b89de7064ab54dac454a266cfe5d8bf66940cb5ed048d0c30674ea62e7ecef9d']

builddependencies = [('binutils', '2.30')]

dependencies = [('ncurses', '6.1')]

sanity_check_paths = {
'files': ["bin/tcsh"],
'dirs': []
}

moduleclass = 'tools'
33 changes: 18 additions & 15 deletions test/easyconfigs/easyconfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

@author: Kenneth Hoste (Ghent University)
"""

import copy
import glob
import os
import re
Expand All @@ -37,25 +35,22 @@
import tempfile
from distutils.version import LooseVersion
from vsc.utils import fancylogger
from vsc.utils.missing import nub
from unittest import TestCase, TestLoader, main

import easybuild.main as main
import easybuild.main as eb_main
import easybuild.tools.options as eboptions
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig.default import DEFAULT_CONFIG
from easybuild.framework.easyconfig.format.format import DEPENDENCY_PARAMETERS
from easybuild.framework.easyconfig.easyconfig import EasyConfig
from easybuild.framework.easyconfig.easyconfig import get_easyblock_class, letter_dir_for, resolve_template
from easybuild.framework.easyconfig.parser import EasyConfigParser, fetch_parameters_from_easyconfig
from easybuild.framework.easyconfig.tools import check_sha256_checksums, dep_graph, get_paths_for, process_easyconfig
from easybuild.tools import config
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.config import build_option
from easybuild.tools.filetools import change_dir, write_file
from easybuild.tools.filetools import change_dir, remove_file, write_file
from easybuild.tools.module_naming_scheme import GENERAL_CLASS
from easybuild.tools.module_naming_scheme.easybuild_mns import EasyBuildMNS
from easybuild.tools.module_naming_scheme.utilities import det_full_ec_version
from easybuild.tools.modules import modules_tool
from easybuild.tools.robot import check_conflicts, resolve_dependencies
Expand Down Expand Up @@ -98,7 +93,7 @@ class EasyConfigTest(TestCase):
log = fancylogger.getLogger("EasyConfigTest", fname=False)

# make sure a logger is present for main
main._log = log
eb_main._log = log
ordered_specs = None
parsed_easyconfigs = []

Expand Down Expand Up @@ -134,10 +129,7 @@ def test_dep_graph(self):

dep_graph(fn, self.ordered_specs)

try:
os.remove(fn)
except OSError, err:
log.error("Failed to remove %s: %s" % (fn, err))
remove_file(fn)
else:
print "(skipped dep graph test)"

Expand Down Expand Up @@ -215,6 +207,15 @@ def check_dep_vars(dep, dep_vars):
if len(dep_vars) == 1:
break

# filter R dep for a specific version of Python 2.x
if dep == 'R' and len(dep_vars) > 1:
for key in dep_vars.keys():
if '; versionsuffix: -Python-2' in key:
dep_vars.pop(key)
# always retain at least one variant
if len(dep_vars) == 1:
break

# filter out Java 'wrapper'
# i.e. if the version of one is a prefix of the version of the other one (e.g. 1.8 & 1.8.0_181)
elif dep == 'Java' and len(dep_vars) == 2:
Expand Down Expand Up @@ -397,6 +398,7 @@ def test_zzz_cleanup(self):
"""Dummy test to clean up global temporary directory."""
shutil.rmtree(self.TMPDIR)


def template_easyconfig_test(self, spec):
"""Tests for an individual easyconfig: parsing, instantiating easyblock, check patches, ..."""

Expand Down Expand Up @@ -435,7 +437,7 @@ def template_easyconfig_test(self, spec):
# check that automagic fallback to ConfigureMake isn't done (deprecated behaviour)
fn = os.path.basename(spec)
error_msg = "%s relies on automagic fallback to ConfigureMake, should use easyblock = 'ConfigureMake' instead" % fn
self.assertTrue(easyblock or not app_class is ConfigureMake, error_msg)
self.assertTrue(easyblock or app_class is not ConfigureMake, error_msg)

app = app_class(ec)

Expand Down Expand Up @@ -467,7 +469,7 @@ def template_easyconfig_test(self, spec):
if ec['toolchain']['version'] == 'system':
binutils_complete_dependencies = ['M4', 'Bison', 'flex', 'help2man', 'zlib', 'binutils']
requires_binutils &= bool(ec['name'] not in binutils_complete_dependencies)

# if no sources/extensions/components are specified, it's just a bundle (nothing is being compiled)
requires_binutils &= bool(ec['sources'] or ec['exts_list'] or ec.get('components'))

Expand All @@ -486,7 +488,7 @@ def template_easyconfig_test(self, spec):
patch_full = os.path.join(specdir, patch)
msg = "Patch file %s is available for %s" % (patch_full, specfn)
self.assertTrue(os.path.isfile(patch_full), msg)
ext_patches = []

for ext in ec['exts_list']:
if isinstance(ext, (tuple, list)) and len(ext) == 3:
self.assertTrue(isinstance(ext[2], dict), "3rd element of extension spec is a dictionary")
Expand Down Expand Up @@ -598,5 +600,6 @@ def suite():
print "Found %s easyconfigs..." % cnt
return TestLoader().loadTestsFromTestCase(EasyConfigTest)


if __name__ == '__main__':
main()