Skip to content

Commit

Permalink
follow new class naming scheme (see easybuilders#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Aug 19, 2012
1 parent 41d5c01 commit 2937530
Show file tree
Hide file tree
Showing 28 changed files with 89 additions and 90 deletions.
8 changes: 4 additions & 4 deletions easybuild/easyblocks/a/armadillo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"""
import os

from easybuild.easyblocks.c.cmake import CMake
from easybuild.easyblocks.c.cmake import EB_CMake
from easybuild.tools.modules import get_software_root


class Armadillo(CMake):
class EB_Armadillo(EB_CMake):
"""Support for building Armadillo."""

def configure(self):
Expand All @@ -43,7 +43,7 @@ def configure(self):
self.updatecfg('configopts', '-DBLAS_LIBRARY:PATH="%s"' % os.getenv('LIBBLAS'))
self.updatecfg('configopts', '-DLAPACK_LIBRARY:PATH="%s"' % os.getenv('LIBLAPACK'))

CMake.configure(self)
EB_CMake.configure(self)

def sanitycheck(self):
"""Custom sanity check for Armadillo."""
Expand All @@ -57,4 +57,4 @@ def sanitycheck(self):

self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths'))

CMake.sanitycheck(self)
EB_CMake.sanitycheck(self)
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from easybuild.tools.modules import get_software_root


class Boost(Application):
class EB_Boost(Application):
"""Support for building Boost."""

def __init__(self, *args, **kwargs):
Expand Down
5 changes: 2 additions & 3 deletions easybuild/easyblocks/b/bzip2.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
##
# Copyright 2012 Kenneth Hoste
### Copyright 2012 Kenneth Hoste
# Copyright 2012 Jens Timmerman
#
# This file is part of EasyBuild
Expand Down Expand Up @@ -27,7 +26,7 @@
from easybuild.framework.application import Application


class Bzip2(Application):
class EB_bzip2(Application):
"""Support for building and installing bzip2."""

# no configure script
Expand Down
8 changes: 4 additions & 4 deletions easybuild/easyblocks/c/cgal.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
"""
import os

from easybuild.easyblocks.c.cmake import CMake
from easybuild.easyblocks.c.cmake import EB_CMake
from easybuild.tools.modules import get_software_root


class CGAL(CMake):
class EB_CGAL(EB_CMake):
"""Support for building CGAL."""

def configure(self):
Expand All @@ -45,7 +45,7 @@ def configure(self):

os.environ['BOOST_ROOT'] = get_software_root("Boost")

CMake.configure(self)
EB_CMake.configure(self)

def sanitycheck(self):
"""Custom sanity check for CGAL."""
Expand All @@ -61,4 +61,4 @@ def sanitycheck(self):

self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths'))

CMake.sanitycheck(self)
EB_CMake.sanitycheck(self)
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from easybuild.tools.filetools import run_cmd


class CMake(Application):
class EB_CMake(Application):
"""Support for configuring build with CMake instead of traditional configure script"""

def configure(self, builddir=None):
Expand Down
18 changes: 9 additions & 9 deletions easybuild/easyblocks/c/cmakepythonpackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"""
EasyBuild support for Python packages that are configured with CMake, implemented as an easyblock
"""
from easybuild.easyblocks.c.cmake import CMake
from easybuild.easyblocks.p.pythonpackage import PythonPackage
from easybuild.easyblocks.c.cmake import EB_CMake
from easybuild.easyblocks.p.pythonpackage import EB_PythonPackage


class CMakePythonPackage(CMake, PythonPackage):
class EB_CMakePythonPackage(EB_CMake, EB_PythonPackage):
"""Build a Python package and module with cmake.
Some packages use cmake to first build and install C Python packages
Expand All @@ -43,23 +43,23 @@ class CMakePythonPackage(CMake, PythonPackage):

def __init__(self, *args, **kwargs):
"""Initialize with PythonPackage."""
PythonPackage.__init__(self, *args, **kwargs)
EB_PythonPackage.__init__(self, *args, **kwargs)

def configure(self, *args, **kwargs):
"""Main configuration using cmake"""

PythonPackage.configure(self, *args, **kwargs)
EB_PythonPackage.configure(self, *args, **kwargs)

return CMake.configure(self, *args, **kwargs)
return EB_CMake.configure(self, *args, **kwargs)

def make(self, *args, **kwargs):
"""Build Python package with cmake"""
return CMake.make(self, *args, **kwargs)
return EB_CMake.make(self, *args, **kwargs)

def make_install(self):
"""Install with cmake install"""
return CMake.make_install(self)
return EB_CMake.make_install(self)

def make_module_extra(self):
"""Add extra Python package module parameters"""
return PythonPackage.make_module_extra(self)
return EB_PythonPackage.make_module_extra(self)
10 changes: 5 additions & 5 deletions easybuild/easyblocks/c/cplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
import stat

import easybuild.tools.environment as env
from easybuild.easyblocks.b.binary import Binary
from easybuild.easyblocks.b.binary import EB_Binary
from easybuild.tools.filetools import run_cmd_qa


class EB_CPLEX(Binary):
class EB_CPLEX(EB_Binary):
"""
Support for installing CPLEX.
Version 12.2 has a self-extracting package with a Java installer
Expand All @@ -43,7 +43,7 @@ class EB_CPLEX(Binary):
def __init__(self, *args, **kwargs):
"""Initialize CPLEX-specific variables."""

Binary.__init__(self, *args, **kwargs)
EB_Binary.__init__(self, *args, **kwargs)
self.bindir = None

def make_install(self):
Expand Down Expand Up @@ -99,7 +99,7 @@ def make_install(self):
def make_module_extra(self):
"""Add installdir to path and set CPLEX_HOME"""

txt = Binary.make_module_extra(self)
txt = EB_Binary.make_module_extra(self)
txt += self.moduleGenerator.prependPaths("PATH", [self.bindir])
txt += self.moduleGenerator.setEnvironment("CPLEX_HOME", "$root/cplex")
self.log.debug("make_module_extra added %s" % txt)
Expand All @@ -116,4 +116,4 @@ def sanitycheck(self):

self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths'))

Binary.sanitycheck(self)
EB_Binary.sanitycheck(self)
10 changes: 5 additions & 5 deletions easybuild/easyblocks/d/dolfin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
import re

import easybuild.tools.toolkit as toolkit
from easybuild.easyblocks.c.cmakepythonpackage import CMakePythonPackage
from easybuild.easyblocks.c.cmakepythonpackage import EB_CMakePythonPackage
from easybuild.tools.modules import get_software_root, get_software_version


class DOLFIN(CMakePythonPackage):
class EB_DOLFIN(EB_CMakePythonPackage):
"""Support for building and installing DOLFIN."""

def configure(self):
Expand Down Expand Up @@ -140,7 +140,7 @@ def configure(self):
self.updatecfg('configopts', ' -DOpenMP_C_FLAGS="%s"' % openmp)

# configure
out = CMakePythonPackage.configure(self)
out = EB_CMakePythonPackage.configure(self)

# make sure that all optional packages are found
not_found_re = re.compile("The following optional packages could not be found")
Expand All @@ -150,7 +150,7 @@ def configure(self):
def make_module_extra(self):
"""Set extra environment variables for DOLFIN."""

txt = CMakePythonPackage.make_module_extra(self)
txt = EB_CMakePythonPackage.make_module_extra(self)

# Dolfin needs to find Boost and the UFC pkgconfig file
txt += self.moduleGenerator.setEnvironment('BOOST_DIR', get_software_root('Boost'))
Expand Down Expand Up @@ -204,4 +204,4 @@ def sanitycheck(self):
# join all commands into one large single sanity check command
self.setcfg('sanityCheckCommand', (" && ".join(cmds), ""))

CMakePythonPackage.sanitycheck(self)
EB_CMakePythonPackage.sanitycheck(self)
8 changes: 4 additions & 4 deletions easybuild/easyblocks/i/icc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
import os
from distutils.version import LooseVersion

from easybuild.easyblocks.i.intelbase import IntelBase
from easybuild.easyblocks.i.intelbase import EB_IntelBase


class EB_icc(IntelBase):
class EB_icc(EB_IntelBase):
"""Support for installing icc
- tested with 11.1.046
Expand All @@ -57,7 +57,7 @@ def sanitycheck(self):

self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths'))

IntelBase.sanitycheck(self)
EB_IntelBase.sanitycheck(self)

def make_module_req_guess(self):
"""Customize paths to check and add in environment.
Expand Down Expand Up @@ -114,7 +114,7 @@ def make_module_req_guess(self):
def make_module_extra(self):
"""Add extra environment variables for icc, for license file and NLS path."""

txt = IntelBase.make_module_extra(self)
txt = EB_IntelBase.make_module_extra(self)

txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license)
txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/intel64/locale/%l_%t/%N')
Expand Down
4 changes: 2 additions & 2 deletions easybuild/easyblocks/i/ifort.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

