From 18631b5c9d8af4c488f78aed6e3af8558ffe670a Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sat, 18 Aug 2012 14:22:05 +0200 Subject: [PATCH 1/9] added function encode_string Signed-off-by: Fotis Georgatos --- easybuild/tools/filetools.py | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 0ee01a0d04..dd9785d522 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -717,3 +717,56 @@ def patch_perl_script_autoflush(path): except IOError, err: log.error("Failed to patch Perl configure script: %s" % err) + + +def encode_string(name): + """ + Here is an encoding function to handle funky package names ad infinitum; + it has been inspired by the concept seen at: + * http://fossies.org/dox/netcdf-4.2.1.1/escapes_8c_source.html # in effect, current names are a lower case derivative of this one + * http://celldesigner.org/help/CDH_Species_01.html + * http://research.cs.berkeley.edu/project/sbp/darcsrepo-no-longer-updated/src/edu/berkeley/sbp/misc/ReflectiveWalker.java + and can be extended freely as per ISO/IEC 10646:2012 / Unicode 6.1 names, as long as they are described in _CamelCase_ style iff more than 2 words, for readability: + http://www.unicode.org/versions/Unicode6.1.0/ + So, yes, '_GreekSmallLetterEtaWithPsiliAndOxia_' *can* indeed be a fully valid package name; package "electron" in the original spelling anyone? ;-) + """ + + charmap = { + ' ': "_space_", + '!': "_exclamation_", + '"': "_quotation_", + '#': "_hash_", + '$': "_dollar_", + '%': "_percent_", + '&': "_ampersand_", + '(': "_leftparen_", + ')': "_rightparen_", + '*': "_asterisk_", + '+': "_plus_", + ',': "_comma_", + '-': "_minus_", + '.': "_period_", + '/': "_slash_", + ':': "_colon_", + ';': "_semicolon_", + '<': "_lessthan_", + '=': "_equals_", + '>': "_greaterthan_", + '?': "_question_", + '@': "_atsign_", + '[': "_leftbracket_", + '\'': "_apostrophe_", + '\\': "_backslash_", + ']': "_rightbracket_", + '^': "_circumflex_", + '_': "_underscore_", + '`': "_backquote_", + '{': "_leftcurly_", + '|': "_verticalbar_", + '}': "_rightcurly_", + '~': "_tilde_" + } + + result = ''.join(map(lambda x: charmap(x, x), name) # do the remapping and do return same char by default + return result + From 56d61585b02734a04624a6a6ee49a49e1e21b8af Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sat, 18 Aug 2012 14:39:28 +0200 Subject: [PATCH 2/9] added eb_ prefix to all easyblock classes --- easybuild/easyblocks/a/atlas.py | 2 +- easybuild/easyblocks/b/binary.py | 2 +- easybuild/easyblocks/b/blacs.py | 2 +- easybuild/easyblocks/c/cp2k.py | 2 +- easybuild/easyblocks/c/cplex.py | 2 +- easybuild/easyblocks/d/doxygen.py | 2 +- easybuild/easyblocks/f/fsl.py | 2 +- easybuild/easyblocks/g/g2clib.py | 2 +- easybuild/easyblocks/g/g2lib.py | 2 +- easybuild/easyblocks/g/gcc.py | 2 +- easybuild/easyblocks/h/hdf5.py | 2 +- easybuild/easyblocks/h/hpl.py | 2 +- easybuild/easyblocks/i/icc.py | 2 +- easybuild/easyblocks/i/ifort.py | 2 +- easybuild/easyblocks/i/imkl.py | 2 +- easybuild/easyblocks/i/impi.py | 2 +- easybuild/easyblocks/i/intelbase.py | 2 +- easybuild/easyblocks/i/ipp.py | 2 +- easybuild/easyblocks/i/itac.py | 2 +- easybuild/easyblocks/l/lapack.py | 2 +- easybuild/easyblocks/l/libsmm.py | 2 +- easybuild/easyblocks/m/maple.py | 2 +- easybuild/easyblocks/m/mrbayes.py | 2 +- easybuild/easyblocks/m/mvapich2.py | 2 +- easybuild/easyblocks/n/ncl.py | 2 +- easybuild/easyblocks/n/netcdf.py | 2 +- easybuild/easyblocks/n/netcdf_fortran.py | 2 +- easybuild/easyblocks/o/openfoam.py | 2 +- easybuild/easyblocks/p/packedbinary.py | 2 +- easybuild/easyblocks/p/pasha.py | 2 +- easybuild/easyblocks/p/python.py | 28 ++++++++++++------------ easybuild/easyblocks/s/scalapack.py | 2 +- easybuild/easyblocks/t/tarball.py | 2 +- easybuild/easyblocks/t/tbb.py | 2 +- easybuild/easyblocks/t/toolkit.py | 2 +- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 2 +- 37 files changed, 50 insertions(+), 50 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 24f93a78fc..95ddea11dc 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root -class ATLAS(Application): +class eb_ATLAS(Application): """ Support for building ATLAS - configure (and check if it failed due to CPU throttling being enabled) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 84855b4cdb..3786119c0c 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -33,7 +33,7 @@ from easybuild.framework.application import Application -class Binary(Application): +class eb_Binary(Application): """Support for installing a binary package. Just copy it's sources to the installdir""" diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 3fb3d3944d..509b26ad5b 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -50,7 +50,7 @@ def det_interface(log, path): log.error("Failed to determine interface, output for xintface: %s" % out) -class BLACS(Application): +class eb_BLACS(Application): """ Support for building/installing BLACS - configure: symlink BMAKES/Bmake.MPI-LINUX to Bmake.inc diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 236ceff89a..9aeef14b2e 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -41,7 +41,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class CP2K(Application): +class eb_CP2K(Application): """ Support for building CP2K - prepare module include files if required diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index 28f4150213..3743e168f2 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd_qa -class CPLEX(Binary): +class eb_CPLEX(Binary): """ Support for installing CPLEX. Version 12.2 has a self-extracting package with a Java installer diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index 2156c04394..67cdfd62f5 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd -class Doxygen(Application): +class eb_Doxygen(Application): """Support for building/installing Doxygen""" def configure(self): diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 55c7b28668..5dd56ea3e9 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -32,7 +32,7 @@ from easybuild.tools.filetools import run_cmd -class FSL(Application): +class eb_FSL(Application): """Support for building and installing FSL.""" def __init__(self,*args,**kwargs): diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index a0879f27bb..4005c98a15 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -34,7 +34,7 @@ from easybuild.tools.modules import get_software_root -class G2clib(Application): +class eb_g2clib(Application): """Support for building g2clib GRIB2 C library.""" def configure(self): diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index b9887e581a..2d0e00bfe4 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -33,7 +33,7 @@ from easybuild.tools.modules import get_software_root -class G2lib(Application): +class eb_g2lib(Application): """Support for building g2clib GRIB2 library.""" def configure(self): diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index 4d0633eea8..d895c61cb4 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -41,7 +41,7 @@ from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name -class GCC(Application): +class eb_GCC(Application): """ Self-contained build of GCC. Uses system compiler for initial build, then bootstraps. diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 463ccc1a64..302810c0bc 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -32,7 +32,7 @@ from easybuild.tools.modules import get_software_root -class HDF5(Application): +class eb_HDF5(Application): """Support for building/installing HDF5""" def configure(self): diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 3aeb94e316..01879ad2d6 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class HPL(Application): +class eb_HPL(Application): """ Support for building HPL (High Performance Linpack) - create Make.UNKNOWN diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index a838fa31a7..e1a2fd4714 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -32,7 +32,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class Icc(IntelBase): +class eb_icc(IntelBase): """Support for installing icc - tested with 11.1.046 diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index 303328ad03..c88585c00e 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -31,7 +31,7 @@ from easybuild.easyblocks.i.icc import Icc, IntelBase -class Ifort(Icc): +class eb_ifort(Icc): """ Class that can be used to install ifort - tested with 11.1.046 diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 1ee437ee8e..166cd71930 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -39,7 +39,7 @@ from easybuild.tools.modules import Modules -class Imkl(IntelBase): +class eb_imkl(IntelBase): """ Class that can be used to install mkl - tested with 10.2.1.017 diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 8c6ae8ab68..5b381f7876 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class Impi(IntelBase): +class eb_impi(IntelBase): """ Support for installing Intel MPI library """ diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index b6410da40e..2f4b509ec0 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -35,7 +35,7 @@ from easybuild.tools.filetools import run_cmd -class IntelBase(Application): +class eb_intelBase(Application): """ Base class for Intel software - no configure/make : binary release diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index d7ff219fa2..5e5df4bf59 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -29,7 +29,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class Ipp(IntelBase): +class eb_ipp(IntelBase): def sanitycheck(self): diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index ab61fcda0a..3e7b1f34b1 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class Itac(IntelBase): +class eb_itac(IntelBase): """ Class that can be used to install itac - tested with Intel Trace Analyzer and Collector 7.2.1.008 diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index 01118e8258..d23746e2f2 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -61,7 +61,7 @@ def get_blas_lib(log): return blaslib -class LAPACK(Application): +class eb_LAPACK(Application): """ Support for building LAPACK - read make.inc.example and replace BLAS line with configtops diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 45b06b8192..01bb2cee28 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -38,7 +38,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class Libsmm(Application): +class eb_libsmm(Application): """ Support for the CP2K small matrix library Notes: - build can take really really long, and no real rebuilding needed for each version diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 489b8711c1..6476842ae9 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd_qa -class Maple(Application): +class eb_Maple(Application): """Support for installing Maple.""" def unpack_src(self): diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index 3eabb898e3..cd2eac54c4 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -36,7 +36,7 @@ from easybuild.tools.modules import get_software_root -class MrBayes(Application): +class eb_MrBayes(Application): """Support for building/installing MrBayes.""" def configure(self): diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index eb6b3676c7..1ac2596f4f 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -33,7 +33,7 @@ from easybuild.framework.easyconfig import CUSTOM -class MVAPICH2(Application): +class eb_MVAPICH2(Application): """ Support for building the MVAPICH2 MPI library. - some compiler dependent configure options diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 26f196d4b4..2ded66ba67 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -37,7 +37,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class NCL(Application): +class eb_NCL(Application): """Support for building/installing NCL.""" def configure(self): diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index ed2babf71d..d8930242a2 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class NetCDF(Application): +class eb_netCDF(Application): """Support for building/installing netCDF""" def configure(self): diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index c69bd64061..2248450edb 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -33,7 +33,7 @@ from easybuild.framework.application import Application -class NetCDF_Fortran(Application): +class eb_netCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" def configure(self): diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 555bef8ff2..03001c8777 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -36,7 +36,7 @@ from easybuild.tools.modules import get_software_root -class OpenFOAM(Application): +class eb_OpenFOAM(Application): """Support for building and installing OpenFOAM.""" def __init__(self,*args,**kwargs): diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py index 79d8a256be..e583316eda 100644 --- a/easybuild/easyblocks/p/packedbinary.py +++ b/easybuild/easyblocks/p/packedbinary.py @@ -27,7 +27,7 @@ from easybuild.easyblocks.b.binary import Binary -class PackedBinary(Binary, Application): +class eb_PackedBinary(Binary, Application): """Support for installing a packed binary package. Just unpack its source in the installdir """ diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index e9406bef8f..88f577bc8e 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -29,7 +29,7 @@ from easybuild.tools.modules import get_software_root -class Pasha(Application): +class eb_Pasha(Application): """Support for building and installing Pasha""" def configure(self): diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index e25d7f4c13..6420d631e5 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root -class Python(Application): +class eb_Python(Application): """Support for building/installing Python - default configure/make/make install works fine @@ -51,10 +51,10 @@ def extra_packages_pre(self): """ We set some default configs here for packages included in python """ - #insert new packages by building them with DefaultPythonPackage + #insert new packages by building them with eb_DefaultPythonPackage self.log.debug("setting extra packages options") - # use __name__ here, since this is the module where DefaultPythonPackage is defined - self.setcfg('pkgdefaultclass', (__name__, "DefaultPythonPackage")) + # use __name__ here, since this is the module where eb_DefaultPythonPackage is defined + self.setcfg('pkgdefaultclass', (__name__, "eb_DefaultPythonPackage")) self.setcfg('pkgfilter', ('python -c "import %(name)s"', "")) def make_install(self): @@ -71,7 +71,7 @@ def make_install(self): self.log.error("Failed to symlink %s to %s: %s" % err) -class DefaultPythonPackage(ApplicationPackage): +class eb_DefaultPythonPackage(ApplicationPackage): """ Easyblock for python packages to be included in the python installation. """ @@ -189,10 +189,10 @@ def getcfg(self, *args, **kwargs): return self.mself.getcfg(*args, **kwargs) -class Nose(DefaultPythonPackage): +class eb_Nose(eb_DefaultPythonPackage): """nose package""" def __init__(self, mself, pkg, pkginstalldeps): - DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + eb_DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) # use extra unpack options to avoid problems like # 'tar: Ignoring unknown extended header keyword `SCHILY.nlink' @@ -200,8 +200,8 @@ def __init__(self, mself, pkg, pkginstalldeps): self.unpack_options = ' --pax-option="delete=SCHILY.*" --pax-option="delete=LIBARCHIVE.*" ' -class FortranPythonPackage(DefaultPythonPackage): - """Extends DefaultPythonPackage to add a Fortran compiler to the make call""" +class eb_FortranPythonPackage(eb_DefaultPythonPackage): + """Extends eb_DefaultPythonPackage to add a Fortran compiler to the make call""" def make(self): comp_fam = self.toolkit().comp_family() @@ -227,11 +227,11 @@ def make(self): run_cmd(cmd, log_all=True, simple=True) -class Numpy(FortranPythonPackage): +class eb_Numpy(eb_FortranPythonPackage): """numpy package""" def __init__(self, mself, pkg, pkginstalldeps): - FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + eb_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) self.pkgcfgs = mself.getcfg('pkgcfgs') if self.pkgcfgs.has_key('numpysitecfglibsubdirs'): @@ -302,7 +302,7 @@ def make_install(self): """Install numpy package We remove the numpy build dir here, so scipy doesn't find it by accident """ - FortranPythonPackage.make_install(self) + eb_FortranPythonPackage.make_install(self) builddir = os.path.join(self.builddir, "numpy") if os.path.isdir(builddir): shutil.rmtree(builddir) @@ -310,11 +310,11 @@ def make_install(self): self.log.debug("build dir %s already clean" % builddir) -class Scipy(FortranPythonPackage): +class eb_Scipy(eb_FortranPythonPackage): """scipy package""" def __init__(self, mself, pkg, pkginstalldeps): - FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + eb_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) # disable testing test = False diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 2a48212901..1f6eed2342 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -37,7 +37,7 @@ from easybuild.tools.modules import get_software_root -class ScaLAPACK(Application): +class eb_ScaLAPACK(Application): """ Support for building and installing ScaLAPACK, both versions 1.x and 2.x """ diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 7e60633a0c..2f1e3a03f4 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -32,7 +32,7 @@ from easybuild.framework.application import Application -class Tarball(Application): +class eb_Tarball(Application): """ Precompiled software packaged as tarball: - will unpack binary and copy it to the install dir diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index b4602852a8..f64daca652 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -33,7 +33,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class Tbb(IntelBase): +class eb_tbb(IntelBase): """EasyBlock for tbb, threading building blocks""" def make_install(self): diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index 8de48b911b..207d99a8bf 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -29,7 +29,7 @@ from easybuild.framework.application import Application -class Toolkit(Application): +class eb_Toolkit(Application): """ Compiler toolkit: generate module file only, nothing to make/install """ diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index a26c4e6800..257931ed6f 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -43,7 +43,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class WPS(Application): +class eb_WPS(Application): """Support for building/installing WPS.""" def __init__(self, *args, **kwargs): diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index a41c1d97b2..f21197d289 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -40,7 +40,7 @@ from easybuild.tools.modules import get_software_root -class WRF(Application): +class eb_WRF(Application): """Support for building/installing WRF.""" def __init__(self,*args,**kwargs): From 64e5c0cbcb0695a20579b9a1b500b58811c3cfe1 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sat, 18 Aug 2012 14:41:17 +0200 Subject: [PATCH 3/9] enabled new class name convention as per: EBCLASSPREFIX + encode_string(name) Signed-off-by: Fotis Georgatos --- easybuild/framework/application.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index 646d62a8de..cbc8d5aa3b 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -45,13 +45,16 @@ from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg from easybuild.tools.config import source_path, buildPath, installPath -from easybuild.tools.filetools import unpack, patch, run_cmd, convertName +from easybuild.tools.filetools import unpack, patch, run_cmd, convertName, encode_string from easybuild.tools.module_generator import ModuleGenerator from easybuild.tools.modules import Modules, get_software_root from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_core_count +EBCLASSPREFIX = 'eb_' + + class Application: """ Support for building and installing applications with configure/make/make install @@ -1401,7 +1404,7 @@ def extra_packages(self): allclassmodule = pkgdefaultclass[0] defaultClass = pkgdefaultclass[1] for pkg in self.pkgs: - name = pkg['name'][0].upper() + pkg['name'][1:] # classnames start with a capital + name = EBCLASSPREFIX + encode_string(pkg['name']) # Use the same encoding as get_class self.log.debug("Starting package %s" % name) try: @@ -1566,8 +1569,8 @@ def get_class(easyblock, log, name=None): name = "UNKNOWN" modulepath = module_path_for_easyblock(name) - # don't use capitalize, as it changes 'GCC' into 'Gcc', we want to keep the capitals that are there already - class_name = name[0].upper() + name[1:].replace('-','_') + # The following is a generic way to calculate unique class names for any funny package title + class_name = EBCLASSPREFIX + encode_string(name) # try and find easyblock easyblock_found = False From c1cedcdc932d61b1c2687834798c0dfb6fb8b1e6 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sat, 18 Aug 2012 16:05:23 +0200 Subject: [PATCH 4/9] bugfixing on line with: result = .join(map(lambda x: charmap.get(x, x), name)) Signed-off-by: Fotis Georgatos --- easybuild/tools/filetools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index dd9785d522..c3dc447791 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -767,6 +767,6 @@ def encode_string(name): '~': "_tilde_" } - result = ''.join(map(lambda x: charmap(x, x), name) # do the remapping and do return same char by default + result = ''.join(map(lambda x: charmap.get(x, x), name)) # do the remapping and do return same char by default return result From 95c90136eb3e350de9c92b283c5d230c1965d01d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 18 Aug 2012 19:19:26 +0200 Subject: [PATCH 5/9] corret naming of classes for Python packages nose, numpy and scipy --- easybuild/easyblocks/p/python.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 6420d631e5..2232f5748e 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -189,7 +189,7 @@ def getcfg(self, *args, **kwargs): return self.mself.getcfg(*args, **kwargs) -class eb_Nose(eb_DefaultPythonPackage): +class eb_nose(eb_DefaultPythonPackage): """nose package""" def __init__(self, mself, pkg, pkginstalldeps): eb_DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) @@ -227,7 +227,7 @@ def make(self): run_cmd(cmd, log_all=True, simple=True) -class eb_Numpy(eb_FortranPythonPackage): +class eb_numpy(eb_FortranPythonPackage): """numpy package""" def __init__(self, mself, pkg, pkginstalldeps): @@ -310,7 +310,7 @@ def make_install(self): self.log.debug("build dir %s already clean" % builddir) -class eb_Scipy(eb_FortranPythonPackage): +class eb_scipy(eb_FortranPythonPackage): """scipy package""" def __init__(self, mself, pkg, pkginstalldeps): From 97cddc17a7aee3504dd34d7dfcb8dee14bd16136 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sun, 19 Aug 2012 00:35:00 +0200 Subject: [PATCH 6/9] tweaked filetools.py for PEP0008 compatibility Signed-off-by: Fotis Georgatos --- easybuild/tools/filetools.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index c3dc447791..eb1ce3d1ab 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -721,14 +721,21 @@ def patch_perl_script_autoflush(path): def encode_string(name): """ - Here is an encoding function to handle funky package names ad infinitum; - it has been inspired by the concept seen at: - * http://fossies.org/dox/netcdf-4.2.1.1/escapes_8c_source.html # in effect, current names are a lower case derivative of this one + + This encoding function handles funky package names ad infinitum, like: + example: '0_foo+0x0x#-$__' + becomes: '0_underscore_foo_plus_0x0x_hash__minus__dollar__underscore__underscore_' + + It has been inspired by the concepts seen at, but in lowercase style: + * http://fossies.org/dox/netcdf-4.2.1.1/escapes_8c_source.html * http://celldesigner.org/help/CDH_Species_01.html * http://research.cs.berkeley.edu/project/sbp/darcsrepo-no-longer-updated/src/edu/berkeley/sbp/misc/ReflectiveWalker.java - and can be extended freely as per ISO/IEC 10646:2012 / Unicode 6.1 names, as long as they are described in _CamelCase_ style iff more than 2 words, for readability: - http://www.unicode.org/versions/Unicode6.1.0/ - So, yes, '_GreekSmallLetterEtaWithPsiliAndOxia_' *can* indeed be a fully valid package name; package "electron" in the original spelling anyone? ;-) + and can be extended freely as per ISO/IEC 10646:2012 / Unicode 6.1 names: + * http://www.unicode.org/versions/Unicode6.1.0/ + For readability of >2 words, it is suggested to use _CamelCase_ style. + So, yes, '_GreekSmallLetterEtaWithPsiliAndOxia_' *could* indeed be a fully + valid package name; package "electron" in the original spelling anyone? ;-) + """ charmap = { @@ -767,6 +774,7 @@ def encode_string(name): '~': "_tilde_" } - result = ''.join(map(lambda x: charmap.get(x, x), name)) # do the remapping and do return same char by default + # do the remapping and do return same char by default + result = ''.join(map(lambda x: charmap.get(x, x), name)) return result From abe637df3a4b7e57ffe7f8bc98eaad04a8786ee6 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sun, 19 Aug 2012 00:53:02 +0200 Subject: [PATCH 7/9] rewired bits in favor of encode_class_name function & fixed comments Signed-off-by: Fotis Georgatos --- easybuild/framework/application.py | 9 +++------ easybuild/tools/filetools.py | 10 +++++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/easybuild/framework/application.py b/easybuild/framework/application.py index cbc8d5aa3b..2ccc14f6c8 100644 --- a/easybuild/framework/application.py +++ b/easybuild/framework/application.py @@ -45,16 +45,13 @@ from easybuild.framework.easyconfig import EasyConfig from easybuild.tools.build_log import EasyBuildError, initLogger, removeLogHandler,print_msg from easybuild.tools.config import source_path, buildPath, installPath -from easybuild.tools.filetools import unpack, patch, run_cmd, convertName, encode_string +from easybuild.tools.filetools import unpack, patch, run_cmd, convertName, encode_class_name from easybuild.tools.module_generator import ModuleGenerator from easybuild.tools.modules import Modules, get_software_root from easybuild.tools.toolkit import Toolkit from easybuild.tools.systemtools import get_core_count -EBCLASSPREFIX = 'eb_' - - class Application: """ Support for building and installing applications with configure/make/make install @@ -1404,7 +1401,7 @@ def extra_packages(self): allclassmodule = pkgdefaultclass[0] defaultClass = pkgdefaultclass[1] for pkg in self.pkgs: - name = EBCLASSPREFIX + encode_string(pkg['name']) # Use the same encoding as get_class + name = encode_class_name(pkg['name']) # Use the same encoding as get_class self.log.debug("Starting package %s" % name) try: @@ -1570,7 +1567,7 @@ def get_class(easyblock, log, name=None): modulepath = module_path_for_easyblock(name) # The following is a generic way to calculate unique class names for any funny package title - class_name = EBCLASSPREFIX + encode_string(name) + class_name = encode_class_name(name) # try and find easyblock easyblock_found = False diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index eb1ce3d1ab..25ed064f64 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -723,8 +723,9 @@ def encode_string(name): """ This encoding function handles funky package names ad infinitum, like: - example: '0_foo+0x0x#-$__' - becomes: '0_underscore_foo_plus_0x0x_hash__minus__dollar__underscore__underscore_' + example: '0_foo+0x0x#-$__' + becomes: '0_underscore_foo_plus_0x0x_hash__minus__dollar__underscore__underscore_' + The intention is to have a robust escaping mechanism for names like c++, C# et al It has been inspired by the concepts seen at, but in lowercase style: * http://fossies.org/dox/netcdf-4.2.1.1/escapes_8c_source.html @@ -774,7 +775,10 @@ def encode_string(name): '~': "_tilde_" } - # do the remapping and do return same char by default + # do the character remapping, return same char by default result = ''.join(map(lambda x: charmap.get(x, x), name)) return result +def encode_class_name(name): + return "EB_" + encode_string(name) + From df03518fe2a16538dccbbf927919349ab6575503 Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sun, 19 Aug 2012 00:59:12 +0200 Subject: [PATCH 8/9] converted eb_ to EB_ prefixed everywhere Signed-off-by: Fotis Georgatos --- easybuild/easyblocks/a/atlas.py | 2 +- easybuild/easyblocks/b/binary.py | 2 +- easybuild/easyblocks/b/blacs.py | 2 +- easybuild/easyblocks/c/cp2k.py | 2 +- easybuild/easyblocks/c/cplex.py | 2 +- easybuild/easyblocks/d/doxygen.py | 2 +- easybuild/easyblocks/f/fsl.py | 2 +- easybuild/easyblocks/g/g2clib.py | 2 +- easybuild/easyblocks/g/g2lib.py | 2 +- easybuild/easyblocks/g/gcc.py | 2 +- easybuild/easyblocks/h/hdf5.py | 2 +- easybuild/easyblocks/h/hpl.py | 2 +- easybuild/easyblocks/i/icc.py | 2 +- easybuild/easyblocks/i/ifort.py | 2 +- easybuild/easyblocks/i/imkl.py | 2 +- easybuild/easyblocks/i/impi.py | 2 +- easybuild/easyblocks/i/intelbase.py | 2 +- easybuild/easyblocks/i/ipp.py | 2 +- easybuild/easyblocks/i/itac.py | 2 +- easybuild/easyblocks/l/lapack.py | 2 +- easybuild/easyblocks/l/libsmm.py | 2 +- easybuild/easyblocks/m/maple.py | 2 +- easybuild/easyblocks/m/mrbayes.py | 2 +- easybuild/easyblocks/m/mvapich2.py | 2 +- easybuild/easyblocks/n/ncl.py | 2 +- easybuild/easyblocks/n/netcdf.py | 2 +- easybuild/easyblocks/n/netcdf_fortran.py | 2 +- easybuild/easyblocks/o/openfoam.py | 2 +- easybuild/easyblocks/p/packedbinary.py | 2 +- easybuild/easyblocks/p/pasha.py | 2 +- easybuild/easyblocks/p/python.py | 28 ++++++++++++------------ easybuild/easyblocks/s/scalapack.py | 2 +- easybuild/easyblocks/t/tarball.py | 2 +- easybuild/easyblocks/t/tbb.py | 2 +- easybuild/easyblocks/t/toolkit.py | 2 +- easybuild/easyblocks/w/wps.py | 2 +- easybuild/easyblocks/w/wrf.py | 2 +- 37 files changed, 50 insertions(+), 50 deletions(-) diff --git a/easybuild/easyblocks/a/atlas.py b/easybuild/easyblocks/a/atlas.py index 95ddea11dc..d4235a35fd 100644 --- a/easybuild/easyblocks/a/atlas.py +++ b/easybuild/easyblocks/a/atlas.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root -class eb_ATLAS(Application): +class EB_ATLAS(Application): """ Support for building ATLAS - configure (and check if it failed due to CPU throttling being enabled) diff --git a/easybuild/easyblocks/b/binary.py b/easybuild/easyblocks/b/binary.py index 3786119c0c..32936246ad 100644 --- a/easybuild/easyblocks/b/binary.py +++ b/easybuild/easyblocks/b/binary.py @@ -33,7 +33,7 @@ from easybuild.framework.application import Application -class eb_Binary(Application): +class EB_Binary(Application): """Support for installing a binary package. Just copy it's sources to the installdir""" diff --git a/easybuild/easyblocks/b/blacs.py b/easybuild/easyblocks/b/blacs.py index 509b26ad5b..fd69355078 100644 --- a/easybuild/easyblocks/b/blacs.py +++ b/easybuild/easyblocks/b/blacs.py @@ -50,7 +50,7 @@ def det_interface(log, path): log.error("Failed to determine interface, output for xintface: %s" % out) -class eb_BLACS(Application): +class EB_BLACS(Application): """ Support for building/installing BLACS - configure: symlink BMAKES/Bmake.MPI-LINUX to Bmake.inc diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py index 9aeef14b2e..b82d572e91 100644 --- a/easybuild/easyblocks/c/cp2k.py +++ b/easybuild/easyblocks/c/cp2k.py @@ -41,7 +41,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_CP2K(Application): +class EB_CP2K(Application): """ Support for building CP2K - prepare module include files if required diff --git a/easybuild/easyblocks/c/cplex.py b/easybuild/easyblocks/c/cplex.py index 3743e168f2..bba69a2174 100644 --- a/easybuild/easyblocks/c/cplex.py +++ b/easybuild/easyblocks/c/cplex.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd_qa -class eb_CPLEX(Binary): +class EB_CPLEX(Binary): """ Support for installing CPLEX. Version 12.2 has a self-extracting package with a Java installer diff --git a/easybuild/easyblocks/d/doxygen.py b/easybuild/easyblocks/d/doxygen.py index 67cdfd62f5..e9d7790c3b 100644 --- a/easybuild/easyblocks/d/doxygen.py +++ b/easybuild/easyblocks/d/doxygen.py @@ -30,7 +30,7 @@ from easybuild.tools.filetools import run_cmd -class eb_Doxygen(Application): +class EB_Doxygen(Application): """Support for building/installing Doxygen""" def configure(self): diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py index 5dd56ea3e9..f6c51bfefe 100644 --- a/easybuild/easyblocks/f/fsl.py +++ b/easybuild/easyblocks/f/fsl.py @@ -32,7 +32,7 @@ from easybuild.tools.filetools import run_cmd -class eb_FSL(Application): +class EB_FSL(Application): """Support for building and installing FSL.""" def __init__(self,*args,**kwargs): diff --git a/easybuild/easyblocks/g/g2clib.py b/easybuild/easyblocks/g/g2clib.py index 4005c98a15..6b5b53cd7c 100644 --- a/easybuild/easyblocks/g/g2clib.py +++ b/easybuild/easyblocks/g/g2clib.py @@ -34,7 +34,7 @@ from easybuild.tools.modules import get_software_root -class eb_g2clib(Application): +class EB_g2clib(Application): """Support for building g2clib GRIB2 C library.""" def configure(self): diff --git a/easybuild/easyblocks/g/g2lib.py b/easybuild/easyblocks/g/g2lib.py index 2d0e00bfe4..51ce554160 100644 --- a/easybuild/easyblocks/g/g2lib.py +++ b/easybuild/easyblocks/g/g2lib.py @@ -33,7 +33,7 @@ from easybuild.tools.modules import get_software_root -class eb_g2lib(Application): +class EB_g2lib(Application): """Support for building g2clib GRIB2 library.""" def configure(self): diff --git a/easybuild/easyblocks/g/gcc.py b/easybuild/easyblocks/g/gcc.py index d895c61cb4..dfdbaabae9 100644 --- a/easybuild/easyblocks/g/gcc.py +++ b/easybuild/easyblocks/g/gcc.py @@ -41,7 +41,7 @@ from easybuild.tools.systemtools import get_kernel_name, get_shared_lib_ext, get_platform_name -class eb_GCC(Application): +class EB_GCC(Application): """ Self-contained build of GCC. Uses system compiler for initial build, then bootstraps. diff --git a/easybuild/easyblocks/h/hdf5.py b/easybuild/easyblocks/h/hdf5.py index 302810c0bc..64a970b3a9 100644 --- a/easybuild/easyblocks/h/hdf5.py +++ b/easybuild/easyblocks/h/hdf5.py @@ -32,7 +32,7 @@ from easybuild.tools.modules import get_software_root -class eb_HDF5(Application): +class EB_HDF5(Application): """Support for building/installing HDF5""" def configure(self): diff --git a/easybuild/easyblocks/h/hpl.py b/easybuild/easyblocks/h/hpl.py index 01879ad2d6..152a932ab8 100644 --- a/easybuild/easyblocks/h/hpl.py +++ b/easybuild/easyblocks/h/hpl.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class eb_HPL(Application): +class EB_HPL(Application): """ Support for building HPL (High Performance Linpack) - create Make.UNKNOWN diff --git a/easybuild/easyblocks/i/icc.py b/easybuild/easyblocks/i/icc.py index e1a2fd4714..467a46babb 100644 --- a/easybuild/easyblocks/i/icc.py +++ b/easybuild/easyblocks/i/icc.py @@ -32,7 +32,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class eb_icc(IntelBase): +class EB_icc(IntelBase): """Support for installing icc - tested with 11.1.046 diff --git a/easybuild/easyblocks/i/ifort.py b/easybuild/easyblocks/i/ifort.py index c88585c00e..dd89307d87 100644 --- a/easybuild/easyblocks/i/ifort.py +++ b/easybuild/easyblocks/i/ifort.py @@ -31,7 +31,7 @@ from easybuild.easyblocks.i.icc import Icc, IntelBase -class eb_ifort(Icc): +class EB_ifort(Icc): """ Class that can be used to install ifort - tested with 11.1.046 diff --git a/easybuild/easyblocks/i/imkl.py b/easybuild/easyblocks/i/imkl.py index 166cd71930..1098448115 100644 --- a/easybuild/easyblocks/i/imkl.py +++ b/easybuild/easyblocks/i/imkl.py @@ -39,7 +39,7 @@ from easybuild.tools.modules import Modules -class eb_imkl(IntelBase): +class EB_imkl(IntelBase): """ Class that can be used to install mkl - tested with 10.2.1.017 diff --git a/easybuild/easyblocks/i/impi.py b/easybuild/easyblocks/i/impi.py index 5b381f7876..b3dd7f498d 100644 --- a/easybuild/easyblocks/i/impi.py +++ b/easybuild/easyblocks/i/impi.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class eb_impi(IntelBase): +class EB_impi(IntelBase): """ Support for installing Intel MPI library """ diff --git a/easybuild/easyblocks/i/intelbase.py b/easybuild/easyblocks/i/intelbase.py index 2f4b509ec0..bc83bdc046 100644 --- a/easybuild/easyblocks/i/intelbase.py +++ b/easybuild/easyblocks/i/intelbase.py @@ -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 diff --git a/easybuild/easyblocks/i/ipp.py b/easybuild/easyblocks/i/ipp.py index 5e5df4bf59..f931be3343 100644 --- a/easybuild/easyblocks/i/ipp.py +++ b/easybuild/easyblocks/i/ipp.py @@ -29,7 +29,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class eb_ipp(IntelBase): +class EB_ipp(IntelBase): def sanitycheck(self): diff --git a/easybuild/easyblocks/i/itac.py b/easybuild/easyblocks/i/itac.py index 3e7b1f34b1..052e3547f8 100644 --- a/easybuild/easyblocks/i/itac.py +++ b/easybuild/easyblocks/i/itac.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd -class eb_itac(IntelBase): +class EB_itac(IntelBase): """ Class that can be used to install itac - tested with Intel Trace Analyzer and Collector 7.2.1.008 diff --git a/easybuild/easyblocks/l/lapack.py b/easybuild/easyblocks/l/lapack.py index d23746e2f2..efc3d56a01 100644 --- a/easybuild/easyblocks/l/lapack.py +++ b/easybuild/easyblocks/l/lapack.py @@ -61,7 +61,7 @@ def get_blas_lib(log): return blaslib -class eb_LAPACK(Application): +class EB_LAPACK(Application): """ Support for building LAPACK - read make.inc.example and replace BLAS line with configtops diff --git a/easybuild/easyblocks/l/libsmm.py b/easybuild/easyblocks/l/libsmm.py index 01bb2cee28..64468a044d 100644 --- a/easybuild/easyblocks/l/libsmm.py +++ b/easybuild/easyblocks/l/libsmm.py @@ -38,7 +38,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_libsmm(Application): +class EB_libsmm(Application): """ Support for the CP2K small matrix library Notes: - build can take really really long, and no real rebuilding needed for each version diff --git a/easybuild/easyblocks/m/maple.py b/easybuild/easyblocks/m/maple.py index 6476842ae9..e09b4be15d 100644 --- a/easybuild/easyblocks/m/maple.py +++ b/easybuild/easyblocks/m/maple.py @@ -33,7 +33,7 @@ from easybuild.tools.filetools import run_cmd_qa -class eb_Maple(Application): +class EB_Maple(Application): """Support for installing Maple.""" def unpack_src(self): diff --git a/easybuild/easyblocks/m/mrbayes.py b/easybuild/easyblocks/m/mrbayes.py index cd2eac54c4..11cec923ac 100644 --- a/easybuild/easyblocks/m/mrbayes.py +++ b/easybuild/easyblocks/m/mrbayes.py @@ -36,7 +36,7 @@ from easybuild.tools.modules import get_software_root -class eb_MrBayes(Application): +class EB_MrBayes(Application): """Support for building/installing MrBayes.""" def configure(self): diff --git a/easybuild/easyblocks/m/mvapich2.py b/easybuild/easyblocks/m/mvapich2.py index 1ac2596f4f..fa00784bda 100644 --- a/easybuild/easyblocks/m/mvapich2.py +++ b/easybuild/easyblocks/m/mvapich2.py @@ -33,7 +33,7 @@ from easybuild.framework.easyconfig import CUSTOM -class eb_MVAPICH2(Application): +class EB_MVAPICH2(Application): """ Support for building the MVAPICH2 MPI library. - some compiler dependent configure options diff --git a/easybuild/easyblocks/n/ncl.py b/easybuild/easyblocks/n/ncl.py index 2ded66ba67..daaaa4105d 100644 --- a/easybuild/easyblocks/n/ncl.py +++ b/easybuild/easyblocks/n/ncl.py @@ -37,7 +37,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_NCL(Application): +class EB_NCL(Application): """Support for building/installing NCL.""" def configure(self): diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py index d8930242a2..f04089cec9 100644 --- a/easybuild/easyblocks/n/netcdf.py +++ b/easybuild/easyblocks/n/netcdf.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_netCDF(Application): +class EB_netCDF(Application): """Support for building/installing netCDF""" def configure(self): diff --git a/easybuild/easyblocks/n/netcdf_fortran.py b/easybuild/easyblocks/n/netcdf_fortran.py index 2248450edb..10054015c0 100644 --- a/easybuild/easyblocks/n/netcdf_fortran.py +++ b/easybuild/easyblocks/n/netcdf_fortran.py @@ -33,7 +33,7 @@ from easybuild.framework.application import Application -class eb_netCDF_Fortran(Application): +class EB_netCDF_Fortran(Application): """Support for building/installing the netCDF-Fortran library""" def configure(self): diff --git a/easybuild/easyblocks/o/openfoam.py b/easybuild/easyblocks/o/openfoam.py index 03001c8777..c4ace2dce3 100644 --- a/easybuild/easyblocks/o/openfoam.py +++ b/easybuild/easyblocks/o/openfoam.py @@ -36,7 +36,7 @@ from easybuild.tools.modules import get_software_root -class eb_OpenFOAM(Application): +class EB_OpenFOAM(Application): """Support for building and installing OpenFOAM.""" def __init__(self,*args,**kwargs): diff --git a/easybuild/easyblocks/p/packedbinary.py b/easybuild/easyblocks/p/packedbinary.py index e583316eda..59f84d668b 100644 --- a/easybuild/easyblocks/p/packedbinary.py +++ b/easybuild/easyblocks/p/packedbinary.py @@ -27,7 +27,7 @@ from easybuild.easyblocks.b.binary import Binary -class eb_PackedBinary(Binary, Application): +class EB_PackedBinary(Binary, Application): """Support for installing a packed binary package. Just unpack its source in the installdir """ diff --git a/easybuild/easyblocks/p/pasha.py b/easybuild/easyblocks/p/pasha.py index 88f577bc8e..28583fabd2 100644 --- a/easybuild/easyblocks/p/pasha.py +++ b/easybuild/easyblocks/p/pasha.py @@ -29,7 +29,7 @@ from easybuild.tools.modules import get_software_root -class eb_Pasha(Application): +class EB_Pasha(Application): """Support for building and installing Pasha""" def configure(self): diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index 2232f5748e..709445145f 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -35,7 +35,7 @@ from easybuild.tools.modules import get_software_root -class eb_Python(Application): +class EB_Python(Application): """Support for building/installing Python - default configure/make/make install works fine @@ -51,10 +51,10 @@ def extra_packages_pre(self): """ We set some default configs here for packages included in python """ - #insert new packages by building them with eb_DefaultPythonPackage + #insert new packages by building them with EB_DefaultPythonPackage self.log.debug("setting extra packages options") - # use __name__ here, since this is the module where eb_DefaultPythonPackage is defined - self.setcfg('pkgdefaultclass', (__name__, "eb_DefaultPythonPackage")) + # use __name__ here, since this is the module where EB_DefaultPythonPackage is defined + self.setcfg('pkgdefaultclass', (__name__, "EB_DefaultPythonPackage")) self.setcfg('pkgfilter', ('python -c "import %(name)s"', "")) def make_install(self): @@ -71,7 +71,7 @@ def make_install(self): self.log.error("Failed to symlink %s to %s: %s" % err) -class eb_DefaultPythonPackage(ApplicationPackage): +class EB_DefaultPythonPackage(ApplicationPackage): """ Easyblock for python packages to be included in the python installation. """ @@ -189,10 +189,10 @@ def getcfg(self, *args, **kwargs): return self.mself.getcfg(*args, **kwargs) -class eb_nose(eb_DefaultPythonPackage): +class EB_nose(EB_DefaultPythonPackage): """nose package""" def __init__(self, mself, pkg, pkginstalldeps): - eb_DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + EB_DefaultPythonPackage.__init__(self, mself, pkg, pkginstalldeps) # use extra unpack options to avoid problems like # 'tar: Ignoring unknown extended header keyword `SCHILY.nlink' @@ -200,8 +200,8 @@ def __init__(self, mself, pkg, pkginstalldeps): self.unpack_options = ' --pax-option="delete=SCHILY.*" --pax-option="delete=LIBARCHIVE.*" ' -class eb_FortranPythonPackage(eb_DefaultPythonPackage): - """Extends eb_DefaultPythonPackage to add a Fortran compiler to the make call""" +class EB_FortranPythonPackage(EB_DefaultPythonPackage): + """Extends EB_DefaultPythonPackage to add a Fortran compiler to the make call""" def make(self): comp_fam = self.toolkit().comp_family() @@ -227,11 +227,11 @@ def make(self): run_cmd(cmd, log_all=True, simple=True) -class eb_numpy(eb_FortranPythonPackage): +class EB_numpy(EB_FortranPythonPackage): """numpy package""" def __init__(self, mself, pkg, pkginstalldeps): - eb_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + EB_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) self.pkgcfgs = mself.getcfg('pkgcfgs') if self.pkgcfgs.has_key('numpysitecfglibsubdirs'): @@ -302,7 +302,7 @@ def make_install(self): """Install numpy package We remove the numpy build dir here, so scipy doesn't find it by accident """ - eb_FortranPythonPackage.make_install(self) + EB_FortranPythonPackage.make_install(self) builddir = os.path.join(self.builddir, "numpy") if os.path.isdir(builddir): shutil.rmtree(builddir) @@ -310,11 +310,11 @@ def make_install(self): self.log.debug("build dir %s already clean" % builddir) -class eb_scipy(eb_FortranPythonPackage): +class EB_scipy(EB_FortranPythonPackage): """scipy package""" def __init__(self, mself, pkg, pkginstalldeps): - eb_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) + EB_FortranPythonPackage.__init__(self, mself, pkg, pkginstalldeps) # disable testing test = False diff --git a/easybuild/easyblocks/s/scalapack.py b/easybuild/easyblocks/s/scalapack.py index 1f6eed2342..1b1ccc601d 100644 --- a/easybuild/easyblocks/s/scalapack.py +++ b/easybuild/easyblocks/s/scalapack.py @@ -37,7 +37,7 @@ from easybuild.tools.modules import get_software_root -class eb_ScaLAPACK(Application): +class EB_ScaLAPACK(Application): """ Support for building and installing ScaLAPACK, both versions 1.x and 2.x """ diff --git a/easybuild/easyblocks/t/tarball.py b/easybuild/easyblocks/t/tarball.py index 2f1e3a03f4..31ba7f8440 100644 --- a/easybuild/easyblocks/t/tarball.py +++ b/easybuild/easyblocks/t/tarball.py @@ -32,7 +32,7 @@ from easybuild.framework.application import Application -class eb_Tarball(Application): +class EB_Tarball(Application): """ Precompiled software packaged as tarball: - will unpack binary and copy it to the install dir diff --git a/easybuild/easyblocks/t/tbb.py b/easybuild/easyblocks/t/tbb.py index f64daca652..a4a439b455 100644 --- a/easybuild/easyblocks/t/tbb.py +++ b/easybuild/easyblocks/t/tbb.py @@ -33,7 +33,7 @@ from easybuild.easyblocks.i.intelbase import IntelBase -class eb_tbb(IntelBase): +class EB_tbb(IntelBase): """EasyBlock for tbb, threading building blocks""" def make_install(self): diff --git a/easybuild/easyblocks/t/toolkit.py b/easybuild/easyblocks/t/toolkit.py index 207d99a8bf..822c6b1193 100644 --- a/easybuild/easyblocks/t/toolkit.py +++ b/easybuild/easyblocks/t/toolkit.py @@ -29,7 +29,7 @@ from easybuild.framework.application import Application -class eb_Toolkit(Application): +class EB_Toolkit(Application): """ Compiler toolkit: generate module file only, nothing to make/install """ diff --git a/easybuild/easyblocks/w/wps.py b/easybuild/easyblocks/w/wps.py index 257931ed6f..e2eb7a9b42 100644 --- a/easybuild/easyblocks/w/wps.py +++ b/easybuild/easyblocks/w/wps.py @@ -43,7 +43,7 @@ from easybuild.tools.modules import get_software_root, get_software_version -class eb_WPS(Application): +class EB_WPS(Application): """Support for building/installing WPS.""" def __init__(self, *args, **kwargs): diff --git a/easybuild/easyblocks/w/wrf.py b/easybuild/easyblocks/w/wrf.py index f21197d289..8e083ae789 100644 --- a/easybuild/easyblocks/w/wrf.py +++ b/easybuild/easyblocks/w/wrf.py @@ -40,7 +40,7 @@ from easybuild.tools.modules import get_software_root -class eb_WRF(Application): +class EB_WRF(Application): """Support for building/installing WRF.""" def __init__(self,*args,**kwargs): From b9a189dc271f28fa6c2f8a1bb3ee51be41dd4b7d Mon Sep 17 00:00:00 2001 From: Fotis Georgatos Date: Sun, 19 Aug 2012 01:43:36 +0200 Subject: [PATCH 9/9] fixed docstrings to be ready for generated documentation Signed-off-by: Fotis Georgatos --- easybuild/tools/filetools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/filetools.py b/easybuild/tools/filetools.py index 25ed064f64..cdbb98b6e7 100644 --- a/easybuild/tools/filetools.py +++ b/easybuild/tools/filetools.py @@ -721,7 +721,6 @@ def patch_perl_script_autoflush(path): def encode_string(name): """ - This encoding function handles funky package names ad infinitum, like: example: '0_foo+0x0x#-$__' becomes: '0_underscore_foo_plus_0x0x_hash__minus__dollar__underscore__underscore_' @@ -780,5 +779,6 @@ def encode_string(name): return result def encode_class_name(name): + """return encoded version of class name""" return "EB_" + encode_string(name)