diff --git a/easybuild/easyblocks/a/ansys.py b/easybuild/easyblocks/a/ansys.py index 9c339aea78..53d6c4fde5 100644 --- a/easybuild/easyblocks/a/ansys.py +++ b/easybuild/easyblocks/a/ansys.py @@ -31,12 +31,12 @@ import os import stat -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.tools.run import run_cmd from easybuild.tools.filetools import adjust_permissions -class EB_ANSYS(EasyBlock): +class EB_ANSYS(PackedBinary): """Support for installing ANSYS.""" def __init__(self, *args, **kwargs): @@ -44,14 +44,6 @@ def __init__(self, *args, **kwargs): super(EB_ANSYS, self).__init__(*args, **kwargs) self.ansysver = "v%s" % ''.join(self.version.split('.')[0:2]) - def configure_step(self): - """No configuration for ANSYS.""" - pass - - def build_step(self): - """No building for ANSYS.""" - pass - def install_step(self): """Custom install procedure for ANSYS.""" licserv = self.cfg['license_server'] diff --git a/easybuild/easyblocks/a/ant.py b/easybuild/easyblocks/a/ant.py index de6b343b09..d5de4272f8 100644 --- a/easybuild/easyblocks/a/ant.py +++ b/easybuild/easyblocks/a/ant.py @@ -31,23 +31,15 @@ import os import shutil -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.tools.build_log import EasyBuildError from easybuild.tools.modules import get_software_root, get_software_version from easybuild.tools.run import run_cmd -class EB_ant(EasyBlock): +class EB_ant(PackedBinary): """Support for building and installing ant.""" - def configure_step(self): - """No configure step for ant.""" - pass - - def build_step(self): - """No build step for ant.""" - pass - def install_step(self): """Custom install procedure for ant.""" diff --git a/easybuild/easyblocks/b/bisearch.py b/easybuild/easyblocks/b/bisearch.py index 1c17057417..ba90ccb050 100644 --- a/easybuild/easyblocks/b/bisearch.py +++ b/easybuild/easyblocks/b/bisearch.py @@ -33,31 +33,23 @@ """ import os -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.tools.run import run_cmd_qa -class EB_BiSearch(EasyBlock): +class EB_BiSearch(PackedBinary): """ Support for building BiSearch. Basically just run the interactive installation script install.sh. """ - def configure_step(self): - """(no configure)""" - pass - - def build_step(self): - """(empty, building is performed in make_install step)""" - pass - def install_step(self): cmd = "./install.sh" qanda = { - 'Please enter the BiSearch root directory: ': self.installdir, - 'Please enter the path of c++ compiler [/usr/bin/g++]: ': os.getenv('CXX') - } + 'Please enter the BiSearch root directory: ': self.installdir, + 'Please enter the path of c++ compiler [/usr/bin/g++]: ': os.getenv('CXX') + } no_qa = [r'Compiling components\s*\.*'] @@ -65,11 +57,8 @@ def install_step(self): def sanity_check_step(self): """Custom sanity check for BiSearch.""" - custom_paths = { - 'files':["bin/%s" % x for x in ["fpcr", "indexing_cdna", - "indexing_genome", "makecomp"]], - 'dirs':[] - } - + 'files':['bin/%s' % x for x in ['fpcr', 'indexing_cdna', 'indexing_genome', 'makecomp']], + 'dirs':[], + } super(EB_BiSearch, self).sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/c/chimera.py b/easybuild/easyblocks/c/chimera.py index 20cf77d9fc..09a73f97da 100755 --- a/easybuild/easyblocks/c/chimera.py +++ b/easybuild/easyblocks/c/chimera.py @@ -8,29 +8,21 @@ import os -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.tools.build_log import EasyBuildError from easybuild.tools.run import run_cmd -class EB_Chimera(EasyBlock): +class EB_Chimera(PackedBinary): """Support for installing Chimera.""" - + def extract_step(self, verbose=False): """Custom extraction of sources for Chimera: unpack installation file to obtain chimera.bin installer.""" - + cmd = "unzip -d %s %s" % (self.builddir, self.src[0]['path']) run_cmd(cmd, log_all=True, simple=True) - - def configure_step(self, cmd_prefix=''): - """ skip configure """ - pass - - def build_step(self, verbose=False): - """ skip build """ - pass - + def install_step(self): """Install using chimera.bin.""" diff --git a/easybuild/easyblocks/e/eigen.py b/easybuild/easyblocks/e/eigen.py index 7cdbfb555b..049aa4b9dc 100644 --- a/easybuild/easyblocks/e/eigen.py +++ b/easybuild/easyblocks/e/eigen.py @@ -21,28 +21,16 @@ import shutil from distutils.version import LooseVersion -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.tarball import Tarball from easybuild.tools.build_log import EasyBuildError from easybuild.tools.filetools import mkdir -class EB_Eigen(EasyBlock): +class EB_Eigen(Tarball): """ Support for building Eigen. """ - def configure_step(self): - """ - No configure for Eigen. - """ - pass - - def build_step(self): - """ - No build for Eigen. - """ - pass - def install_step(self): """ Install by copying files to install dir diff --git a/easybuild/easyblocks/f/fdtd_solutions.py b/easybuild/easyblocks/f/fdtd_solutions.py index b95438764c..e7e9cd7bde 100644 --- a/easybuild/easyblocks/f/fdtd_solutions.py +++ b/easybuild/easyblocks/f/fdtd_solutions.py @@ -30,19 +30,15 @@ import glob import os import shutil +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.easyblocks.generic.rpm import rebuild_rpm -from easybuild.framework.easyblock import EasyBlock from easybuild.tools.build_log import EasyBuildError from easybuild.tools.run import run_cmd_qa -class EB_FDTD_underscore_Solutions(EasyBlock): +class EB_FDTD_underscore_Solutions(PackedBinary): """Support for building/installing FDTD Solutions.""" - def configure_step(self): - """No configuration for FDTD Solutions.""" - pass - def build_step(self): """No build step for FDTD Solutions.""" # locate RPM and rebuild it to make it relocatable diff --git a/easybuild/easyblocks/f/fluent.py b/easybuild/easyblocks/f/fluent.py index 6b1fc021ab..8e2e46babd 100644 --- a/easybuild/easyblocks/f/fluent.py +++ b/easybuild/easyblocks/f/fluent.py @@ -31,12 +31,12 @@ import stat from distutils.version import LooseVersion -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.tools.filetools import adjust_permissions from easybuild.tools.run import run_cmd -class EB_FLUENT(EasyBlock): +class EB_FLUENT(PackedBinary): """Support for installing FLUENT.""" def __init__(self, *args, **kwargs): @@ -44,17 +44,8 @@ def __init__(self, *args, **kwargs): super(EB_FLUENT, self).__init__(*args, **kwargs) self.fluent_verdir = 'v%s' % ''.join(self.version.split('.')[:2]) - def configure_step(self): - """No configuration for FLUENT.""" - pass - - def build_step(self): - """No building for FLUENT.""" - pass - def install_step(self): """Custom install procedure for FLUENT.""" - extra_args ='' # only include -noroot flag for older versions if LooseVersion(self.version) < LooseVersion('15.0'): diff --git a/easybuild/easyblocks/generic/binary.py b/easybuild/easyblocks/generic/binary.py index 402e1237c3..51ee073fd4 100644 --- a/easybuild/easyblocks/generic/binary.py +++ b/easybuild/easyblocks/generic/binary.py @@ -72,7 +72,7 @@ def __init__(self, *args, **kwargs): self.log.info("Performing staged installation via %s" % self.installdir) def extract_step(self): - """Move all source files to the build directory""" + """Copy all source files to the build directory""" self.src[0]['finalpath'] = self.builddir @@ -124,6 +124,11 @@ def post_install_step(self): super(Binary, self).post_install_step() + def sanity_check_rpath(self): + """Skip the rpath sanity check, this is binary software""" + self.log.info("RPATH sanity check is skipped when using %s easyblock (derived from Binary)", + self.__class__.__name__) + def make_module_extra(self): """Add the install directory to the PATH.""" diff --git a/easybuild/easyblocks/generic/intelbase.py b/easybuild/easyblocks/generic/intelbase.py index 74c506bcea..de9ccf8c51 100644 --- a/easybuild/easyblocks/generic/intelbase.py +++ b/easybuild/easyblocks/generic/intelbase.py @@ -362,6 +362,11 @@ def move_after_install(self): shutil.rmtree(os.path.join(self.installdir, self.name)) except OSError, err: raise EasyBuildError("Failed to move contents of %s to %s: %s", subdir, self.installdir, err) + + def sanity_check_rpath(self): + """Skip the rpath sanity check, this is binary software""" + self.log.info("RPATH sanity check is skipped when using %s easyblock (derived from IntelBase)", + self.__class__.__name__) def make_module_extra(self): """Custom variable definitions in module file.""" diff --git a/easybuild/easyblocks/generic/tarball.py b/easybuild/easyblocks/generic/tarball.py index f99ba235b0..b0fe0e0bc8 100644 --- a/easybuild/easyblocks/generic/tarball.py +++ b/easybuild/easyblocks/generic/tarball.py @@ -71,3 +71,8 @@ def install_step(self, src=None): shutil.copytree(src, self.installdir, symlinks=self.cfg['keepsymlinks']) except OSError, err: raise EasyBuildError("Copying %s to installation dir %s failed: %s", src, self.installdir, err) + + def sanity_check_rpath(self): + """Skip the rpath sanity check, this is binary software""" + self.log.info("RPATH sanity check is skipped when using %s easyblock (derived from Tarball)", + self.__class__.__name__) diff --git a/easybuild/easyblocks/i/ironpython.py b/easybuild/easyblocks/i/ironpython.py index 3a869e3cc4..5a31e5cd40 100644 --- a/easybuild/easyblocks/i/ironpython.py +++ b/easybuild/easyblocks/i/ironpython.py @@ -34,11 +34,11 @@ import os -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.tools.run import run_cmd -class EB_IronPython(EasyBlock): +class EB_IronPython(PackedBinary): """Support for building/installing IronPython.""" def __init__(self, *args, **kwargs): @@ -52,14 +52,6 @@ def extract_step(self): self.cfg.update('unpack_options', "--strip-components=1") super(EB_IronPython, self).extract_step() - def configure_step(self): - """No dedicated configure step for IronPython.""" - pass - - def build_step(self): - """No dedicated build step for IronPython.""" - pass - def install_step(self): """Custom install step for IronPython, using xbuild command.""" diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 1226d421d6..7a1926fb47 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -35,45 +35,30 @@ import os import shutil -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.binary import Binary from easybuild.tools.run import run_cmd_qa -class EB_Maple(EasyBlock): +class EB_Maple(Binary): """Support for installing Maple.""" - def extract_step(self): - """Unpacking of files is just copying Maple binary installer to build dir.""" - - for f in self.src: - shutil.copy(f['path'], os.path.join(self.builddir, f['name'])) - f['finalpath'] = self.builddir - - def configure_step(self): - """No configuration needed, binary installer""" - pass - - def build_step(self): - """No compilation needed, binary installer""" - pass - def install_step(self): """Interactive install of Maple.""" cmd = "%s/Maple%sLinuxX86_64Installer.bin" % (self.builddir, self.cfg['version']) qa = { - 'PRESS TO CONTINUE:': '', - 'DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N):': 'Y', - 'ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT :': self.installdir, - 'IS THIS CORRECT? (Y/N):': 'Y', - 'Do you wish to have a shortcut installed on your desktop? ->1- Yes 2- No ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::': '2', - '->1- Single User License 2- Network License ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::': '2', - 'PRESS TO EXIT THE INSTALLER:': '', - 'License server (DEFAULT: ):': self.cfg['license_server'], - 'Port number (optional) (DEFAULT: ):': '', - '->1- Configure toolbox for Matlab 2- Do not configure at this time ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::': '2' - } + 'PRESS TO CONTINUE:': '', + 'DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N):': 'Y', + 'ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT :': self.installdir, + 'IS THIS CORRECT? (Y/N):': 'Y', + 'Do you wish to have a shortcut installed on your desktop? ->1- Yes 2- No ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::': '2', + '->1- Single User License 2- Network License ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::': '2', + 'PRESS TO EXIT THE INSTALLER:': '', + 'License server (DEFAULT: ):': self.cfg['license_server'], + 'Port number (optional) (DEFAULT: ):': '', + '->1- Configure toolbox for Matlab 2- Do not configure at this time ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::': '2' + } no_qa = ['Graphical installers are not supported by the VM. The console mode will be used instead...', 'Extracting the JRE from the installer archive...', @@ -86,10 +71,8 @@ def install_step(self): def sanity_check_step(self): """Custom sanity check for Maple.""" - custom_paths = { - 'files': ['bin/maple', 'lib/maple.mla'] , - 'dirs':[] - } - + 'files': ['bin/maple', 'lib/maple.mla'] , + 'dirs':[] + } super(EB_Maple, self).sanity_check_step(custom_paths=custom_paths) diff --git a/easybuild/easyblocks/m/matlab.py b/easybuild/easyblocks/m/matlab.py index 51c28294b3..8de10acbbe 100644 --- a/easybuild/easyblocks/m/matlab.py +++ b/easybuild/easyblocks/m/matlab.py @@ -37,7 +37,7 @@ import shutil import stat -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.build_log import EasyBuildError from easybuild.tools.filetools import adjust_permissions, read_file, write_file @@ -45,7 +45,7 @@ from easybuild.tools.systemtools import get_shared_lib_ext -class EB_MATLAB(EasyBlock): +class EB_MATLAB(PackedBinary): """Support for installing MATLAB.""" def __init__(self, *args, **kwargs): @@ -59,7 +59,7 @@ def extra_options(): extra_vars = { 'java_options': ['-Xmx256m', "$_JAVA_OPTIONS value set for install and in module file.", CUSTOM], } - return EasyBlock.extra_options(extra_vars) + return PackedBinary.extra_options(extra_vars) def configure_step(self): """Configure MATLAB installation: create license file.""" @@ -99,10 +99,6 @@ def configure_step(self): self.log.debug('configuration file written to %s:\n %s', self.configfile, config) - def build_step(self): - """No building of MATLAB, no sources available.""" - pass - def install_step(self): """MATLAB install procedure using 'install' command.""" diff --git a/easybuild/easyblocks/m/mcr.py b/easybuild/easyblocks/m/mcr.py index 78620399a4..941853779d 100644 --- a/easybuild/easyblocks/m/mcr.py +++ b/easybuild/easyblocks/m/mcr.py @@ -37,16 +37,16 @@ import os import shutil import stat - from distutils.version import LooseVersion -from easybuild.framework.easyblock import EasyBlock + +from easybuild.easyblocks.generic.packedbinary import PackedBinary 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 -class EB_MCR(EasyBlock): +class EB_MCR(PackedBinary): """Support for installing MCR.""" def __init__(self, *args, **kwargs): @@ -62,7 +62,7 @@ def extra_options(): extra_vars = { 'java_options': ['-Xmx256m', "$_JAVA_OPTIONS value set for install and in module file.", CUSTOM], } - return EasyBlock.extra_options(extra_vars) + return PackedBinary.extra_options(extra_vars) def configure_step(self): """Configure MCR installation: create license file.""" @@ -85,10 +85,6 @@ def configure_step(self): self.log.debug("configuration file written to %s:\n %s", configfile, config) - def build_step(self): - """No building of MCR, no sources available.""" - pass - def install_step(self): """MCR install procedure using 'install' command.""" diff --git a/easybuild/easyblocks/p/pgi.py b/easybuild/easyblocks/p/pgi.py index 36872456b3..04f3617a24 100644 --- a/easybuild/easyblocks/p/pgi.py +++ b/easybuild/easyblocks/p/pgi.py @@ -38,7 +38,7 @@ import sys import easybuild.tools.environment as env -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.build_log import EasyBuildError from easybuild.tools.filetools import find_flexlm_license, write_file @@ -65,7 +65,7 @@ """ -class EB_PGI(EasyBlock): +class EB_PGI(PackedBinary): """ Support for installing the PGI compilers """ @@ -78,7 +78,7 @@ def extra_options(): 'install_managed': [True, "Install OpenACC Unified Memory Evaluation package", CUSTOM], 'install_nvidia': [True, "Install CUDA Toolkit Components", CUSTOM], } - return EasyBlock.extra_options(extra_vars) + return PackedBinary.extra_options(extra_vars) def __init__(self, *args, **kwargs): """Easyblock constructor, define custom class variables specific to PGI.""" @@ -91,7 +91,7 @@ def __init__(self, *args, **kwargs): def configure_step(self): """ - Handle license file. + Handle license file. """ default_lic_env_var = 'PGROUPD_LICENSE_FILE' lic_specs, self.license_env_var = find_flexlm_license(custom_env_vars=[default_lic_env_var], @@ -111,13 +111,6 @@ def configure_step(self): raise EasyBuildError("No viable license specifications found; specify 'license_file' or " + "define $PGROUPD_LICENSE_FILE or $LM_LICENSE_FILE") - - def build_step(self): - """ - Dummy build method: nothing to build - """ - pass - def install_step(self): """Install by running install command.""" @@ -142,7 +135,7 @@ def install_step(self): cmd = "%s -x %s -g77 /" % (filename, install_abs_subdir) run_cmd(cmd, log_all=True, simple=True) - + # If an OS libnuma is NOT found, makelocalrc creates symbolic links to libpgnuma.so # If we use the EB libnuma, delete those symbolic links to ensure they are not used if get_software_root("numactl"): diff --git a/easybuild/easyblocks/p/picard.py b/easybuild/easyblocks/p/picard.py index c7a2d301bb..4b6e805e8b 100644 --- a/easybuild/easyblocks/p/picard.py +++ b/easybuild/easyblocks/p/picard.py @@ -35,23 +35,15 @@ import os import re import shutil - from distutils.version import LooseVersion -from easybuild.framework.easyblock import EasyBlock + +from easybuild.easyblocks.generic.tarball import Tarball from easybuild.tools.build_log import EasyBuildError -class EB_picard(EasyBlock): +class EB_picard(Tarball): """Support for building and installing picard.""" - def configure_step(self): - """No configure step for picard""" - pass - - def build_step(self): - """No build step for picard""" - pass - def install_step(self): """Install picard by copying required files""" # recent version may contain more than just the picard-tools subdirectory @@ -83,7 +75,7 @@ def sanity_check_step(self): 'picard', 'picard-lib' ] - + custom_paths = { 'files': ["%s.jar" % x for x in jar_files], 'dirs': [], diff --git a/easybuild/easyblocks/s/samcef.py b/easybuild/easyblocks/s/samcef.py index cf7dde7572..ba2f624fc6 100644 --- a/easybuild/easyblocks/s/samcef.py +++ b/easybuild/easyblocks/s/samcef.py @@ -28,22 +28,14 @@ @author: Kenneth Hoste (Ghent University) """ import stat -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.tools.filetools import adjust_permissions from easybuild.tools.run import run_cmd_qa -class EB_Samcef(EasyBlock): +class EB_Samcef(PackedBinary): """Support for building/installing Samcef.""" - def configure_step(self): - """No configuration step for Samcef.""" - pass - - def build_step(self): - """No build step for Samcef.""" - pass - def install_step(self): """Custom install procedure for Samcef.""" diff --git a/easybuild/easyblocks/t/totalview.py b/easybuild/easyblocks/t/totalview.py index bde00f72d4..d066d6f387 100644 --- a/easybuild/easyblocks/t/totalview.py +++ b/easybuild/easyblocks/t/totalview.py @@ -19,20 +19,20 @@ import os import easybuild.tools.environment as env -from easybuild.framework.easyblock import EasyBlock +from easybuild.easyblocks.generic.packedbinary import PackedBinary from easybuild.tools.build_log import EasyBuildError from easybuild.tools.filetools import find_flexlm_license from easybuild.tools.modules import get_software_root from easybuild.tools.run import run_cmd -class EB_TotalView(EasyBlock): +class EB_TotalView(PackedBinary): """EasyBlock for TotalView""" def __init__(self, *args, **kwargs): """Initialisation of custom class variables for Totalview""" super(EB_TotalView, self).__init__(*args, **kwargs) - + self.license_file = 'UNKNOWN' self.license_env_var = 'UNKNOWN' @@ -58,10 +58,6 @@ def configure_step(self): raise EasyBuildError("No viable license specifications found; specify 'license_file' or "+ "define $LM_LICENSE_FILE") - def build_step(self): - """No building for TotalView.""" - pass - def install_step(self): """Custom install procedure for TotalView."""