Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix use of deprecated functionality, enhance unit tests to check for it #523

Merged
merged 15 commits into from Dec 16, 2014
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/abaqus.py
Expand Up @@ -35,7 +35,7 @@

from easybuild.easyblocks.generic.binary import Binary
from easybuild.framework.easyblock import EasyBlock
from easybuild.tools.filetools import run_cmd
from easybuild.tools.run import run_cmd
from distutils.version import LooseVersion


Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/acml.py
Expand Up @@ -37,7 +37,7 @@

from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd_qa
from easybuild.tools.run import run_cmd_qa


class EB_ACML(EasyBlock):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/aladin.py
Expand Up @@ -38,9 +38,9 @@
import easybuild.tools.toolchain as toolchain
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd, run_cmd_qa
from easybuild.tools.modules import get_software_root
from easybuild.tools.ordereddict import OrderedDict
from easybuild.tools.run import run_cmd, run_cmd_qa


class EB_ALADIN(EasyBlock):
Expand Down
3 changes: 1 addition & 2 deletions easybuild/easyblocks/a/allinea.py
Expand Up @@ -42,13 +42,12 @@ class EB_Allinea(Binary):
@staticmethod
def extra_options(extra_vars=None):
"""Define extra easyconfig parameters specific to Allinea."""

orig_vars = dict(Binary.extra_options(extra_vars))
allinea_vars = {
'templates': [[], "List of templates.", CUSTOM],
}
allinea_vars.update(orig_vars)
return allinea_vars.items()
return Binary.extra_options(allinea_vars)

def extract_step(self):
"""Extract Allinea installation files."""
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/ant.py
Expand Up @@ -33,7 +33,7 @@

from easybuild.framework.easyblock import EasyBlock
from easybuild.tools.modules import get_software_root, get_software_version
from easybuild.tools.filetools import run_cmd
from easybuild.tools.run import run_cmd


class EB_ant(EasyBlock):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/arb.py
Expand Up @@ -32,7 +32,7 @@

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.environment import setvar
from easybuild.tools.filetools import run_cmd
from easybuild.tools.run import run_cmd


class EB_ARB(ConfigureMake):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/atlas.py
Expand Up @@ -40,8 +40,8 @@

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd
from easybuild.tools.modules import get_software_root
from easybuild.tools.run import run_cmd
from easybuild.tools.systemtools import get_cpu_speed


Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/bisearch.py
Expand Up @@ -34,7 +34,7 @@
import os

from easybuild.framework.easyblock import EasyBlock
from easybuild.tools.filetools import run_cmd_qa
from easybuild.tools.run import run_cmd_qa


class EB_BiSearch(EasyBlock):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/blacs.py
Expand Up @@ -38,7 +38,7 @@
import shutil

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.filetools import run_cmd
from easybuild.tools.run import run_cmd


# also used by ScaLAPACK
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/charmm.py
Expand Up @@ -34,7 +34,7 @@
from easybuild.framework.easyconfig import CUSTOM
from easybuild.framework.easyblock import EasyBlock
from easybuild.tools.modules import get_software_root, get_software_version
from easybuild.tools.filetools import run_cmd
from easybuild.tools.run import run_cmd
import easybuild.tools.toolchain as toolchain

# Possible systemsizes for CHARMM
Expand Down
17 changes: 9 additions & 8 deletions easybuild/easyblocks/c/clang.py
Expand Up @@ -41,8 +41,9 @@

from easybuild.easyblocks.generic.cmakemake import CMakeMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd, mkdir
from easybuild.tools.filetools import mkdir
from easybuild.tools.modules import get_software_root
from easybuild.tools.run import run_cmd
from easybuild.tools.systemtools import get_os_name, get_os_version

# List of all possible build targets for Clang
Expand All @@ -56,13 +57,13 @@ class EB_Clang(CMakeMake):

@staticmethod
def extra_options():
extra_vars = [
('assertions', [True, "Enable assertions. Helps to catch bugs in Clang.", CUSTOM]),
('build_targets', [["X86"], "Build targets for LLVM. Possible values: " + ', '.join(CLANG_TARGETS), CUSTOM]),
('bootstrap', [True, "Bootstrap Clang using GCC", CUSTOM]),
('usepolly', [False, "Build Clang with polly", CUSTOM]),
('static_analyzer', [True, "Install the static analyser of Clang", CUSTOM]),
]
extra_vars = {
'assertions': [True, "Enable assertions. Helps to catch bugs in Clang.", CUSTOM],
'build_targets': [["X86"], "Build targets for LLVM. Possible values: " + ', '.join(CLANG_TARGETS), CUSTOM],
'bootstrap': [True, "Bootstrap Clang using GCC", CUSTOM],
'usepolly': [False, "Build Clang with polly", CUSTOM],
'static_analyzer': [True, "Install the static analyser of Clang", CUSTOM],
}