from distutils.version import LooseVersion

from easybuild.easyblocks.i.icc import Icc, IntelBase
from easybuild.easyblocks.i.icc import Icc, EB_IntelBase


class EB_ifort(Icc):
Expand Down Expand Up @@ -57,4 +57,4 @@ def sanitycheck(self):

self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths'))

IntelBase.sanitycheck(self)
EB_IntelBase.sanitycheck(self)
14 changes: 7 additions & 7 deletions easybuild/easyblocks/i/imkl.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@

import easybuild.tools.environment as env
import easybuild.tools.toolkit as toolkit
from easybuild.easyblocks.i.intelbase import IntelBase
from easybuild.easyblocks.i.intelbase import EB_IntelBase
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd
from easybuild.tools.modules import Modules


class EB_imkl(IntelBase):
class EB_imkl(EB_IntelBase):
"""
Class that can be used to install mkl
- tested with 10.2.1.017
Expand All @@ -48,16 +48,16 @@ class EB_imkl(IntelBase):

def __init__(self, *args, **kwargs):
"""Constructor, adds extra config options"""
IntelBase.__init__(self, *args, **kwargs)
EB_IntelBase.__init__(self, *args, **kwargs)

@staticmethod
def extra_options():
extra_vars = [('interfaces', [True, "Indicates whether interfaces should be built (default: True)", CUSTOM])]
return IntelBase.extra_options(extra_vars)
return EB_IntelBase.extra_options(extra_vars)


def configure(self):
IntelBase.configure(self)
EB_IntelBase.configure(self)

if os.getenv('MKLROOT'):
self.log.error("Found MKLROOT in current environment, which may cause problems...")
Expand Down Expand Up @@ -100,7 +100,7 @@ def make_module_req_guess(self):

def make_module_extra(self):
"""Overwritten from Application to add extra txt"""
txt = IntelBase.make_module_extra(self)
txt = EB_IntelBase.make_module_extra(self)
txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license)
if self.getcfg('m32'):
txt += "prepend-path\t%s\t\t$root/%s\n" % ('NLSPATH', 'idb/32/locale/%l_%t/%N')
Expand Down Expand Up @@ -381,4 +381,4 @@ def sanitycheck(self):

self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths'))

IntelBase.sanitycheck(self)
EB_IntelBase.sanitycheck(self)
8 changes: 4 additions & 4 deletions easybuild/easyblocks/i/impi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
import os
from distutils.version import LooseVersion

from easybuild.easyblocks.i.intelbase import IntelBase
from easybuild.easyblocks.i.intelbase import EB_IntelBase
from easybuild.tools.filetools import run_cmd


class EB_impi(IntelBase):
class EB_impi(EB_IntelBase):
"""
Support for installing Intel MPI library
"""
Expand All @@ -46,7 +46,7 @@ def make_install(self):
"""
if LooseVersion(self.version()) >= LooseVersion('4.0.1'):
#impi starting from version 4.0.1.x uses standard installation procedure.
IntelBase.make_install(self)
EB_IntelBase.make_install(self)
return None
else:
#impi up until version 4.0.0.x uses custom installation procedure.
Expand Down Expand Up @@ -108,7 +108,7 @@ def make_module_req_guess(self):

