From 310099d88838c8e08d15fb34028263c9294b62e9 Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 4 Mar 2016 09:31:03 +0100 Subject: atlas : provides blas and lapack --- var/spack/repos/builtin/packages/atlas/package.py | 58 +++++++++++------------ 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index fc683363a7..f9b50417b0 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -1,31 +1,34 @@ from spack import * from spack.util.executable import Executable -import os +import os.path class Atlas(Package): """ - Automatically Tuned Linear Algebra Software, generic shared - ATLAS is an approach for the automatic generation and optimization of - numerical software. Currently ATLAS supplies optimized versions for the - complete set of linear algebra kernels known as the Basic Linear Algebra - Subroutines (BLAS), and a subset of the linear algebra routines in the - LAPACK library. + Automatically Tuned Linear Algebra Software, generic shared ATLAS is an approach for the automatic generation and + optimization of numerical software. Currently ATLAS supplies optimized versions for the complete set of linear + algebra kernels known as the Basic Linear Algebra Subroutines (BLAS), and a subset of the linear algebra routines + in the LAPACK library. """ homepage = "http://math-atlas.sourceforge.net/" - version('3.11.34', '0b6c5389c095c4c8785fd0f724ec6825', - url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2/download') version('3.10.2', 'a4e21f343dec8f22e7415e339f09f6da', - url='http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2') + url='http://downloads.sourceforge.net/project/math-atlas/Stable/3.10.2/atlas3.10.2.tar.bz2', preferred=True) + resource(name='lapack', + url='http://www.netlib.org/lapack/lapack-3.5.0.tgz', + md5='b1d3e3e425b2e44a06760ff173104bdf', + destination='spack-resource-lapack', + when='@3:') - # TODO: make this provide BLAS once it works better. Create a way - # TODO: to mark "beta" packages and require explicit invocation. + version('3.11.34', '0b6c5389c095c4c8785fd0f724ec6825', + url='http://sourceforge.net/projects/math-atlas/files/Developer%20%28unstable%29/3.11.34/atlas3.11.34.tar.bz2/download') - # provides('blas') + variant('shared', default=True, description='Builds shared library') + provides('blas') + provides('lapack') def patch(self): - # Disable thraed check. LLNL's environment does not allow + # Disable thread check. LLNL's environment does not allow # disabling of CPU throttling in a way that ATLAS actually # understands. filter_file(r'^\s+if \(thrchk\) exit\(1\);', 'if (0) exit(1);', @@ -33,26 +36,21 @@ class Atlas(Package): # TODO: investigate a better way to add the check back in # TODO: using, say, MSRs. Or move this to a variant. - @when('@:3.10') def install(self, spec, prefix): - with working_dir('ATLAS-Build', create=True): - configure = Executable('../configure') - configure('--prefix=%s' % prefix, '-C', 'ic', 'cc', '-C', 'if', 'f77', "--dylibs") - make() - make('check') - make('ptcheck') - make('time') - make("install") + options = [] + if '+shared' in spec: + options.append('--shared') - def install(self, spec, prefix): - with working_dir('ATLAS-Build', create=True): - configure = Executable('../configure') - configure('--incdir=%s' % prefix.include, - '--libdir=%s' % prefix.lib, - '--cc=cc', - "--shared") + # Lapack resource + lapack_stage = self.stage[1] + lapack_tarfile = os.path.basename(lapack_stage.fetcher.url) + lapack_tarfile_path = join_path(lapack_stage.path, lapack_tarfile) + options.append('--with-netlib-lapack-tarfile=%s' % lapack_tarfile_path) + with working_dir('spack-build', create=True): + configure = Executable('../configure') + configure('--prefix=%s' % prefix, *options) make() make('check') make('ptcheck') -- cgit v1.2.3-70-g09d2 From a2af4940aaf169f3358f19986fc94a02222a8096 Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 4 Mar 2016 09:59:16 +0100 Subject: atlas : disabling parallel builds --- var/spack/repos/builtin/packages/atlas/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index f9b50417b0..b5504122b7 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -27,6 +27,8 @@ class Atlas(Package): provides('blas') provides('lapack') + parallel = False + def patch(self): # Disable thread check. LLNL's environment does not allow # disabling of CPU throttling in a way that ATLAS actually -- cgit v1.2.3-70-g09d2 From d493658a583231eeb778613cf7b6c8c8641c63a0 Mon Sep 17 00:00:00 2001 From: Cyrus Harrison Date: Sun, 20 Mar 2016 15:18:36 -0700 Subject: cmake package: add variant for openssl support The openssl variant defaults to true to preserve spack's current CMake configuration, which is using OpenSSL. Signed-off-by: Cyrus Harrison --- var/spack/repos/builtin/packages/cmake/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index cc93c7067c..be930a90ab 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -38,6 +38,7 @@ class Cmake(Package): version('2.8.10.2', '097278785da7182ec0aea8769d06860c') variant('ncurses', default=True, description='Enables the build of the ncurses gui') + variant('openssl', default=True, description="Enables CMake's OpenSSL features") variant('qt', default=False, description='Enables the build of cmake-gui') variant('doc', default=False, description='Enables the generation of html and man page documentation') @@ -77,8 +78,9 @@ class Cmake(Package): options.append('--sphinx-html') options.append('--sphinx-man') - options.append('--') - options.append('-DCMAKE_USE_OPENSSL=ON') + if '+openssl' in spec: + options.append('--') + options.append('-DCMAKE_USE_OPENSSL=ON') configure(*options) make() -- cgit v1.2.3-70-g09d2 From bba66cbe2836e364b58a611a5a5f5ae0d9692df4 Mon Sep 17 00:00:00 2001 From: Cyrus Harrison Date: Sun, 20 Mar 2016 19:27:22 -0700 Subject: cmake: depend on openssl when openssl variant=true --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index be930a90ab..1f93d39769 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -43,6 +43,7 @@ class Cmake(Package): variant('doc', default=False, description='Enables the generation of html and man page documentation') depends_on('ncurses', when='+ncurses') + depends_on('openssl', when='+openssl') depends_on('qt', when='+qt') depends_on('python@2.7.11:', when='+doc') depends_on('py-sphinx', when='+doc') -- cgit v1.2.3-70-g09d2 From 5b3c96a9bb0ba6501512c93dcdb26510e796314e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:07:45 +0100 Subject: fix superlu-dist lib installation --- var/spack/repos/builtin/packages/superlu-dist/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index c4c76909b3..9a94de8ba5 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -54,6 +54,7 @@ class SuperluDist(Package): # need to install by hand headers_location = join_path(self.prefix.include,'superlu_dist') mkdirp(headers_location) + mkdirp(prefix.lib) # FIXME: fetch all headers in the folder automatically for header in ['Cnames.h','cublas_utils.h','dcomplex.h','html_mainpage.h','machines.h','old_colamd.h','psymbfact.h','superlu_ddefs.h','superlu_defs.h','superlu_enum_consts.h','superlu_zdefs.h','supermatrix.h','util_dist.h']: superludist_header = join_path(self.stage.source_path, 'SRC/',header) -- cgit v1.2.3-70-g09d2 From 01918a6f4891ab985b8619daaadc1bf484e4db17 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 05:26:51 +0100 Subject: fix MUMPS build on OSX (set parallel=False) --- var/spack/repos/builtin/packages/mumps/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 5c120c37df..5a254dfd00 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -135,7 +135,8 @@ class Mumps(Package): self.write_makefile_inc() - make(*make_libs) + # Build fails in parallel, at least on OS-X + make(*make_libs, parallel=False) install_tree('lib', prefix.lib) install_tree('include', prefix.include) -- cgit v1.2.3-70-g09d2 From 0fbdb3f65d234d6ed8f77d3732c134962ad47b35 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 23 Mar 2016 15:43:16 +0100 Subject: modules : added configuration file with disable keyword --- lib/spack/spack/config.py | 28 +++++++++++++++++++++++++--- lib/spack/spack/modules.py | 12 ++++++++++-- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 6afd69b3ac..6ef79c70b1 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -237,7 +237,29 @@ section_schemas = { 'type' : 'object', 'default' : {}, } - },},},},},} + },},},},},}, + 'modules': { + '$schema': 'http://json-schema.org/schema#', + 'title': 'Spack module file configuration file schema', + 'type': 'object', + 'additionalProperties': False, + 'patternProperties': { + r'modules:?': { + 'type': 'object', + 'default': {}, + 'additionalProperties': False, + 'properties': { + 'disable': { + 'type': 'array', + 'default': [], + 'items': { + 'type': 'string' + } + } + } + }, + }, + }, } """OrderedDict of config scopes keyed by name. @@ -405,11 +427,11 @@ def _read_config_file(filename, schema): validate_section(data, schema) return data - except MarkedYAMLError, e: + except MarkedYAMLError as e: raise ConfigFileError( "Error parsing yaml%s: %s" % (str(e.context_mark), e.problem)) - except IOError, e: + except IOError as e: raise ConfigFileError( "Error reading configuration file %s: %s" % (filename, str(e))) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 8ed98e5d38..639f1101b8 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -48,6 +48,7 @@ import textwrap import llnl.util.tty as tty import spack +import spack.config from llnl.util.filesystem import join_path, mkdirp from spack.environment import * @@ -57,6 +58,13 @@ __all__ = ['EnvModule', 'Dotkit', 'TclModule'] module_types = {} +def read_configuration_file(): + f = spack.config.get_config('modules') + f.setdefault('disable', []) # Default : disable nothing + return f + +CONFIGURATION = read_configuration_file() + def print_help(): """For use by commands to tell user how to activate shell support.""" @@ -115,8 +123,8 @@ class EnvModule(object): class __metaclass__(type): def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) - if cls.name != 'env_module': - module_types[cls.name] = cls + if cls.name != 'env_module' and cls.name not in CONFIGURATION['disable']: + module_types[cls.name] = cls def __init__(self, spec=None): self.spec = spec -- cgit v1.2.3-70-g09d2 From d93f2b335d5a5198b943cc6293a1d24d614c979b Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 23 Mar 2016 16:04:36 +0100 Subject: modules : fixed annoying indent --- lib/spack/spack/modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 639f1101b8..d354c8bb71 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -124,7 +124,7 @@ class EnvModule(object): def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) if cls.name != 'env_module' and cls.name not in CONFIGURATION['disable']: - module_types[cls.name] = cls + module_types[cls.name] = cls def __init__(self, spec=None): self.spec = spec -- cgit v1.2.3-70-g09d2 From 34a8f0c96bc50870f20f094d95b403b2bb19487d Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 23 Mar 2016 17:01:52 +0100 Subject: espresso : fixes #454 --- var/spack/repos/builtin/packages/espresso/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index a2bf58f585..59f362ab46 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -32,6 +32,10 @@ class Espresso(Package): if '+elpa' in spec and ('~mpi' in spec or '~scalapack' in spec): raise RuntimeError(error.format(variant='elpa')) + def setup_environment(self, spack_env, run_env): + # Espresso copies every executable in prefix without creating sub-folders + run_env.prepend_path('PATH', self.prefix) + def install(self, spec, prefix): self.check_variants(spec) -- cgit v1.2.3-70-g09d2 From 4e5dfc8b18ed30e261fe6b6dd014c8991937934d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 19:40:16 +0100 Subject: fix missing (depricated) _dggsvd_ and _sggsvd_ in Openblas 0.2.16 --- var/spack/repos/builtin/packages/openblas/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 781a1e2ec8..1d10f217c4 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -6,6 +6,7 @@ class Openblas(Package): homepage = "http://www.openblas.net" url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz" + version('0.2.17', '664a12807f2a2a7cda4781e3ab2ae0e1') version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc') version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') @@ -14,7 +15,14 @@ class Openblas(Package): provides('lapack') def install(self, spec, prefix): - make('libs', 'netlib', 'shared', 'CC=cc', 'FC=f77') + extra=[] + if spec.satisfies('@0.2.16'): + extra.extend([ + 'BUILD_LAPACK_DEPRECATED=1' # fix missing _dggsvd_ and _sggsvd_ + ]) + + make('libs', 'netlib', 'shared', 'CC=cc', 'FC=f77',*extra) + make("tests") make('install', "PREFIX='%s'" % prefix) lib_dsuffix = 'dylib' if sys.platform == 'darwin' else 'so' -- cgit v1.2.3-70-g09d2 From f095e619b985a9271ff96cd469086d4654edf489 Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 24 Mar 2016 09:31:28 +0100 Subject: module files configuration : enable/disable logic is now positive --- lib/spack/spack/config.py | 2 +- lib/spack/spack/modules.py | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 6ef79c70b1..14e5aaf4fb 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -249,7 +249,7 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'properties': { - 'disable': { + 'enable': { 'type': 'array', 'default': [], 'items': { diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index d354c8bb71..6c32937c3c 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -57,13 +57,8 @@ __all__ = ['EnvModule', 'Dotkit', 'TclModule'] # Registry of all types of modules. Entries created by EnvModule's metaclass module_types = {} +CONFIGURATION = spack.config.get_config('modules') -def read_configuration_file(): - f = spack.config.get_config('modules') - f.setdefault('disable', []) # Default : disable nothing - return f - -CONFIGURATION = read_configuration_file() def print_help(): """For use by commands to tell user how to activate shell support.""" @@ -123,7 +118,7 @@ class EnvModule(object): class __metaclass__(type): def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) - if cls.name != 'env_module' and cls.name not in CONFIGURATION['disable']: + if cls.name != 'env_module' and cls.name in CONFIGURATION['enable']: module_types[cls.name] = cls def __init__(self, spec=None): -- cgit v1.2.3-70-g09d2 From e4adc675e58222f3082f167e709e3819beafd474 Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 24 Mar 2016 10:04:02 +0100 Subject: module files configuration : added default configuration --- etc/spack/modules.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 etc/spack/modules.yaml diff --git a/etc/spack/modules.yaml b/etc/spack/modules.yaml new file mode 100644 index 0000000000..aa2a2c3fe2 --- /dev/null +++ b/etc/spack/modules.yaml @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------- +# This is the default spack module files generation configuration. +# +# Changes to this file will affect all users of this spack install, +# although users can override these settings in their ~/.spack/modules.yaml. +# ------------------------------------------------------------------------- +modules: + enable: ['tcl', 'dotkit'] -- cgit v1.2.3-70-g09d2 From 9b8b17b6f1ec22ce4ac2115e5f7687beba21dd19 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 10:36:02 +0100 Subject: fix parmetis on Ubuntu with GNU compilers by linking to lm --- var/spack/repos/builtin/packages/parmetis/link-to-lm.patch | 14 ++++++++++++++ var/spack/repos/builtin/packages/parmetis/package.py | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/parmetis/link-to-lm.patch diff --git a/var/spack/repos/builtin/packages/parmetis/link-to-lm.patch b/var/spack/repos/builtin/packages/parmetis/link-to-lm.patch new file mode 100644 index 0000000000..faa809231e --- /dev/null +++ b/var/spack/repos/builtin/packages/parmetis/link-to-lm.patch @@ -0,0 +1,14 @@ +diff --git a/libparmetis/CMakeLists.txt b/libparmetis/CMakeLists.txt +index 9cfc8a7..dfc0125 100644 +--- a/libparmetis/CMakeLists.txt ++++ b/libparmetis/CMakeLists.txt +@@ -5,7 +5,7 @@ file(GLOB parmetis_sources *.c) + # Create libparmetis + add_library(parmetis ${ParMETIS_LIBRARY_TYPE} ${parmetis_sources}) + # Link with metis and MPI libraries. +-target_link_libraries(parmetis metis ${MPI_LIBRARIES}) ++target_link_libraries(parmetis metis ${MPI_LIBRARIES} "-lm") + set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}") + + install(TARGETS parmetis + diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index c691cf4191..bc71fb7299 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -52,6 +52,8 @@ class Parmetis(Package): # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch') + patch('link-to-lm.patch') + depends_on('gdb', when='+gdb') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 758a9c9096bd6c306f2dba0e40b46544dcec1992 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 23 Mar 2016 11:18:11 +0100 Subject: python extensions : create PYTHONPATH in module files --- lib/spack/spack/modules.py | 10 +++++----- var/spack/repos/builtin/packages/python/package.py | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 6c32937c3c..d45fdde703 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -161,13 +161,13 @@ class EnvModule(object): # Let the extendee modify their extensions before asking for # package-specific modifications - for extendee in self.pkg.extendees: - extendee_spec = self.spec[extendee] - extendee_spec.package.setup_dependent_package( - self.pkg.module, self.spec) + spack_env = EnvironmentModifications() + for item in self.pkg.extendees: + package = self.spec[item].package + package.setup_dependent_package(self.pkg.module, self.spec) + package.setup_dependent_environment(spack_env, env, self.spec) # Package-specific environment modifications - spack_env = EnvironmentModifications() self.spec.package.setup_environment(spack_env, env) # TODO : implement site-specific modifications and filters diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 6d9030805b..f5237c3b57 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -105,7 +105,10 @@ class Python(Package): pythonpath = ':'.join(python_paths) spack_env.set('PYTHONPATH', pythonpath) - run_env.set('PYTHONPATH', pythonpath) + + # For run time environment set only the path for extension_spec and prepend it to PYTHONPATH + if extension_spec.package.extends(self.spec): + run_env.prepend_path('PYTHONPATH', os.path.join(extension_spec.prefix, self.site_packages_dir)) def setup_dependent_package(self, module, ext_spec): -- cgit v1.2.3-70-g09d2 From 8643e2191357dd6f53bfafdfd51f43b770e2137c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 24 Mar 2016 12:34:58 -0500 Subject: Simplified NumPy dependencies --- .../repos/builtin/packages/py-numpy/package.py | 37 ++++++++++++++++------ .../repos/builtin/packages/py-scipy/package.py | 5 +-- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 0354811186..a08e612df6 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -1,24 +1,43 @@ from spack import * class PyNumpy(Package): - """array processing for numbers, strings, records, and objects.""" - homepage = "https://pypi.python.org/pypi/numpy" + """NumPy is the fundamental package for scientific computing with Python. + It contains among other things: a powerful N-dimensional array object, + sophisticated (broadcasting) functions, tools for integrating C/C++ and + Fortran code, and useful linear algebra, Fourier transform, and random + number capabilities""" + homepage = "http://www.numpy.org/" url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz" - version('1.9.1', '78842b73560ec378142665e712ae4ad9') - version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') + version('1.10.4', 'aed294de0aa1ac7bd3f9745f4f1968ad') + version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') + version('1.9.1', '78842b73560ec378142665e712ae4ad9') - variant('blas', default=True) + + variant('blas', default=True) + variant('lapack', default=True) extends('python') depends_on('py-nose') - depends_on('netlib-blas+fpic', when='+blas') - depends_on('netlib-lapack+shared', when='+blas') + depends_on('blas', when='+blas') + depends_on('lapack', when='+lapack') def install(self, spec, prefix): + libraries = [] + library_dirs = [] + if '+blas' in spec: + libraries.append('blas') + library_dirs.append(spec['blas'].prefix.lib) + if '+lapack' in spec: + libraries.append('lapack') + library_dirs.append(spec['lapack'].prefix.lib) + + if '+blas' in spec or '+lapack' in spec: with open('site.cfg', 'w') as f: f.write('[DEFAULT]\n') - f.write('libraries=lapack,blas\n') - f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) + f.write('libraries=%s\n' % ','.join(libraries)) + f.write('library_dirs=%s\n' % ':'.join(library_dirs)) + python('setup.py', 'install', '--prefix=%s' % prefix) + diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index 3a1124cc15..c2161c90c4 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -2,11 +2,12 @@ from spack import * class PyScipy(Package): """Scientific Library for Python.""" - homepage = "https://pypi.python.org/pypi/scipy" + homepage = "http://www.scipy.org/" url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz" - version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') + version('0.17.0', '5ff2971e1ce90e762c59d2cd84837224') version('0.15.1', 'be56cd8e60591d6332aac792a5880110') + version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') extends('python') depends_on('py-nose') -- cgit v1.2.3-70-g09d2 From 254f65f2994de32da8681c24838beb32bbbc5fe1 Mon Sep 17 00:00:00 2001 From: Alfredo Gimenez Date: Thu, 24 Mar 2016 10:48:38 -0700 Subject: Remove incorrect sanity check for libelf --- var/spack/repos/builtin/packages/libelf/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libelf/package.py b/var/spack/repos/builtin/packages/libelf/package.py index 9f16708af5..29bc21b65c 100644 --- a/var/spack/repos/builtin/packages/libelf/package.py +++ b/var/spack/repos/builtin/packages/libelf/package.py @@ -38,8 +38,6 @@ class Libelf(Package): provides('elf') - sanity_check_is_file = 'include/libelf.h' - def install(self, spec, prefix): configure("--prefix=" + prefix, "--enable-shared", -- cgit v1.2.3-70-g09d2