From ca3a79878bfc64d2932b2e3bd93154963beac61a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 19 Oct 2018 14:56:34 +0200 Subject: [PATCH 1/5] adding easyconfigs: AFNI-18.3.00-foss-2018b-Python-3.6.6.eb, tcsh-6.20.00-GCCcore-7.3.0.eb, PyQt5-5.11.3-foss-2018b-Python-3.6.6.eb, SIP-4.19.13-foss-2018b-Python-3.6.6.eb --- .../AFNI-18.3.00-foss-2018b-Python-3.6.6.eb | 58 +++++++++++++++++++ .../PyQt5-5.11.3-foss-2018b-Python-3.6.6.eb | 36 ++++++++++++ .../SIP-4.19.13-foss-2018b-Python-3.6.6.eb | 31 ++++++++++ .../t/tcsh/tcsh-6.20.00-GCCcore-7.3.0.eb | 41 +++++++++++++ 4 files changed, 166 insertions(+) create mode 100644 easybuild/easyconfigs/a/AFNI/AFNI-18.3.00-foss-2018b-Python-3.6.6.eb create mode 100644 easybuild/easyconfigs/p/PyQt5/PyQt5-5.11.3-foss-2018b-Python-3.6.6.eb create mode 100644 easybuild/easyconfigs/s/SIP/SIP-4.19.13-foss-2018b-Python-3.6.6.eb create mode 100644 easybuild/easyconfigs/t/tcsh/tcsh-6.20.00-GCCcore-7.3.0.eb diff --git a/easybuild/easyconfigs/a/AFNI/AFNI-18.3.00-foss-2018b-Python-3.6.6.eb b/easybuild/easyconfigs/a/AFNI/AFNI-18.3.00-foss-2018b-Python-3.6.6.eb new file mode 100644 index 000000000000..41694af89759 --- /dev/null +++ b/easybuild/easyconfigs/a/AFNI/AFNI-18.3.00-foss-2018b-Python-3.6.6.eb @@ -0,0 +1,58 @@ +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} + +# detailed release notes are available at http://afni.nimh.nih.gov/pub/dist/doc/misc/history/afni_hist_level1_all.html +# afni_src.tgz tends to be updated in place (without changing the timestamp?!) +source_urls = ['https://github.com/afni/afni/archive/'] +sources = ['AFNI_%(version)s.tar.gz'] + +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' diff --git a/easybuild/easyconfigs/p/PyQt5/PyQt5-5.11.3-foss-2018b-Python-3.6.6.eb b/easybuild/easyconfigs/p/PyQt5/PyQt5-5.11.3-foss-2018b-Python-3.6.6.eb new file mode 100644 index 000000000000..efe26aad8bed --- /dev/null +++ b/easybuild/easyconfigs/p/PyQt5/PyQt5-5.11.3-foss-2018b-Python-3.6.6.eb @@ -0,0 +1,36 @@ +easyblock = 'ConfigureMakePythonPackage' + +name = 'PyQt5' +version = '5.11.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.riverbankcomputing.co.uk/software/pyqt' +description = """PyQt5 is a set of Python bindings for v5 of the Qt application framework from The Qt Company.""" + +toolchain = {'name': 'foss', 'version': '2018b'} +toolchainopts = {'cstd': 'c++11'} + +source_urls = ['http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-%(version)s'] +sources = ['%(name)s_gpl-%(version)s.tar.gz'] +checksums = ['c9b57d15601d436faf35dacf8e0acefa220194829a653e771e80b189b3261073'] + +dependencies = [ + ('Python', '3.6.6'), + ('SIP', '4.19.13', versionsuffix), + ('Qt5', '5.10.1'), +] + +configopts = "configure.py --confirm-license --verbose" +configopts += " --destdir=%(installdir)s/lib/python%(pyshortver)s/site-packages " +configopts += " --no-sip-files" + +options = {'modulename': '%(name)s'} + +modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/s/SIP/SIP-4.19.13-foss-2018b-Python-3.6.6.eb b/easybuild/easyconfigs/s/SIP/SIP-4.19.13-foss-2018b-Python-3.6.6.eb new file mode 100644 index 000000000000..bff94fbd9b4e --- /dev/null +++ b/easybuild/easyconfigs/s/SIP/SIP-4.19.13-foss-2018b-Python-3.6.6.eb @@ -0,0 +1,31 @@ +# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild +# Author: Bart Verleye +# Center for eResearch, Auckland +easyblock = 'ConfigureMakePythonPackage' + +name = 'SIP' +version = '4.19.13' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.riverbankcomputing.com/software/sip/' +description = """SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries.""" + +toolchain = {'name': 'foss', 'version': '2018b'} + +source_urls = ['http://sourceforge.net/projects/pyqt/files/sip/sip-%(version)s'] +sources = [SOURCELOWER_TAR_GZ] +checksums = ['e353a7056599bf5fbd5d3ff9842a6ab2ea3cf4e0304a0f925ec5862907c0d15e'] + +dependencies = [('Python', '3.6.6')] + +configopts = "configure.py --bindir %(installdir)s/bin --incdir %(installdir)s/include " +configopts += "--destdir %(installdir)s/lib/python%(pyshortver)s/site-packages" + +sanity_check_paths = { + 'files': ['bin/sip', 'include/sip.h'] + + ['lib/python%%(pyshortver)s/site-packages/%s' % x + for x in ['sip.%s' % SHLIB_EXT, 'sipconfig.py', 'sipdistutils.py']], + 'dirs': [], +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/t/tcsh/tcsh-6.20.00-GCCcore-7.3.0.eb b/easybuild/easyconfigs/t/tcsh/tcsh-6.20.00-GCCcore-7.3.0.eb new file mode 100644 index 000000000000..5bd9169ede5c --- /dev/null +++ b/easybuild/easyconfigs/t/tcsh/tcsh-6.20.00-GCCcore-7.3.0.eb @@ -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 +# 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' From 1731b7c3b602f661cd61f188c73d43f6720cdd68 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 19 Oct 2018 15:37:12 +0200 Subject: [PATCH 2/5] add missing patch to AFNI 18.3.00 easyconfig + include M4 as a build dep --- .../a/AFNI/AFNI-18.3.00-foss-2018b-Python-3.6.6.eb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/a/AFNI/AFNI-18.3.00-foss-2018b-Python-3.6.6.eb b/easybuild/easyconfigs/a/AFNI/AFNI-18.3.00-foss-2018b-Python-3.6.6.eb index 41694af89759..b2ba202d6c26 100644 --- a/easybuild/easyconfigs/a/AFNI/AFNI-18.3.00-foss-2018b-Python-3.6.6.eb +++ b/easybuild/easyconfigs/a/AFNI/AFNI-18.3.00-foss-2018b-Python-3.6.6.eb @@ -11,10 +11,15 @@ description = """AFNI is a set of C programs for processing, analyzing, and disp toolchain = {'name': 'foss', 'version': '2018b'} toolchainopts = {'openmp': True, 'pic': True} -# detailed release notes are available at http://afni.nimh.nih.gov/pub/dist/doc/misc/history/afni_hist_level1_all.html -# afni_src.tgz tends to be updated in place (without changing the timestamp?!) 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'), From 7ebcf81bb8e6fb60e40de2bd2621666c5f22eaa5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Dec 2018 15:20:10 +0100 Subject: [PATCH 3/5] remove unneeded SIP easyconfig --- .../SIP-4.19.13-foss-2018b-Python-3.6.6.eb | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 easybuild/easyconfigs/s/SIP/SIP-4.19.13-foss-2018b-Python-3.6.6.eb diff --git a/easybuild/easyconfigs/s/SIP/SIP-4.19.13-foss-2018b-Python-3.6.6.eb b/easybuild/easyconfigs/s/SIP/SIP-4.19.13-foss-2018b-Python-3.6.6.eb deleted file mode 100644 index bff94fbd9b4e..000000000000 --- a/easybuild/easyconfigs/s/SIP/SIP-4.19.13-foss-2018b-Python-3.6.6.eb +++ /dev/null @@ -1,31 +0,0 @@ -# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild -# Author: Bart Verleye -# Center for eResearch, Auckland -easyblock = 'ConfigureMakePythonPackage' - -name = 'SIP' -version = '4.19.13' -versionsuffix = '-Python-%(pyver)s' - -homepage = 'http://www.riverbankcomputing.com/software/sip/' -description = """SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries.""" - -toolchain = {'name': 'foss', 'version': '2018b'} - -source_urls = ['http://sourceforge.net/projects/pyqt/files/sip/sip-%(version)s'] -sources = [SOURCELOWER_TAR_GZ] -checksums = ['e353a7056599bf5fbd5d3ff9842a6ab2ea3cf4e0304a0f925ec5862907c0d15e'] - -dependencies = [('Python', '3.6.6')] - -configopts = "configure.py --bindir %(installdir)s/bin --incdir %(installdir)s/include " -configopts += "--destdir %(installdir)s/lib/python%(pyshortver)s/site-packages" - -sanity_check_paths = { - 'files': ['bin/sip', 'include/sip.h'] + - ['lib/python%%(pyshortver)s/site-packages/%s' % x - for x in ['sip.%s' % SHLIB_EXT, 'sipconfig.py', 'sipdistutils.py']], - 'dirs': [], -} - -moduleclass = 'lang' From 73addfb506f845e419f04bb0e1dca993c3908aaf Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Dec 2018 16:42:02 +0100 Subject: [PATCH 4/5] filter R dep variant if it's for a specific version of Python 2 --- test/easyconfigs/easyconfigs.py | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/test/easyconfigs/easyconfigs.py b/test/easyconfigs/easyconfigs.py index d6ca560d79f4..54e5e19ae5ea 100644 --- a/test/easyconfigs/easyconfigs.py +++ b/test/easyconfigs/easyconfigs.py @@ -27,8 +27,6 @@ @author: Kenneth Hoste (Ghent University) """ - -import copy import glob import os import re @@ -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 @@ -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 = [] @@ -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)" @@ -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 + elif 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: @@ -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, ...""" @@ -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) @@ -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')) @@ -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") @@ -598,5 +600,6 @@ def suite(): print "Found %s easyconfigs..." % cnt return TestLoader().loadTestsFromTestCase(EasyConfigTest) + if __name__ == '__main__': main() From f32abd6a466304523dffb233074a197e17b4711d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Dec 2018 17:19:23 +0100 Subject: [PATCH 5/5] fix filtering for R dep variant specific to Python 2.x --- test/easyconfigs/easyconfigs.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/easyconfigs/easyconfigs.py b/test/easyconfigs/easyconfigs.py index 54e5e19ae5ea..fe190009c23a 100644 --- a/test/easyconfigs/easyconfigs.py +++ b/test/easyconfigs/easyconfigs.py @@ -207,14 +207,14 @@ def check_dep_vars(dep, dep_vars): if len(dep_vars) == 1: break - # filter R dep for a specific version of Python 2.x - elif 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 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)