def make_module_extra(self):
"""Overwritten from Application to add extra txt"""
txt = IntelBase.make_module_extra(self)
txt = EB_IntelBase.make_module_extra(self)
txt += "prepend-path\t%s\t\t%s\n" % ('INTEL_LICENSE_FILE', self.license)
txt += "setenv\t%s\t\t$root\n" % ('I_MPI_ROOT')

Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/i/intelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from easybuild.tools.filetools import run_cmd


class EB_intelBase(Application):
class EB_IntelBase(Application):
"""
Base class for Intel software
- no configure/make : binary release
Expand Down
6 changes: 3 additions & 3 deletions easybuild/easyblocks/i/ipp.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
EasyBuild support for installing the Intel Performance Primitives (IPP) library, implemented as an easyblock
"""

from easybuild.easyblocks.i.intelbase import IntelBase
from easybuild.easyblocks.i.intelbase import EB_IntelBase


class EB_ipp(IntelBase):
class EB_ipp(EB_IntelBase):

def sanitycheck(self):

Expand All @@ -45,4 +45,4 @@ def sanitycheck(self):

self.log.info("Customized sanity check paths: %s" % self.getcfg('sanityCheckPaths'))

IntelBase.sanitycheck(self)
EB_IntelBase.sanitycheck(self)
Loading

0 comments on commit 2937530

Please sign in to comment.