return CMakeMake.extra_options(extra_vars)

Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/cp2k.py
Expand Up @@ -44,8 +44,8 @@
import easybuild.tools.toolchain as toolchain
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd
from easybuild.tools.modules import get_software_root, get_software_version
from easybuild.tools.run import run_cmd
from easybuild.tools.systemtools import get_avail_core_count

# CP2K needs this version of libxc
Expand Down
8 changes: 4 additions & 4 deletions easybuild/easyblocks/c/cplex.py
Expand Up @@ -39,7 +39,7 @@
import easybuild.tools.environment as env
from easybuild.easyblocks.generic.binary import Binary
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd_qa
from easybuild.tools.run import run_cmd_qa


class EB_CPLEX(Binary):
Expand All @@ -55,10 +55,10 @@ def __init__(self, *args, **kwargs):

@staticmethod
def extra_options():
extra_vars = [
extra_vars = {
# staged install via a tmp dir can help with the hard (potentially faulty) check on available disk space
('staged_install', [False, "Should the installation should be staged via a temporary dir?", CUSTOM]),
]
'staged_install': [False, "Should the installation should be staged via a temporary dir?", CUSTOM],
}
return Binary.extra_options(extra_vars)

def install_step(self):
Expand Down
3 changes: 2 additions & 1 deletion easybuild/easyblocks/c/cuda.py
Expand Up @@ -21,7 +21,8 @@
import os

from easybuild.easyblocks.generic.binary import Binary
from easybuild.tools.filetools import patch_perl_script_autoflush, run_cmd, run_cmd_qa
from easybuild.tools.filetools import patch_perl_script_autoflush
from easybuild.tools.run import run_cmd, run_cmd_qa
from distutils.version import LooseVersion


Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/d/doxygen.py
Expand Up @@ -33,7 +33,7 @@
"""

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.filetools import run_cmd
from easybuild.tools.run import run_cmd


class EB_Doxygen(ConfigureMake):
Expand Down
25 changes: 16 additions & 9 deletions easybuild/easyblocks/e/easybuildmeta.py
Expand Up @@ -29,7 +29,9 @@
"""
import copy
import os
from distutils.version import LooseVersion

import easybuild.tools.environment as env
from easybuild.framework.easyblock import EasyBlock
from easybuild.easyblocks.generic.pythonpackage import PythonPackage
from easybuild.tools.modules import get_software_root_env_var_name
Expand Down Expand Up @@ -126,18 +128,23 @@ def sanity_check_step(self):

# set of sanity check paths to check for EasyBuild
custom_paths = {
'files': ['bin/eb'],
'dirs': [self.pylibdir] + [[x, os.path.join(self.pylibdir, x)][y] for (x, y) in eb_dirs[setup_tool]],
}
'files': ['bin/eb'],
'dirs': [self.pylibdir] + [[x, os.path.join(self.pylibdir, x)][y] for (x, y) in eb_dirs[setup_tool]],
}

# make sure we don't trip over deprecated behavior in old EasyBuild versions
eb_cmd = 'eb'
if LooseVersion(self.version) < LooseVersion('1.16'):
eb_cmd = 'EASYBUILD_DEPRECATED=0.0 eb'

# set of sanity check commands to run for EasyBuild
custom_commands = [
# this may spit out a wrong version, but that should be safe to ignore
# occurs when the EasyBuild being used is newer than the EasyBuild being installed
('eb', '--version'),
('eb', '-a'),
('eb', '-e ConfigureMake -a')
]
# this may spit out a wrong version, but that should be safe to ignore
# occurs when the EasyBuild being used is newer than the EasyBuild being installed
(eb_cmd, '--version'),
(eb_cmd, '-a'),
(eb_cmd, '-e ConfigureMake -a'),
]

# (temporary) cleanse copy of original environment to avoid conflict with (potentially) loaded EasyBuild module
self.orig_orig_environ = copy.deepcopy(self.orig_environ)
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/e/epd.py
Expand Up @@ -29,8 +29,8 @@
"""
import os

from easybuild.tools.filetools import run_cmd
from easybuild.easyblocks.generic.binary import Binary
from easybuild.tools.run import run_cmd


class EB_EPD(Binary):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/e/esmf.py
Expand Up @@ -34,8 +34,8 @@
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import BUILD
from easybuild.tools.filetools import run_cmd
from easybuild.tools.modules import get_software_root
from easybuild.tools.run import run_cmd


class EB_ESMF(ConfigureMake):
Expand Down
8 changes: 4 additions & 4 deletions easybuild/easyblocks/e/espresso.py
Expand Up @@ -19,10 +19,10 @@
import os

import easybuild.tools.environment as env
import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd
import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.run import run_cmd


class EB_ESPResSo(ConfigureMake):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/fdtd_solutions.py
Expand Up @@ -28,7 +28,7 @@
@author: Kenneth Hoste (Ghent University)
"""
from easybuild.framework.easyblock import EasyBlock
from easybuild.tools.filetools import run_cmd_qa
from easybuild.tools.run import run_cmd_qa


class EB_FDTD_underscore_Solutions(EasyBlock):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/ferret.py
Expand Up @@ -37,8 +37,8 @@
import os,re,fileinput,sys
import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.filetools import run_cmd
from easybuild.tools.modules import get_software_root
from easybuild.tools.run import run_cmd

class EB_Ferret(ConfigureMake):
"""Support for building/installing Ferret."""
Expand Down
3 changes: 2 additions & 1 deletion easybuild/easyblocks/f/fluent.py
Expand Up @@ -32,7 +32,8 @@
import stat

from easybuild.framework.easyblock import EasyBlock
from easybuild.tools.filetools import adjust_permissions, run_cmd
from easybuild.tools.filetools import adjust_permissions
from easybuild.tools.run import run_cmd


class EB_FLUENT(EasyBlock):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/freetype.py
Expand Up @@ -33,7 +33,7 @@
import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd
from easybuild.tools.run import run_cmd


class EB_freetype(ConfigureMake):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/fsl.py
Expand Up @@ -35,7 +35,7 @@

import easybuild.tools.environment as env
from easybuild.framework.easyblock import EasyBlock
from easybuild.tools.filetools import run_cmd
from easybuild.tools.run import run_cmd


class EB_FSL(EasyBlock):
Expand Down
10 changes: 5 additions & 5 deletions easybuild/easyblocks/g/gcc.py
Expand Up @@ -44,9 +44,9 @@
import easybuild.tools.environment as env
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd
from easybuild.tools.modules import get_software_root
from easybuild.tools.systemtools import check_os_dependency, get_kernel_name, get_os_name, get_shared_lib_ext, get_platform_name
from easybuild.tools.run import run_cmd
from easybuild.tools.systemtools import check_os_dependency, get_os_name, get_os_type, get_shared_lib_ext, get_platform_name


class EB_GCC(ConfigureMake):
Expand Down Expand Up @@ -488,7 +488,7 @@ def sanity_check_step(self):
Custom sanity check for GCC
"""

kernel_name = get_kernel_name()
os_type = get_os_type()
sharedlib_ext = get_shared_lib_ext()
common_infix = os.path.join('gcc', self.platform_lib, self.version)

Expand All @@ -497,7 +497,7 @@ def sanity_check_step(self):
if LooseVersion(self.version) >= LooseVersion('4.2'):
# libgomp was added in GCC 4.2.0
["libgomp.%s" % sharedlib_ext, "libgomp.a"]
if kernel_name == 'Linux':
if os_type == 'Linux':
lib_files.extend(["libgcc_s.%s" % sharedlib_ext])
# libmudflap is replaced by asan (see release notes gcc 4.9.0)
if self.version < LooseVersion("4.9.0"):
Expand Down Expand Up @@ -527,7 +527,7 @@ def sanity_check_step(self):

if 'lto' in self.cfg['languages']:
libexec_files.extend(['lto1', 'lto-wrapper'])
if kernel_name in ['Linux']:
if os_type in ['Linux']:
libexec_files.append('liblto_plugin.%s' % sharedlib_ext)

bin_files = ["bin/%s" % x for x in bin_files]
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/g/geant4.py
Expand Up @@ -40,8 +40,8 @@
import easybuild.tools.environment as env
from easybuild.framework.easyconfig import CUSTOM
from easybuild.easyblocks.generic.cmakemake import CMakeMake
from easybuild.tools.filetools import run_cmd, run_cmd_qa
from easybuild.tools.modules import get_software_root
from easybuild.tools.run import run_cmd, run_cmd_qa
from easybuild.tools.filetools import mkdir

class EB_Geant4(CMakeMake):
Expand Down
3 changes: 2 additions & 1 deletion easybuild/easyblocks/g/go.py
Expand Up @@ -32,7 +32,8 @@
import shutil

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.filetools import rmtree2, run_cmd
from easybuild.tools.filetools import rmtree2
from easybuild.tools.run import run_cmd

class EB_Go(ConfigureMake):
"""
Expand Down
3 changes: 2 additions & 1 deletion easybuild/easyblocks/generic/binary.py
Expand Up @@ -38,7 +38,8 @@

from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd, rmtree2
from easybuild.tools.filetools import rmtree2
from easybuild.tools.run import run_cmd


class Binary(EasyBlock):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/generic/cmakemake.py
Expand Up @@ -37,8 +37,8 @@
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.environment import setvar
from easybuild.tools.filetools import run_cmd
from easybuild.tools.modules import ROOT_ENV_VAR_NAME_PREFIX
from easybuild.tools.run import run_cmd


class CMakeMake(ConfigureMake):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/generic/cmdcp.py
Expand Up @@ -31,7 +31,7 @@

from easybuild.easyblocks.generic.makecp import MakeCp
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd
from easybuild.tools.run import run_cmd


class CmdCp(MakeCp):
Expand Down