Merge branch 'develop' into packages/foam-extend
This commit is contained in:
@@ -22,30 +22,25 @@
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
import functools
|
||||
import glob
|
||||
import inspect
|
||||
import os
|
||||
import re
|
||||
from contextlib import closing
|
||||
|
||||
import spack
|
||||
from llnl.util.lang import match_predicate
|
||||
from spack import *
|
||||
from spack.util.environment import *
|
||||
|
||||
|
||||
class R(Package):
|
||||
"""
|
||||
R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a
|
||||
wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical tests, time series
|
||||
analysis, classification, clustering, etc. Please consult the R project homepage for further information.
|
||||
"""
|
||||
"""R is 'GNU S', a freely available language and environment for
|
||||
statistical computing and graphics which provides a wide variety of
|
||||
statistical and graphical techniques: linear and nonlinear modelling,
|
||||
statistical tests, time series analysis, classification, clustering, etc.
|
||||
Please consult the R project homepage for further information."""
|
||||
|
||||
homepage = "https://www.r-project.org"
|
||||
url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz"
|
||||
|
||||
|
||||
extendable = True
|
||||
|
||||
version('3.3.0', '5a7506c8813432d1621c9725e86baf7a')
|
||||
version('3.2.3', '1ba3dac113efab69e706902810cc2970')
|
||||
version('3.2.2', '57cef5c2e210a5454da1979562a10e5b')
|
||||
version('3.2.1', 'c2aac8b40f84e08e7f8c9068de9239a3')
|
||||
@@ -53,7 +48,8 @@ class R(Package):
|
||||
version('3.1.3', '53a85b884925aa6b5811dfc361d73fc4')
|
||||
version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74')
|
||||
|
||||
variant('external-lapack', default=False, description='Links to externally installed BLAS/LAPACK')
|
||||
variant('external-lapack', default=False,
|
||||
description='Links to externally installed BLAS/LAPACK')
|
||||
|
||||
# Virtual dependencies
|
||||
depends_on('blas', when='+external-lapack')
|
||||
@@ -65,6 +61,7 @@ class R(Package):
|
||||
depends_on('icu')
|
||||
depends_on('glib')
|
||||
depends_on('zlib')
|
||||
depends_on('bzip2')
|
||||
depends_on('libtiff')
|
||||
depends_on('jpeg')
|
||||
depends_on('cairo')
|
||||
@@ -72,18 +69,21 @@ class R(Package):
|
||||
depends_on('freetype')
|
||||
depends_on('tcl')
|
||||
depends_on('tk')
|
||||
depends_on('curl')
|
||||
depends_on('pcre')
|
||||
depends_on('jdk')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
rlibdir = join_path(prefix, 'rlib')
|
||||
options = ['--prefix=%s' % prefix,
|
||||
'--libdir=%s' % rlibdir,
|
||||
'--enable-R-shlib',
|
||||
'--enable-BLAS-shlib',
|
||||
'--enable-R-framework=no']
|
||||
configure_args = ['--prefix=%s' % prefix,
|
||||
'--libdir=%s' % rlibdir,
|
||||
'--enable-R-shlib',
|
||||
'--enable-BLAS-shlib',
|
||||
'--enable-R-framework=no']
|
||||
if '+external-lapack' in spec:
|
||||
options.extend(['--with-blas', '--with-lapack'])
|
||||
configure_args.extend(['--with-blas', '--with-lapack'])
|
||||
|
||||
configure(*options)
|
||||
configure(*configure_args)
|
||||
make()
|
||||
make('install')
|
||||
|
||||
@@ -106,25 +106,24 @@ def setup_dependent_environment(self, spack_env, run_env, extension_spec):
|
||||
r_libs_path = ':'.join(r_libs_path)
|
||||
spack_env.set('R_LIBS', r_libs_path)
|
||||
|
||||
# For run time environment set only the path for extension_spec and prepend it to R_LIBS
|
||||
# For run time environment set only the path for extension_spec and
|
||||
# prepend it to R_LIBS
|
||||
if extension_spec.package.extends(self.spec):
|
||||
run_env.prepend_path('R_LIBS', os.path.join(extension_spec.prefix, self.r_lib_dir))
|
||||
|
||||
run_env.prepend_path('R_LIBS', os.path.join(
|
||||
extension_spec.prefix, self.r_lib_dir))
|
||||
|
||||
def setup_dependent_package(self, module, ext_spec):
|
||||
"""
|
||||
Called before R modules' install() methods.
|
||||
|
||||
In most cases, extensions will only need to have one line::
|
||||
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
||||
"""
|
||||
"""Called before R modules' install() methods. In most cases,
|
||||
extensions will only need to have one line:
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' %
|
||||
self.stage.source_path)"""
|
||||
# R extension builds can have a global R executable function
|
||||
module.R = Executable(join_path(self.spec.prefix.bin, 'R'))
|
||||
|
||||
# Add variable for library directry
|
||||
module.r_lib_dir = os.path.join(ext_spec.prefix, self.r_lib_dir)
|
||||
|
||||
# Make the site packages directory for extensions, if it does not exist already.
|
||||
# Make the site packages directory for extensions, if it does not exist
|
||||
# already.
|
||||
if ext_spec.package.is_extension:
|
||||
mkdirp(module.r_lib_dir)
|
||||
|
67
var/spack/repos/builtin/packages/armadillo/package.py
Normal file
67
var/spack/repos/builtin/packages/armadillo/package.py
Normal file
@@ -0,0 +1,67 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Armadillo(Package):
|
||||
"""Armadillo is a high quality linear algebra library (matrix maths)
|
||||
for the C++ language, aiming towards a good balance between speed and
|
||||
ease of use."""
|
||||
|
||||
homepage = "http://arma.sourceforge.net/"
|
||||
url = "http://sourceforge.net/projects/arma/files/armadillo-7.200.1.tar.xz"
|
||||
|
||||
version('7.200.1', 'ed86d6df0058979e107502e1fe3e469e')
|
||||
|
||||
variant('hdf5', default=False, description='Include HDF5 support')
|
||||
|
||||
depends_on('arpack')
|
||||
depends_on('blas')
|
||||
depends_on('lapack')
|
||||
depends_on('superlu@5.2:')
|
||||
depends_on('hdf5', when='+hdf5')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
cmake_args = [
|
||||
# ARPACK support
|
||||
'-DARPACK_LIBRARY={0}/libarpack.a'.format(
|
||||
spec['arpack'].prefix.lib),
|
||||
# BLAS support
|
||||
'-DBLAS_LIBRARY={0}'.format(spec['blas'].blas_shared_lib),
|
||||
# LAPACK support
|
||||
'-DLAPACK_LIBRARY={0}'.format(spec['lapack'].lapack_shared_lib),
|
||||
# SuperLU support
|
||||
'-DSuperLU_INCLUDE_DIR={0}'.format(spec['superlu'].prefix.include),
|
||||
'-DSuperLU_LIBRARY={0}/libsuperlu.a'.format(
|
||||
spec['superlu'].prefix.lib64),
|
||||
# HDF5 support
|
||||
'-DDETECT_HDF5={0}'.format('ON' if '+hdf5' in spec else 'OFF')
|
||||
]
|
||||
|
||||
cmake_args.extend(std_cmake_args)
|
||||
cmake('.', *cmake_args)
|
||||
|
||||
make()
|
||||
make('install')
|
@@ -24,12 +24,12 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
import shutil
|
||||
|
||||
|
||||
class Arpack(Package):
|
||||
"""A collection of Fortran77 subroutines designed to solve large scale
|
||||
eigenvalue problems.
|
||||
"""
|
||||
eigenvalue problems."""
|
||||
|
||||
homepage = "http://www.caam.rice.edu/software/ARPACK/"
|
||||
url = "http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz"
|
||||
|
||||
@@ -39,27 +39,35 @@ class Arpack(Package):
|
||||
depends_on('lapack')
|
||||
|
||||
def patch(self):
|
||||
# Filter the cray makefile to make a spack one.
|
||||
shutil.move('ARMAKES/ARmake.CRAY', 'ARmake.inc')
|
||||
makefile = FileFilter('ARmake.inc')
|
||||
|
||||
# Be sure to use Spack F77 wrapper
|
||||
makefile.filter('^FC.*', 'FC = f77')
|
||||
makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g')
|
||||
# Section 1: Paths and Libraries
|
||||
|
||||
# Set up some variables.
|
||||
makefile.filter('^PLAT.*', 'PLAT = ')
|
||||
makefile.filter('^home.*', 'home = %s' % os.getcwd())
|
||||
makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix)
|
||||
makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix)
|
||||
# Change the build directory
|
||||
makefile.filter('^home.*', 'home = %s' % os.getcwd())
|
||||
|
||||
# build the library in our own prefix.
|
||||
makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/libarpack.a' % os.getcwd())
|
||||
# Use external BLAS/LAPACK
|
||||
makefile.filter('^BLASdir.*',
|
||||
'BLASdir = %s' % self.spec['blas'].prefix)
|
||||
makefile.filter('^LAPACKdir.*',
|
||||
'LAPACKdir = %s' % self.spec['lapack'].prefix)
|
||||
|
||||
# Do not include the platform in the library name
|
||||
makefile.filter('^PLAT.*', 'PLAT = ')
|
||||
makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = $(home)/libarpack.a')
|
||||
|
||||
# Section 2: Compilers
|
||||
|
||||
# Be sure to use the Spack compiler wrapper
|
||||
makefile.filter('^FC.*', 'FC = {0}'.format(os.environ['F77']))
|
||||
makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g -fPIC')
|
||||
|
||||
if not which('ranlib'):
|
||||
makefile.filter('^RANLIB.*', 'RANLIB = touch')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir('SRC'):
|
||||
make('all')
|
||||
|
||||
mkdirp(prefix.lib)
|
||||
mkdir(prefix.lib)
|
||||
install('libarpack.a', prefix.lib)
|
||||
|
50
var/spack/repos/builtin/packages/bertini/package.py
Normal file
50
var/spack/repos/builtin/packages/bertini/package.py
Normal file
@@ -0,0 +1,50 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Bertini(Package):
|
||||
"""Bertini is a general-purpose solver, written in C, that was created
|
||||
for research about polynomial continuation. It solves for the numerical
|
||||
solution of systems of polynomial equations using homotopy continuation."""
|
||||
|
||||
homepage = "https://bertini.nd.edu/"
|
||||
url = "https://bertini.nd.edu/BertiniSource_v1.5.tar.gz"
|
||||
|
||||
version('1.5', 'e3f6cc6e7f9a0cf1d73185e8671af707')
|
||||
|
||||
variant('mpi', default=True, description='Compile in parallel')
|
||||
|
||||
depends_on('flex')
|
||||
depends_on('bison')
|
||||
depends_on('gmp')
|
||||
depends_on('mpfr')
|
||||
depends_on('mpi', when='+mpi')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure('--prefix=%s' % prefix)
|
||||
|
||||
make()
|
||||
make("install")
|
@@ -24,14 +24,16 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Binutils(Package):
|
||||
"""GNU binutils, which contain the linker, assembler, objdump and others"""
|
||||
|
||||
homepage = "http://www.gnu.org/software/binutils/"
|
||||
url = "https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
|
||||
|
||||
url="https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
|
||||
|
||||
# 2.26 is incompatible with py-pillow build for some reason.
|
||||
version('2.26', '64146a0faa3b411ba774f47d41de239f')
|
||||
version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66')
|
||||
version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66', preferred=True)
|
||||
version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b')
|
||||
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e')
|
||||
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764')
|
||||
@@ -40,12 +42,15 @@ class Binutils(Package):
|
||||
depends_on('flex')
|
||||
depends_on('bison')
|
||||
|
||||
# Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell
|
||||
variant('krellpatch', default=False, description="build with openspeedshop based patch.")
|
||||
# Add a patch that creates binutils libiberty_pic.a which is preferred by
|
||||
# OpenSpeedShop and cbtf-krell
|
||||
variant('krellpatch', default=False,
|
||||
description="build with openspeedshop based patch.")
|
||||
variant('gold', default=True, description="build the gold linker")
|
||||
patch('binutilskrell-2.24.patch', when='@2.24+krellpatch')
|
||||
|
||||
patch('cr16.patch')
|
||||
patch('update_symbol-2.26.patch', when='@2.26')
|
||||
|
||||
variant('libiberty', default=False, description='Also install libiberty.')
|
||||
|
||||
|
@@ -0,0 +1,104 @@
|
||||
From 544ddf9322b1b83982e5cb84a54d084ee7e718ea Mon Sep 17 00:00:00 2001
|
||||
From: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Wed, 24 Feb 2016 15:13:35 -0800
|
||||
Subject: [PATCH] Update symbol version for symbol from linker script
|
||||
|
||||
We need to update symbol version for symbols from linker script.
|
||||
|
||||
Backport from master
|
||||
|
||||
bfd/
|
||||
|
||||
PR ld/19698
|
||||
* elflink.c (bfd_elf_record_link_assignment): Set versioned if
|
||||
symbol version is unknown.
|
||||
|
||||
ld/
|
||||
|
||||
PR ld/19698
|
||||
* testsuite/ld-elf/pr19698.d: New file.
|
||||
* testsuite/ld-elf/pr19698.s: Likewise.
|
||||
* testsuite/ld-elf/pr19698.t: Likewise.
|
||||
---
|
||||
bfd/ChangeLog | 9 +++++++++
|
||||
bfd/elflink.c | 13 +++++++++++++
|
||||
ld/ChangeLog | 10 ++++++++++
|
||||
ld/testsuite/ld-elf/pr19698.d | 10 ++++++++++
|
||||
ld/testsuite/ld-elf/pr19698.s | 5 +++++
|
||||
ld/testsuite/ld-elf/pr19698.t | 11 +++++++++++
|
||||
6 files changed, 58 insertions(+), 0 deletions(-)
|
||||
create mode 100644 ld/testsuite/ld-elf/pr19698.d
|
||||
create mode 100644 ld/testsuite/ld-elf/pr19698.s
|
||||
create mode 100644 ld/testsuite/ld-elf/pr19698.t
|
||||
|
||||
diff --git a/bfd/elflink.c b/bfd/elflink.c
|
||||
index ae8d148..8fcaadd 100644
|
||||
--- a/bfd/elflink.c
|
||||
+++ b/bfd/elflink.c
|
||||
@@ -555,6 +555,19 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
|
||||
if (h == NULL)
|
||||
return provide;
|
||||
|
||||
+ if (h->versioned == unknown)
|
||||
+ {
|
||||
+ /* Set versioned if symbol version is unknown. */
|
||||
+ char *version = strrchr (name, ELF_VER_CHR);
|
||||
+ if (version)
|
||||
+ {
|
||||
+ if (version > name && version[-1] != ELF_VER_CHR)
|
||||
+ h->versioned = versioned_hidden;
|
||||
+ else
|
||||
+ h->versioned = versioned;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
switch (h->root.type)
|
||||
{
|
||||
case bfd_link_hash_defined:
|
||||
diff --git a/ld/testsuite/ld-elf/pr19698.d b/ld/testsuite/ld-elf/pr19698.d
|
||||
new file mode 100644
|
||||
index 0000000..a39f67a
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr19698.d
|
||||
@@ -0,0 +1,10 @@
|
||||
+#ld: -shared $srcdir/$subdir/pr19698.t
|
||||
+#readelf : --dyn-syms --wide
|
||||
+#target: *-*-linux* *-*-gnu* *-*-solaris*
|
||||
+
|
||||
+Symbol table '\.dynsym' contains [0-9]+ entries:
|
||||
+#...
|
||||
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@VERS.1
|
||||
+#...
|
||||
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@@VERS.2
|
||||
+#pass
|
||||
diff --git a/ld/testsuite/ld-elf/pr19698.s b/ld/testsuite/ld-elf/pr19698.s
|
||||
new file mode 100644
|
||||
index 0000000..875dca4
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr19698.s
|
||||
@@ -0,0 +1,5 @@
|
||||
+ .text
|
||||
+ .globl foo
|
||||
+ .type foo, %function
|
||||
+foo:
|
||||
+ .byte 0
|
||||
diff --git a/ld/testsuite/ld-elf/pr19698.t b/ld/testsuite/ld-elf/pr19698.t
|
||||
new file mode 100644
|
||||
index 0000000..09d9125
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-elf/pr19698.t
|
||||
@@ -0,0 +1,11 @@
|
||||
+"foo@VERS.1" = foo;
|
||||
+
|
||||
+VERSION {
|
||||
+VERS.2 {
|
||||
+ global:
|
||||
+ foo;
|
||||
+};
|
||||
+
|
||||
+VERS.1 {
|
||||
+};
|
||||
+}
|
||||
--
|
||||
1.7.1
|
||||
|
@@ -25,9 +25,8 @@
|
||||
from spack import *
|
||||
import spack
|
||||
import sys
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
class Boost(Package):
|
||||
"""Boost provides free peer-reviewed portable C++ source
|
||||
@@ -75,23 +74,24 @@ class Boost(Package):
|
||||
version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0')
|
||||
|
||||
default_install_libs = set(['atomic',
|
||||
'chrono',
|
||||
'date_time',
|
||||
'filesystem',
|
||||
'graph',
|
||||
'iostreams',
|
||||
'locale',
|
||||
'log',
|
||||
'math',
|
||||
'program_options',
|
||||
'random',
|
||||
'regex',
|
||||
'serialization',
|
||||
'signals',
|
||||
'system',
|
||||
'test',
|
||||
'thread',
|
||||
'wave'])
|
||||
'chrono',
|
||||
'date_time',
|
||||
'filesystem',
|
||||
'graph',
|
||||
'iostreams',
|
||||
'locale',
|
||||
'log',
|
||||
'math',
|
||||
'program_options',
|
||||
'random',
|
||||
'regex',
|
||||
'serialization',
|
||||
'signals',
|
||||
'system',
|
||||
'test',
|
||||
'thread',
|
||||
'timer',
|
||||
'wave'])
|
||||
|
||||
# mpi/python are not installed by default because they pull in many
|
||||
# dependencies and/or because there is a great deal of customization
|
||||
@@ -109,6 +109,7 @@ class Boost(Package):
|
||||
variant('multithreaded', default=True, description="Build multi-threaded versions of libraries")
|
||||
variant('singlethreaded', default=True, description="Build single-threaded versions of libraries")
|
||||
variant('icu_support', default=False, description="Include ICU support (for regex/locale libraries)")
|
||||
variant('graph', default=False, description="Build the Boost Graph library")
|
||||
|
||||
depends_on('icu', when='+icu_support')
|
||||
depends_on('python', when='+python')
|
||||
@@ -120,15 +121,18 @@ class Boost(Package):
|
||||
patch('boost_11856.patch', when='@1.60.0%gcc@4.4.7')
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle Boost's weird URLs, which write the version two different ways."""
|
||||
"""
|
||||
Handle Boost's weird URLs,
|
||||
which write the version two different ways.
|
||||
"""
|
||||
parts = [str(p) for p in Version(version)]
|
||||
dots = ".".join(parts)
|
||||
underscores = "_".join(parts)
|
||||
return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % (
|
||||
dots, underscores)
|
||||
return "http://downloads.sourceforge.net/project/boost" \
|
||||
"/boost/%s/boost_%s.tar.bz2" % (dots, underscores)
|
||||
|
||||
def determine_toolset(self, spec):
|
||||
if spec.satisfies("arch=darwin-x86_64"):
|
||||
if spec.satisfies("platform=darwin"):
|
||||
return 'darwin'
|
||||
|
||||
toolsets = {'g++': 'gcc',
|
||||
@@ -149,20 +153,20 @@ def determine_bootstrap_options(self, spec, withLibs, options):
|
||||
|
||||
if '+python' in spec:
|
||||
options.append('--with-python=%s' %
|
||||
join_path(spec['python'].prefix.bin, 'python'))
|
||||
join_path(spec['python'].prefix.bin, 'python'))
|
||||
|
||||
with open('user-config.jam', 'w') as f:
|
||||
compiler_wrapper = join_path(spack.build_env_path, 'c++')
|
||||
f.write("using {0} : : {1} ;\n".format(boostToolsetId,
|
||||
compiler_wrapper))
|
||||
compiler_wrapper))
|
||||
|
||||
if '+mpi' in spec:
|
||||
f.write('using mpi : %s ;\n' %
|
||||
join_path(spec['mpi'].prefix.bin, 'mpicxx'))
|
||||
join_path(spec['mpi'].prefix.bin, 'mpicxx'))
|
||||
if '+python' in spec:
|
||||
f.write('using python : %s : %s ;\n' %
|
||||
(spec['python'].version,
|
||||
join_path(spec['python'].prefix.bin, 'python')))
|
||||
(spec['python'].version,
|
||||
join_path(spec['python'].prefix.bin, 'python')))
|
||||
|
||||
def determine_b2_options(self, spec, options):
|
||||
if '+debug' in spec:
|
||||
@@ -178,8 +182,7 @@ def determine_b2_options(self, spec, options):
|
||||
'-s', 'BZIP2_INCLUDE=%s' % spec['bzip2'].prefix.include,
|
||||
'-s', 'BZIP2_LIBPATH=%s' % spec['bzip2'].prefix.lib,
|
||||
'-s', 'ZLIB_INCLUDE=%s' % spec['zlib'].prefix.include,
|
||||
'-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib,
|
||||
])
|
||||
'-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib])
|
||||
|
||||
linkTypes = ['static']
|
||||
if '+shared' in spec:
|
||||
@@ -191,7 +194,8 @@ def determine_b2_options(self, spec, options):
|
||||
if '+singlethreaded' in spec:
|
||||
threadingOpts.append('single')
|
||||
if not threadingOpts:
|
||||
raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled")
|
||||
raise RuntimeError("""At least one of {singlethreaded,
|
||||
multithreaded} must be enabled""")
|
||||
|
||||
options.extend([
|
||||
'toolset=%s' % self.determine_toolset(spec),
|
||||
@@ -202,9 +206,9 @@ def determine_b2_options(self, spec, options):
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# On Darwin, Boost expects the Darwin libtool. However, one of the
|
||||
# dependencies may have pulled in Spack's GNU libtool, and these two are
|
||||
# not compatible. We thus create a symlink to Darwin's libtool and add
|
||||
# it at the beginning of PATH.
|
||||
# dependencies may have pulled in Spack's GNU libtool, and these two
|
||||
# are not compatible. We thus create a symlink to Darwin's libtool
|
||||
# and add it at the beginning of PATH.
|
||||
if sys.platform == 'darwin':
|
||||
newdir = os.path.abspath('darwin-libtool')
|
||||
mkdirp(newdir)
|
||||
@@ -217,7 +221,8 @@ def install(self, spec, prefix):
|
||||
withLibs.append(lib)
|
||||
if not withLibs:
|
||||
# if no libraries are specified for compilation, then you dont have
|
||||
# to configure/build anything, just copy over to the prefix directory.
|
||||
# to configure/build anything, just copy over to the prefix
|
||||
# directory.
|
||||
src = join_path(self.stage.source_path, 'boost')
|
||||
mkdirp(join_path(prefix, 'include'))
|
||||
dst = join_path(prefix, 'include', 'boost')
|
||||
@@ -235,6 +240,9 @@ def install(self, spec, prefix):
|
||||
withLibs.remove('chrono')
|
||||
if not spec.satisfies('@1.43.0:'):
|
||||
withLibs.remove('random')
|
||||
if '+graph' in spec and '+mpi' in spec:
|
||||
withLibs.remove('graph')
|
||||
withLibs.append('graph_parallel')
|
||||
|
||||
# to make Boost find the user-config.jam
|
||||
env['BOOST_BUILD_PATH'] = './'
|
||||
@@ -259,6 +267,7 @@ def install(self, spec, prefix):
|
||||
for threadingOpt in threadingOpts:
|
||||
b2('install', 'threading=%s' % threadingOpt, *b2_options)
|
||||
|
||||
# The shared libraries are not installed correctly on Darwin; correct this
|
||||
# The shared libraries are not installed correctly
|
||||
# on Darwin; correct this
|
||||
if (sys.platform == 'darwin') and ('+shared' in spec):
|
||||
fix_darwin_install_name(prefix.lib)
|
||||
|
51
var/spack/repos/builtin/packages/c-blosc/package.py
Normal file
51
var/spack/repos/builtin/packages/c-blosc/package.py
Normal file
@@ -0,0 +1,51 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
|
||||
import sys
|
||||
|
||||
from spack import *
|
||||
|
||||
class CBlosc(Package):
|
||||
"""Blosc, an extremely fast, multi-threaded, meta-compressor library"""
|
||||
homepage = "http://www.blosc.org"
|
||||
url = "https://github.com/Blosc/c-blosc/archive/v1.9.2.tar.gz"
|
||||
|
||||
version('1.9.2', 'dd2d83069d74b36b8093f1c6b49defc5')
|
||||
version('1.9.1', '7d708d3daadfacf984a87b71b1734ce2')
|
||||
version('1.9.0', 'e4c1dc8e2c468e5cfa2bf05eeee5357a')
|
||||
version('1.8.1', 'd73d5be01359cf271e9386c90dcf5b05')
|
||||
version('1.8.0', '5b92ecb287695ba20cc33d30bf221c4f')
|
||||
|
||||
depends_on("cmake")
|
||||
depends_on("snappy")
|
||||
depends_on("zlib")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
cmake('.', *std_cmake_args)
|
||||
|
||||
make()
|
||||
make("install")
|
||||
if sys.platform == 'darwin':
|
||||
fix_darwin_install_name(prefix.lib)
|
@@ -24,8 +24,10 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Cairo(Package):
|
||||
"""Cairo is a 2D graphics library with support for multiple output devices."""
|
||||
"""Cairo is a 2D graphics library with support for multiple output
|
||||
devices."""
|
||||
homepage = "http://cairographics.org"
|
||||
url = "http://cairographics.org/releases/cairo-1.14.0.tar.xz"
|
||||
|
||||
@@ -34,11 +36,12 @@ class Cairo(Package):
|
||||
depends_on("libpng")
|
||||
depends_on("glib")
|
||||
depends_on("pixman")
|
||||
depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig.
|
||||
depends_on("freetype")
|
||||
depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig.
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix,
|
||||
"--disable-trace", # can cause problems with libiberty
|
||||
"--disable-trace", # can cause problems with libiberty
|
||||
"--enable-tee")
|
||||
make()
|
||||
make("install")
|
||||
|
@@ -34,7 +34,7 @@ class Caliper(Package):
|
||||
homepage = "https://github.com/LLNL/Caliper"
|
||||
url = ""
|
||||
|
||||
version('master', git='ssh://git@github.com:LLNL/Caliper.git')
|
||||
version('master', git='https://github.com/LLNL/Caliper.git')
|
||||
|
||||
variant('mpi', default=False, description='Enable MPI function wrappers.')
|
||||
|
||||
|
197
var/spack/repos/builtin/packages/cantera/package.py
Normal file
197
var/spack/repos/builtin/packages/cantera/package.py
Normal file
@@ -0,0 +1,197 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Cantera(Package):
|
||||
"""Cantera is a suite of object-oriented software tools for problems
|
||||
involving chemical kinetics, thermodynamics, and/or transport processes."""
|
||||
|
||||
homepage = "http://www.cantera.org/docs/sphinx/html/index.html"
|
||||
url = "https://github.com/Cantera/cantera/archive/v2.2.1.tar.gz"
|
||||
|
||||
version('2.2.1', '9d1919bdef39ddec54485fc8a741a3aa')
|
||||
|
||||
variant('lapack', default=True, description='Build with external BLAS/LAPACK libraries')
|
||||
variant('threadsafe', default=True, description='Build threadsafe, requires Boost')
|
||||
variant('sundials', default=True, description='Build with external Sundials')
|
||||
variant('python', default=False, description='Build the Cantera Python module')
|
||||
variant('matlab', default=False, description='Build the Cantera Matlab toolbox')
|
||||
|
||||
# Required dependencies
|
||||
depends_on('scons')
|
||||
|
||||
# Recommended dependencies
|
||||
depends_on('blas', when='+lapack')
|
||||
depends_on('lapack', when='+lapack')
|
||||
depends_on('boost', when='+threadsafe')
|
||||
depends_on('sundials', when='+sundials') # must be compiled with -fPIC
|
||||
|
||||
# Python module dependencies
|
||||
extends('python', when='+python')
|
||||
depends_on('py-numpy', when='+python')
|
||||
depends_on('py-scipy', when='+python')
|
||||
depends_on('py-cython', when='+python')
|
||||
depends_on('py-3to2', when='+python')
|
||||
# TODO: these "when" specs don't actually work
|
||||
# depends_on('py-unittest2', when='+python^python@2.6')
|
||||
# depends_on('py-unittest2py3k', when='+python^python@3.1')
|
||||
|
||||
# Matlab toolbox dependencies
|
||||
# TODO: add Matlab package
|
||||
# TODO: allow packages to extend multiple other packages
|
||||
# extends('matlab', when='+matlab')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Required options
|
||||
options = [
|
||||
'prefix={0}'.format(prefix),
|
||||
'CC={0}'.format(os.environ['CC']),
|
||||
'CXX={0}'.format(os.environ['CXX']),
|
||||
'F77={0}'.format(os.environ['F77']),
|
||||
'FORTRAN={0}'.format(os.environ['FC']),
|
||||
'cc_flags=-fPIC',
|
||||
# Allow Spack environment variables to propagate through to SCons
|
||||
'env_vars=all'
|
||||
]
|
||||
|
||||
# BLAS/LAPACK support
|
||||
if '+lapack' in spec:
|
||||
options.extend([
|
||||
'blas_lapack_libs=lapack,blas',
|
||||
'blas_lapack_dir={0}'.format(spec['lapack'].prefix.lib)
|
||||
])
|
||||
|
||||
# Threadsafe build, requires Boost
|
||||
if '+threadsafe' in spec:
|
||||
options.extend([
|
||||
'build_thread_safe=yes',
|
||||
'boost_inc_dir={0}'.format(spec['boost'].prefix.include),
|
||||
'boost_lib_dir={0}'.format(spec['boost'].prefix.lib),
|
||||
'boost_thread_lib=boost_thread-mt,boost_system-mt'
|
||||
])
|
||||
else:
|
||||
options.append('build_thread_safe=no')
|
||||
|
||||
# Sundials support
|
||||
if '+sundials' in spec:
|
||||
options.extend([
|
||||
'use_sundials=y',
|
||||
'sundials_include={0}'.format(spec['sundials'].prefix.include),
|
||||
'sundials_libdir={0}'.format(spec['sundials'].prefix.lib),
|
||||
'sundials_license={0}'.format(
|
||||
join_path(spec['sundials'].prefix, 'LICENSE'))
|
||||
])
|
||||
else:
|
||||
options.append('use_sundials=n')
|
||||
|
||||
# Python module
|
||||
if '+python' in spec:
|
||||
options.extend([
|
||||
'python_package=full',
|
||||
'python_cmd={0}'.format(
|
||||
join_path(spec['python'].prefix.bin, 'python')),
|
||||
'python_array_home={0}'.format(spec['py-numpy'].prefix)
|
||||
])
|
||||
if spec['python'].satisfies('@3'):
|
||||
options.extend([
|
||||
'python3_package=y',
|
||||
'python3_cmd={0}'.format(
|
||||
join_path(spec['python'].prefix.bin, 'python')),
|
||||
'python3_array_home={0}'.format(spec['py-numpy'].prefix)
|
||||
])
|
||||
else:
|
||||
options.append('python3_package=n')
|
||||
else:
|
||||
options.append('python_package=none')
|
||||
options.append('python3_package=n')
|
||||
|
||||
# Matlab toolbox
|
||||
if '+matlab' in spec:
|
||||
options.extend([
|
||||
'matlab_toolbox=y',
|
||||
'matlab_path={0}'.format(spec['matlab'].prefix)
|
||||
])
|
||||
else:
|
||||
options.append('matlab_toolbox=n')
|
||||
|
||||
scons('build', *options)
|
||||
|
||||
if '+python' in spec:
|
||||
# Tests will always fail if Python dependencies aren't built
|
||||
# In addition, 3 of the tests fail when run in parallel
|
||||
scons('test', parallel=False)
|
||||
|
||||
scons('install')
|
||||
|
||||
self.filter_compilers()
|
||||
|
||||
def filter_compilers(self):
|
||||
"""Run after install to tell the Makefile and SConstruct files to use
|
||||
the compilers that Spack built the package with.
|
||||
|
||||
If this isn't done, they'll have CC, CXX, F77, and FC set to Spack's
|
||||
generic cc, c++, f77, and f90. We want them to be bound to whatever
|
||||
compiler they were built with."""
|
||||
|
||||
kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
|
||||
dirname = os.path.join(self.prefix, 'share/cantera/samples')
|
||||
|
||||
cc_files = [
|
||||
'cxx/rankine/Makefile', 'cxx/NASA_coeffs/Makefile',
|
||||
'cxx/kinetics1/Makefile', 'cxx/flamespeed/Makefile',
|
||||
'cxx/combustor/Makefile', 'f77/SConstruct'
|
||||
]
|
||||
|
||||
cxx_files = [
|
||||
'cxx/rankine/Makefile', 'cxx/NASA_coeffs/Makefile',
|
||||
'cxx/kinetics1/Makefile', 'cxx/flamespeed/Makefile',
|
||||
'cxx/combustor/Makefile'
|
||||
]
|
||||
|
||||
f77_files = [
|
||||
'f77/Makefile', 'f77/SConstruct'
|
||||
]
|
||||
|
||||
fc_files = [
|
||||
'f90/Makefile', 'f90/SConstruct'
|
||||
]
|
||||
|
||||
for filename in cc_files:
|
||||
filter_file(os.environ['CC'], self.compiler.cc,
|
||||
os.path.join(dirname, filename), **kwargs)
|
||||
|
||||
for filename in cxx_files:
|
||||
filter_file(os.environ['CXX'], self.compiler.cxx,
|
||||
os.path.join(dirname, filename), **kwargs)
|
||||
|
||||
for filename in f77_files:
|
||||
filter_file(os.environ['F77'], self.compiler.f77,
|
||||
os.path.join(dirname, filename), **kwargs)
|
||||
|
||||
for filename in fc_files:
|
||||
filter_file(os.environ['FC'], self.compiler.fc,
|
||||
os.path.join(dirname, filename), **kwargs)
|
28
var/spack/repos/builtin/packages/daal/package.py
Normal file
28
var/spack/repos/builtin/packages/daal/package.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
from spack.pkg.builtin.intel import IntelInstaller
|
||||
|
||||
|
||||
class Daal(IntelInstaller):
|
||||
"""Intel Data Analytics Acceleration Library.
|
||||
|
||||
Note: You will have to add the download file to a
|
||||
mirror so that Spack can find it. For instructions on how to set up a
|
||||
mirror, see http://software.llnl.gov/spack/mirrors.html"""
|
||||
|
||||
homepage = "https://software.intel.com/en-us/daal"
|
||||
|
||||
version('2016.2.181', 'aad2aa70e5599ebfe6f85b29d8719d46',
|
||||
url="file://%s/l_daal_2016.2.181.tgz" % os.getcwd())
|
||||
version('2016.3.210', 'ad747c0dd97dace4cad03cf2266cad28',
|
||||
url="file://%s/l_daal_2016.3.210.tgz" % os.getcwd())
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
self.intel_prefix = os.path.join(prefix, "pkg")
|
||||
IntelInstaller.install(self, spec, prefix)
|
||||
|
||||
daal_dir = os.path.join(self.intel_prefix, "daal")
|
||||
for f in os.listdir(daal_dir):
|
||||
os.symlink(os.path.join(daal_dir, f), os.path.join(self.prefix, f))
|
@@ -80,8 +80,8 @@ class Dealii(Package):
|
||||
depends_on("netcdf-cxx", when='+netcdf+mpi')
|
||||
depends_on("oce", when='+oce')
|
||||
depends_on("p4est", when='+p4est+mpi')
|
||||
depends_on("petsc+mpi", when='+petsc+mpi')
|
||||
depends_on("slepc", when='+slepc+petsc+mpi')
|
||||
depends_on("petsc@:3.6.4+mpi", when='+petsc+mpi') # FIXME: update after 3.7 is supported upstream. # NOQA: ignore=E501
|
||||
depends_on("slepc@:3.6.3", when='+slepc+petsc+mpi')
|
||||
depends_on("trilinos", when='+trilinos+mpi')
|
||||
|
||||
# developer dependnecies
|
||||
@@ -108,12 +108,11 @@ def install(self, spec, prefix):
|
||||
# of Spack's. Be more specific to avoid this.
|
||||
# Note that both lapack and blas are provided in -DLAPACK_XYZ.
|
||||
'-DLAPACK_FOUND=true',
|
||||
'-DLAPACK_INCLUDE_DIRS=%s;%s' %
|
||||
(spec['lapack'].prefix.include,
|
||||
spec['blas'].prefix.include),
|
||||
'-DLAPACK_LIBRARIES=%s;%s' %
|
||||
(spec['lapack'].lapack_shared_lib,
|
||||
spec['blas'].blas_shared_lib),
|
||||
'-DLAPACK_INCLUDE_DIRS=%s;%s' % (
|
||||
spec['lapack'].prefix.include, spec['blas'].prefix.include),
|
||||
'-DLAPACK_LIBRARIES=%s;%s' % (
|
||||
spec['lapack'].lapack_shared_lib,
|
||||
spec['blas'].blas_shared_lib),
|
||||
'-DMUPARSER_DIR=%s' % spec['muparser'].prefix,
|
||||
'-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix,
|
||||
'-DTBB_DIR=%s' % spec['tbb'].prefix,
|
||||
@@ -168,14 +167,14 @@ def install(self, spec, prefix):
|
||||
if '+netcdf' in spec:
|
||||
options.extend([
|
||||
'-DNETCDF_FOUND=true',
|
||||
'-DNETCDF_LIBRARIES=%s;%s' %
|
||||
(join_path(spec['netcdf-cxx'].prefix.lib,
|
||||
'libnetcdf_c++.%s' % dsuf),
|
||||
join_path(spec['netcdf'].prefix.lib,
|
||||
'libnetcdf.%s' % dsuf)),
|
||||
'-DNETCDF_INCLUDE_DIRS=%s;%s' %
|
||||
(spec['netcdf-cxx'].prefix.include,
|
||||
spec['netcdf'].prefix.include),
|
||||
'-DNETCDF_LIBRARIES=%s;%s' % (
|
||||
join_path(spec['netcdf-cxx'].prefix.lib,
|
||||
'libnetcdf_c++.%s' % dsuf),
|
||||
join_path(spec['netcdf'].prefix.lib,
|
||||
'libnetcdf.%s' % dsuf)),
|
||||
'-DNETCDF_INCLUDE_DIRS=%s;%s' % (
|
||||
spec['netcdf-cxx'].prefix.include,
|
||||
spec['netcdf'].prefix.include),
|
||||
])
|
||||
else:
|
||||
options.extend([
|
||||
@@ -244,38 +243,47 @@ def install(self, spec, prefix):
|
||||
print('========= Step-40 Trilinos ==========')
|
||||
print('=====================================')
|
||||
# change Linear Algebra to Trilinos
|
||||
filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
|
||||
('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
|
||||
# The below filter_file should be different for versions
|
||||
# before and after 8.4.0
|
||||
if spec.satisfies('@8.4.0:'):
|
||||
filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
|
||||
('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
|
||||
else:
|
||||
filter_file(r'(#define USE_PETSC_LA.*)',
|
||||
('// #define USE_PETSC_LA'), 'step-40.cc')
|
||||
if '^trilinos+hypre' in spec:
|
||||
make('release')
|
||||
make('run', parallel=False)
|
||||
|
||||
print('=====================================')
|
||||
print('=== Step-40 Trilinos SuperluDist ====')
|
||||
print('=====================================')
|
||||
# change to direct solvers
|
||||
filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
|
||||
filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
|
||||
(''), 'step-40.cc')
|
||||
filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)',
|
||||
(''), 'step-40.cc')
|
||||
filter_file(r'(preconditioner.initialize\(system_matrix, data\);)',
|
||||
(''), 'step-40.cc')
|
||||
filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
|
||||
filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
|
||||
if '^trilinos+superlu-dist' in spec:
|
||||
make('release')
|
||||
make('run', paralle=False)
|
||||
# the rest of the tests on step 40 only works for
|
||||
# dealii version 8.4.0 and after
|
||||
if spec.satisfies('@8.4.0:'):
|
||||
print('=====================================')
|
||||
print('=== Step-40 Trilinos SuperluDist ====')
|
||||
print('=====================================')
|
||||
# change to direct solvers
|
||||
filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
|
||||
filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
|
||||
(''), 'step-40.cc')
|
||||
filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', # NOQA: ignore=E501
|
||||
(''), 'step-40.cc')
|
||||
filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', # NOQA: ignore=E501
|
||||
(''), 'step-40.cc')
|
||||
filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
|
||||
filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
|
||||
if '^trilinos+superlu-dist' in spec:
|
||||
make('release')
|
||||
make('run', paralle=False)
|
||||
|
||||
print('=====================================')
|
||||
print('====== Step-40 Trilinos MUMPS =======')
|
||||
print('=====================================')
|
||||
# switch to Mumps
|
||||
filter_file(r'(Amesos_Superludist)',
|
||||
('Amesos_Mumps'), 'step-40.cc')
|
||||
if '^trilinos+mumps' in spec:
|
||||
make('release')
|
||||
make('run', parallel=False)
|
||||
print('=====================================')
|
||||
print('====== Step-40 Trilinos MUMPS =======')
|
||||
print('=====================================')
|
||||
# switch to Mumps
|
||||
filter_file(r'(Amesos_Superludist)',
|
||||
('Amesos_Mumps'), 'step-40.cc')
|
||||
if '^trilinos+mumps' in spec:
|
||||
make('release')
|
||||
make('run', parallel=False)
|
||||
|
||||
print('=====================================')
|
||||
print('============ Step-36 ================')
|
||||
|
@@ -26,20 +26,28 @@
|
||||
|
||||
import os
|
||||
|
||||
|
||||
class Espresso(Package):
|
||||
"""
|
||||
QE is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials
|
||||
modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials.
|
||||
QE is an integrated suite of Open-Source computer codes for
|
||||
electronic-structure calculations and materials modeling at
|
||||
the nanoscale. It is based on density-functional theory, plane
|
||||
waves, and pseudopotentials.
|
||||
"""
|
||||
homepage = 'http://quantum-espresso.org'
|
||||
url = 'http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz'
|
||||
|
||||
version(
|
||||
'5.4.0',
|
||||
'8bb78181b39bd084ae5cb7a512c1cfe7',
|
||||
url='http://www.qe-forge.org/gf/download/frsrelease/211/968/espresso-5.4.0.tar.gz'
|
||||
)
|
||||
version('5.3.0', '6848fcfaeb118587d6be36bd10b7f2c3')
|
||||
|
||||
variant('mpi', default=True, description='Build Quantum-ESPRESSO with mpi support')
|
||||
variant('mpi', default=True, description='Builds with mpi support')
|
||||
variant('openmp', default=False, description='Enables openMP support')
|
||||
variant('scalapack', default=True, description='Enables scalapack support')
|
||||
variant('elpa', default=True, description='Use elpa as an eigenvalue solver')
|
||||
variant('elpa', default=True, description='Uses elpa as an eigenvalue solver')
|
||||
|
||||
depends_on('blas')
|
||||
depends_on('lapack')
|
||||
@@ -47,7 +55,12 @@ class Espresso(Package):
|
||||
depends_on('mpi', when='+mpi')
|
||||
depends_on('fftw~mpi', when='~mpi')
|
||||
depends_on('fftw+mpi', when='+mpi')
|
||||
depends_on('scalapack', when='+scalapack+mpi') # TODO : + mpi needed to avoid false dependencies installation
|
||||
# TODO : + mpi needed to avoid false dependencies installation
|
||||
depends_on('scalapack', when='+scalapack+mpi')
|
||||
|
||||
# Spurious problems running in parallel the Makefile
|
||||
# generated by qe configure
|
||||
parallel = False
|
||||
|
||||
def check_variants(self, spec):
|
||||
error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active'
|
||||
@@ -87,10 +100,9 @@ def install(self, spec, prefix):
|
||||
configure(*options)
|
||||
make('all')
|
||||
|
||||
if spec.architecture.startswith('darwin'):
|
||||
if spec.satisfies('platform=darwin'):
|
||||
mkdirp(prefix.bin)
|
||||
for filename in glob("bin/*.x"):
|
||||
install(filename, prefix.bin)
|
||||
else:
|
||||
make('install')
|
||||
|
||||
|
176
var/spack/repos/builtin/packages/fenics/package.py
Normal file
176
var/spack/repos/builtin/packages/fenics/package.py
Normal file
@@ -0,0 +1,176 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Fenics(Package):
|
||||
"""FEniCS is organized as a collection of interoperable components
|
||||
that together form the FEniCS Project. These components include
|
||||
the problem-solving environment DOLFIN, the form compiler FFC, the
|
||||
finite element tabulator FIAT, the just-in-time compiler Instant,
|
||||
the code generation interface UFC, the form language UFL and a
|
||||
range of additional components."""
|
||||
|
||||
homepage = "http://fenicsproject.org/"
|
||||
url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-1.6.0.tar.gz"
|
||||
|
||||
base_url = "https://bitbucket.org/fenics-project/{pkg}/downloads/{pkg}-{version}.tar.gz" # NOQA: ignore E501
|
||||
|
||||
variant('hdf5', default=True, description='Compile with HDF5')
|
||||
variant('parmetis', default=True, description='Compile with ParMETIS')
|
||||
variant('scotch', default=True, description='Compile with Scotch')
|
||||
variant('petsc', default=True, description='Compile with PETSc')
|
||||
variant('slepc', default=True, description='Compile with SLEPc')
|
||||
variant('trilinos', default=True, description='Compile with Trilinos')
|
||||
variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers')
|
||||
variant('vtk', default=False, description='Compile with VTK')
|
||||
variant('qt', default=False, description='Compile with QT')
|
||||
variant('mpi', default=True, description='Enables the distributed memory support')
|
||||
variant('openmp', default=True, description='Enables the shared memory support')
|
||||
variant('shared', default=True, description='Enables the build of shared libraries')
|
||||
variant('debug', default=False, description='Builds a debug version of the libraries')
|
||||
|
||||
# not part of spack list for now
|
||||
# variant('petsc4py', default=True, description='Uses PETSc4py')
|
||||
# variant('slepc4py', default=True, description='Uses SLEPc4py')
|
||||
# variant('pastix', default=True, description='Compile with Pastix')
|
||||
|
||||
extends('python')
|
||||
|
||||
depends_on('py-numpy')
|
||||
depends_on('py-ply')
|
||||
depends_on('py-six')
|
||||
depends_on('py-sphinx@1.0.1:', when='+doc')
|
||||
depends_on('eigen@3.2.0:')
|
||||
depends_on('boost')
|
||||
depends_on('mpi', when='+mpi')
|
||||
depends_on('hdf5', when='+hdf5')
|
||||
depends_on('parmetis@4.0.2:^metis+real64', when='+parmetis')
|
||||
depends_on('scotch~metis', when='+scotch~mpi')
|
||||
depends_on('scotch+mpi~metis', when='+scotch+mpi')
|
||||
depends_on('petsc@3.4:', when='+petsc')
|
||||
depends_on('slepc@3.4:', when='+slepc')
|
||||
depends_on('trilinos', when='+trilinos')
|
||||
depends_on('vtk', when='+vtk')
|
||||
depends_on('suite-sparse', when='+suite-sparse')
|
||||
depends_on('qt', when='+qt')
|
||||
|
||||
# This are the build dependencies
|
||||
depends_on('py-setuptools')
|
||||
depends_on('cmake@2.8.12:')
|
||||
depends_on('swig@3.0.3:')
|
||||
|
||||
releases = [
|
||||
{
|
||||
'version': '1.6.0',
|
||||
'md5': '35cb4baf7ab4152a40fb7310b34d5800',
|
||||
'resources': {
|
||||
'ffc': '358faa3e9da62a1b1a717070217b793e',
|
||||
'fiat': 'f4509d05c911fd93cea8d288a78a6c6f',
|
||||
'instant': '5f2522eb032a5bebbad6597b6fe0732a',
|
||||
'ufl': 'c40c5f04eaa847377ab2323122284016',
|
||||
}
|
||||
},
|
||||
{
|
||||
'version': '1.5.0',
|
||||
'md5': '9b589a3534299a5e6d22c13c5eb30bb8',
|
||||
'resources': {
|
||||
'ffc': '343f6d30e7e77d329a400fd8e73e0b63',
|
||||
'fiat': 'da3fa4dd8177bb251e7f68ec9c7cf6c5',
|
||||
'instant': 'b744023ded27ee9df4a8d8c6698c0d58',
|
||||
'ufl': '130d7829cf5a4bd5b52bf6d0955116fd',
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
for release in releases:
|
||||
version(release['version'], release['md5'], url=base_url.format(pkg='dolfin', version=release['version']))
|
||||
for name, md5 in release['resources'].items():
|
||||
resource(name=name,
|
||||
url=base_url.format(pkg=name, **release),
|
||||
md5=md5,
|
||||
destination='depends',
|
||||
when='@{version}'.format(**release),
|
||||
placement=name)
|
||||
|
||||
def cmake_is_on(self, option):
|
||||
return 'ON' if option in self.spec else 'OFF'
|
||||
|
||||
def install(self, spec, prefix):
|
||||
for package in ['ufl', 'ffc', 'fiat', 'instant']:
|
||||
with working_dir(join_path('depends', package)):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
|
||||
cmake_args = [
|
||||
'-DCMAKE_BUILD_TYPE:STRING={0}'.format(
|
||||
'Debug' if '+debug' in spec else 'RelWithDebInfo'),
|
||||
'-DBUILD_SHARED_LIBS:BOOL={0}'.format(
|
||||
self.cmake_is_on('+shared')),
|
||||
'-DDOLFIN_SKIP_BUILD_TESTS:BOOL=ON',
|
||||
'-DDOLFIN_ENABLE_OPENMP:BOOL={0}'.format(
|
||||
self.cmake_is_on('+openmp')),
|
||||
'-DDOLFIN_ENABLE_CHOLMOD:BOOL={0}'.format(
|
||||
self.cmake_is_on('suite-sparse')),
|
||||
'-DDOLFIN_ENABLE_HDF5:BOOL={0}'.format(
|
||||
self.cmake_is_on('hdf5')),
|
||||
'-DDOLFIN_ENABLE_MPI:BOOL={0}'.format(
|
||||
self.cmake_is_on('mpi')),
|
||||
'-DDOLFIN_ENABLE_PARMETIS:BOOL={0}'.format(
|
||||
self.cmake_is_on('parmetis')),
|
||||
'-DDOLFIN_ENABLE_PASTIX:BOOL={0}'.format(
|
||||
self.cmake_is_on('pastix')),
|
||||
'-DDOLFIN_ENABLE_PETSC:BOOL={0}'.format(
|
||||
self.cmake_is_on('petsc')),
|
||||
'-DDOLFIN_ENABLE_PETSC4PY:BOOL={0}'.format(
|
||||
self.cmake_is_on('py-petsc4py')),
|
||||
'-DDOLFIN_ENABLE_PYTHON:BOOL={0}'.format(
|
||||
self.cmake_is_on('python')),
|
||||
'-DDOLFIN_ENABLE_QT:BOOL={0}'.format(
|
||||
self.cmake_is_on('qt')),
|
||||
'-DDOLFIN_ENABLE_SCOTCH:BOOL={0}'.format(
|
||||
self.cmake_is_on('scotch')),
|
||||
'-DDOLFIN_ENABLE_SLEPC:BOOL={0}'.format(
|
||||
self.cmake_is_on('slepc')),
|
||||
'-DDOLFIN_ENABLE_SLEPC4PY:BOOL={0}'.format(
|
||||
self.cmake_is_on('py-slepc4py')),
|
||||
'-DDOLFIN_ENABLE_SPHINX:BOOL={0}'.format(
|
||||
self.cmake_is_on('py-sphinx')),
|
||||
'-DDOLFIN_ENABLE_TRILINOS:BOOL={0}'.format(
|
||||
self.cmake_is_on('trilinos')),
|
||||
'-DDOLFIN_ENABLE_UMFPACK:BOOL={0}'.format(
|
||||
self.cmake_is_on('suite-sparse')),
|
||||
'-DDOLFIN_ENABLE_VTK:BOOL={0}'.format(
|
||||
self.cmake_is_on('vtk')),
|
||||
'-DDOLFIN_ENABLE_ZLIB:BOOL={0}'.format(
|
||||
self.cmake_is_on('zlib')),
|
||||
]
|
||||
|
||||
cmake_args.extend(std_cmake_args)
|
||||
|
||||
with working_dir('build', create=True):
|
||||
cmake('..', *cmake_args)
|
||||
|
||||
make()
|
||||
make('install')
|
103
var/spack/repos/builtin/packages/ferret/package.py
Normal file
103
var/spack/repos/builtin/packages/ferret/package.py
Normal file
@@ -0,0 +1,103 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Ferret(Package):
|
||||
"""Ferret is an interactive computer visualization and analysis environment
|
||||
designed to meet the needs of oceanographers and meteorologists
|
||||
analyzing large and complex gridded data sets."""
|
||||
homepage = "http://ferret.noaa.gov/Ferret/"
|
||||
url = "ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz"
|
||||
|
||||
version('6.96', '51722027c864369f41bab5751dfff8cc',
|
||||
url="ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz")
|
||||
|
||||
depends_on("hdf5~mpi~fortran")
|
||||
depends_on("netcdf~mpi")
|
||||
depends_on("netcdf-fortran")
|
||||
depends_on("readline")
|
||||
depends_on("zlib")
|
||||
|
||||
def patch(self):
|
||||
hdf5_prefix = self.spec['hdf5'].prefix
|
||||
netcdff_prefix = self.spec['netcdf-fortran'].prefix
|
||||
readline_prefix = self.spec['readline'].prefix
|
||||
libz_prefix = self.spec['zlib'].prefix
|
||||
|
||||
filter_file(r'^BUILDTYPE.+',
|
||||
'BUILDTYPE = x86_64-linux',
|
||||
'FERRET/site_specific.mk')
|
||||
filter_file(r'^INSTALL_FER_DIR.+',
|
||||
'INSTALL_FER_DIR = %s' % self.spec.prefix,
|
||||
'FERRET/site_specific.mk')
|
||||
filter_file(r'^HDF5_DIR.+',
|
||||
'HDF5_DIR = %s' % hdf5_prefix,
|
||||
'FERRET/site_specific.mk')
|
||||
filter_file(r'^NETCDF4_DIR.+',
|
||||
'NETCDF4_DIR = %s' % netcdff_prefix,
|
||||
'FERRET/site_specific.mk')
|
||||
filter_file(r'^READLINE_DIR.+',
|
||||
'READLINE_DIR = %s' % readline_prefix,
|
||||
'FERRET/site_specific.mk')
|
||||
filter_file(r'^LIBZ_DIR.+',
|
||||
'LIBZ_DIR = %s' % libz_prefix,
|
||||
'FERRET/site_specific.mk')
|
||||
filter_file(r'^JAVA_HOME.+',
|
||||
' ',
|
||||
'FERRET/site_specific.mk')
|
||||
filter_file(r'-lm',
|
||||
'-lgfortran -lm',
|
||||
'FERRET/platform_specific.mk.x86_64-linux')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
hdf5_prefix = spec['hdf5'].prefix
|
||||
netcdff_prefix = spec['netcdf-fortran'].prefix
|
||||
netcdf_prefix = spec['netcdf'].prefix
|
||||
libz_prefix = spec['zlib'].prefix
|
||||
ln = which('ln')
|
||||
ln('-sf',
|
||||
hdf5_prefix + '/lib',
|
||||
hdf5_prefix + '/lib64')
|
||||
ln('-sf',
|
||||
netcdff_prefix + '/lib',
|
||||
netcdff_prefix + '/lib64')
|
||||
ln('-sf',
|
||||
netcdf_prefix + '/lib/libnetcdf.a',
|
||||
netcdff_prefix + '/lib/libnetcdf.a')
|
||||
ln('-sf',
|
||||
netcdf_prefix + '/lib/libnetcdf.la',
|
||||
netcdff_prefix + '/lib/libnetcdf.la')
|
||||
ln('-sf',
|
||||
libz_prefix + '/lib',
|
||||
libz_prefix + '/lib64')
|
||||
os.environ['LDFLAGS'] = '-lquadmath'
|
||||
with working_dir('FERRET', create=False):
|
||||
os.environ['LD_X11'] = '-L/usr/lib/X11 -lX11'
|
||||
os.environ['HOSTTYPE'] = 'x86_64-linux'
|
||||
make(parallel=False)
|
||||
make("install")
|
@@ -24,17 +24,18 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Freetype(Package):
|
||||
"""Font package"""
|
||||
homepage = "http://http://www.freetype.org"
|
||||
url = "http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz"
|
||||
|
||||
version('2.5.3' , 'cafe9f210e45360279c730d27bf071e9')
|
||||
version('2.5.3', 'cafe9f210e45360279c730d27bf071e9')
|
||||
|
||||
depends_on('libpng')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix)
|
||||
configure("--prefix=%s" % prefix, "--with-harfbuzz=no")
|
||||
|
||||
make()
|
||||
make("install")
|
||||
|
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Harfbuzz(Package):
|
||||
"""The Harfbuzz package contains an OpenType text shaping engine."""
|
||||
homepage = "http://www.freedesktop.org/wiki/Software/HarfBuzz/"
|
||||
@@ -34,6 +35,8 @@ class Harfbuzz(Package):
|
||||
depends_on("glib")
|
||||
depends_on("icu")
|
||||
depends_on("freetype")
|
||||
depends_on("cairo")
|
||||
depends_on("zlib")
|
||||
|
||||
def patch(self):
|
||||
change_sed_delimiter('@', ';', 'src/Makefile.in')
|
||||
|
206
var/spack/repos/builtin/packages/hdf5-blosc/package.py
Normal file
206
var/spack/repos/builtin/packages/hdf5-blosc/package.py
Normal file
@@ -0,0 +1,206 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from spack import *
|
||||
|
||||
def _install_shlib(name, src, dst):
|
||||
"""Install a shared library from directory src to directory dst"""
|
||||
if sys.platform == "darwin":
|
||||
shlib0 = name + ".0.dylib"
|
||||
shlib = name + ".dylib"
|
||||
shutil.copyfile(join_path(src, shlib0), join_path(dst, shlib0))
|
||||
os.symlink(shlib0, join_path(dst, shlib))
|
||||
else:
|
||||
shlib000 = name + ".so.0.0.0"
|
||||
shlib0 = name + ".so.0"
|
||||
shlib = name + ".dylib"
|
||||
shutil.copyfile(join_path(src, shlib000), join_path(dst, shlib000))
|
||||
os.symlink(shlib000, join_path(dst, shlib0))
|
||||
os.symlink(shlib0, join_path(dst, shlib))
|
||||
|
||||
class Hdf5Blosc(Package):
|
||||
"""Blosc filter for HDF5"""
|
||||
homepage = "https://github.com/Blosc/hdf5-blosc"
|
||||
url = "https://github.com/Blosc/hdf5-blosc/archive/master.zip"
|
||||
|
||||
version('master', '02c04acbf4bec66ec8a35bf157d1c9de')
|
||||
|
||||
depends_on("c-blosc")
|
||||
depends_on("hdf5")
|
||||
depends_on("libtool")
|
||||
|
||||
parallel = False
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# The included cmake recipe doesn"t work for Darwin
|
||||
# cmake(".", *std_cmake_args)
|
||||
#
|
||||
# make()
|
||||
# make("install")
|
||||
# if sys.platform == "darwin":
|
||||
# fix_darwin_install_name(prefix.lib)
|
||||
|
||||
libtool = Executable(join_path(spec["libtool"].prefix.bin, "libtool"))
|
||||
if "+mpi" in spec["hdf5"]:
|
||||
cc = "mpicc"
|
||||
else:
|
||||
cc = "cc"
|
||||
shlibext = "so" if sys.platform!="darwin" else "dylib"
|
||||
mkdirp(prefix.include)
|
||||
mkdirp(prefix.lib)
|
||||
|
||||
# Build and install filter
|
||||
with working_dir("src"):
|
||||
libtool("--mode=compile", "--tag=CC",
|
||||
"cc", "-g", "-O",
|
||||
"-c", "blosc_filter.c")
|
||||
libtool("--mode=link", "--tag=CC",
|
||||
"cc", "-g", "-O",
|
||||
"-rpath", prefix.lib,
|
||||
"-o", "libblosc_filter.la",
|
||||
"blosc_filter.lo",
|
||||
"-L%s" % spec["c-blosc"].prefix.lib, "-lblosc",
|
||||
"-L%s" % spec["hdf5"].prefix.lib, "-lhdf5")
|
||||
_install_shlib("libblosc_filter", ".libs", prefix.lib)
|
||||
|
||||
# Build and install plugin
|
||||
# The plugin requires at least HDF5 1.8.11:
|
||||
if spec["hdf5"].satisfies("@1.8.11:"):
|
||||
libtool("--mode=compile", "--tag=CC",
|
||||
"cc", "-g", "-O",
|
||||
"-c", "blosc_plugin.c")
|
||||
libtool("--mode=link", "--tag=CC",
|
||||
"cc", "-g", "-O",
|
||||
"-rpath", prefix.lib,
|
||||
"-o", "libblosc_plugin.la",
|
||||
"blosc_plugin.lo",
|
||||
"-L%s" % prefix.lib, "-lblosc_filter",
|
||||
"-L%s" % spec["c-blosc"].prefix.lib, "-lblosc",
|
||||
"-L%s" % spec["hdf5"].prefix.lib, "-lhdf5")
|
||||
_install_shlib("libblosc_plugin", ".libs", prefix.lib)
|
||||
|
||||
self.check_install(spec)
|
||||
|
||||
def check_install(self, spec):
|
||||
"Build and run a small program to test the installed HDF5 Blosc plugin"
|
||||
print "Checking HDF5-Blosc plugin..."
|
||||
checkdir = "spack-check"
|
||||
with working_dir(checkdir, create=True):
|
||||
source = r"""\
|
||||
#include <hdf5.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define FILTER_BLOSC 32001 /* Blosc filter ID registered with the HDF group */
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
herr_t herr;
|
||||
hid_t file = H5Fcreate("file.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
||||
assert(file >= 0);
|
||||
hsize_t dims[3] = {10, 10, 10};
|
||||
hid_t space = H5Screate_simple(3, dims, NULL);
|
||||
assert(space >= 0);
|
||||
hid_t create_proplist = H5Pcreate(H5P_DATASET_CREATE);
|
||||
assert(create_proplist >= 0);
|
||||
herr = H5Pset_chunk(create_proplist, 3, dims);
|
||||
assert(herr >= 0);
|
||||
herr = H5Pset_filter(create_proplist, FILTER_BLOSC, H5Z_FLAG_OPTIONAL, 0,
|
||||
NULL);
|
||||
assert(herr >= 0);
|
||||
htri_t all_filters_avail = H5Pall_filters_avail(create_proplist);
|
||||
assert(all_filters_avail > 0);
|
||||
hid_t dataset = H5Dcreate(file, "dataset", H5T_NATIVE_DOUBLE, space,
|
||||
H5P_DEFAULT, create_proplist, H5P_DEFAULT);
|
||||
assert(dataset >= 0);
|
||||
double data[10][10][10];
|
||||
for (int k=0; k<10; ++k) {
|
||||
for (int j=0; j<10; ++j) {
|
||||
for (int i=0; i<10; ++i) {
|
||||
data[k][j][i] = 1.0 / (1.0 + i + j + k);
|
||||
}
|
||||
}
|
||||
}
|
||||
herr = H5Dwrite(dataset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT,
|
||||
&data[0][0][0]);
|
||||
assert(herr >= 0);
|
||||
herr = H5Pclose(create_proplist);
|
||||
assert(herr >= 0);
|
||||
herr = H5Dclose(dataset);
|
||||
assert(herr >= 0);
|
||||
herr = H5Sclose(space);
|
||||
assert(herr >= 0);
|
||||
herr = H5Fclose(file);
|
||||
assert(herr >= 0);
|
||||
printf("Done.\n");
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
expected = """\
|
||||
Done.
|
||||
"""
|
||||
with open("check.c", "w") as f:
|
||||
f.write(source)
|
||||
if "+mpi" in spec["hdf5"]:
|
||||
cc = which("mpicc")
|
||||
else:
|
||||
cc = which("cc")
|
||||
# TODO: Automate these path and library settings
|
||||
cc("-c", "-I%s" % spec["hdf5"].prefix.include, "check.c")
|
||||
cc("-o", "check", "check.o",
|
||||
"-L%s" % spec["hdf5"].prefix.lib, "-lhdf5")
|
||||
try:
|
||||
check = Executable("./check")
|
||||
output = check(return_output=True)
|
||||
except:
|
||||
output = ""
|
||||
success = output == expected
|
||||
if not success:
|
||||
print "Produced output does not match expected output."
|
||||
print "Expected output:"
|
||||
print "-"*80
|
||||
print expected
|
||||
print "-"*80
|
||||
print "Produced output:"
|
||||
print "-"*80
|
||||
print output
|
||||
print "-"*80
|
||||
print "Environment:"
|
||||
env = which("env")
|
||||
env()
|
||||
raise RuntimeError("HDF5 Blosc plugin check failed")
|
||||
shutil.rmtree(checkdir)
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
spack_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib)
|
||||
run_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib)
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
|
||||
spack_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib)
|
||||
run_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib)
|
@@ -38,6 +38,7 @@ class Hdf5(Package):
|
||||
list_url = "http://www.hdfgroup.org/ftp/HDF5/releases"
|
||||
list_depth = 3
|
||||
|
||||
version('1.10.0-patch1', '9180ff0ef8dc2ef3f61bd37a7404f295')
|
||||
version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199')
|
||||
version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618', preferred=True)
|
||||
version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24')
|
||||
|
119
var/spack/repos/builtin/packages/hpl/package.py
Normal file
119
var/spack/repos/builtin/packages/hpl/package.py
Normal file
@@ -0,0 +1,119 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
import platform
|
||||
|
||||
|
||||
class Hpl(Package):
|
||||
"""HPL is a software package that solves a (random) dense linear system
|
||||
in double precision (64 bits) arithmetic on distributed-memory computers.
|
||||
It can thus be regarded as a portable as well as freely available
|
||||
implementation of the High Performance Computing Linpack Benchmark."""
|
||||
|
||||
homepage = "http://www.netlib.org/benchmark/hpl/"
|
||||
url = "http://www.netlib.org/benchmark/hpl/hpl-2.2.tar.gz"
|
||||
|
||||
version('2.2', '0eb19e787c3dc8f4058db22c9e0c5320')
|
||||
|
||||
variant('openmp', default=False, description='Enable OpenMP support')
|
||||
|
||||
depends_on('mpi@1.1:')
|
||||
depends_on('blas')
|
||||
|
||||
parallel = False
|
||||
|
||||
def configure(self, spec, arch):
|
||||
# List of configuration options
|
||||
# Order is important
|
||||
config = []
|
||||
|
||||
# OpenMP support
|
||||
if '+openmp' in spec:
|
||||
config.append(
|
||||
'OMP_DEFS = {0}'.format(self.compiler.openmp_flag)
|
||||
)
|
||||
|
||||
config.extend([
|
||||
# Shell
|
||||
'SHELL = /bin/sh',
|
||||
'CD = cd',
|
||||
'CP = cp',
|
||||
'LN_S = ln -fs',
|
||||
'MKDIR = mkdir -p',
|
||||
'RM = /bin/rm -f',
|
||||
'TOUCH = touch',
|
||||
# Platform identifier
|
||||
'ARCH = {0}'.format(arch),
|
||||
# HPL Directory Structure / HPL library
|
||||
'TOPdir = {0}'.format(os.getcwd()),
|
||||
'INCdir = $(TOPdir)/include',
|
||||
'BINdir = $(TOPdir)/bin/$(ARCH)',
|
||||
'LIBdir = $(TOPdir)/lib/$(ARCH)',
|
||||
'HPLlib = $(LIBdir)/libhpl.a',
|
||||
# Message Passing library (MPI)
|
||||
'MPinc = -I{0}'.format(spec['mpi'].prefix.include),
|
||||
'MPlib = -L{0}'.format(spec['mpi'].prefix.lib),
|
||||
# Linear Algebra library (BLAS or VSIPL)
|
||||
'LAinc = {0}'.format(spec['blas'].prefix.include),
|
||||
'LAlib = {0}'.format(spec['blas'].blas_shared_lib),
|
||||
# F77 / C interface
|
||||
'F2CDEFS = -DAdd_ -DF77_INTEGER=int -DStringSunStyle',
|
||||
# HPL includes / libraries / specifics
|
||||
'HPL_INCLUDES = -I$(INCdir) -I$(INCdir)/$(ARCH) ' +
|
||||
'-I$(LAinc) -I$(MPinc)',
|
||||
'HPL_LIBS = $(HPLlib) $(LAlib) $(MPlib)',
|
||||
'HPL_OPTS = -DHPL_DETAILED_TIMING -DHPL_PROGRESS_REPORT',
|
||||
'HPL_DEFS = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES)',
|
||||
# Compilers / linkers - Optimization flags
|
||||
'CC = {0}'.format(spec['mpi'].mpicc),
|
||||
'CCNOOPT = $(HPL_DEFS)',
|
||||
'CCFLAGS = $(HPL_DEFS) -O3',
|
||||
'LINKER = $(CC)',
|
||||
'LINKFLAGS = $(CCFLAGS) $(OMP_DEFS)',
|
||||
'ARCHIVER = ar',
|
||||
'ARFLAGS = r',
|
||||
'RANLIB = echo'
|
||||
])
|
||||
|
||||
# Write configuration options to include file
|
||||
with open('Make.{0}'.format(arch), 'w') as makefile:
|
||||
for var in config:
|
||||
makefile.write('{0}\n'.format(var))
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Arch used for file naming purposes only
|
||||
arch = '{0}-{1}'.format(platform.system(), platform.processor())
|
||||
|
||||
# Generate Makefile include
|
||||
self.configure(spec, arch)
|
||||
|
||||
make('arch={0}'.format(arch))
|
||||
|
||||
# Manual installation
|
||||
install_tree(join_path('bin', arch), prefix.bin)
|
||||
install_tree(join_path('lib', arch), prefix.lib)
|
||||
install_tree(join_path('include', arch), prefix.include)
|
||||
install_tree('man', prefix.man)
|
@@ -0,0 +1,144 @@
|
||||
from spack import *
|
||||
import os
|
||||
import re
|
||||
|
||||
from spack.pkg.builtin.intel import IntelInstaller, filter_pick, \
|
||||
get_all_components
|
||||
|
||||
|
||||
class IntelParallelStudio(IntelInstaller):
|
||||
"""Intel Parallel Studio.
|
||||
|
||||
Note: You will have to add the download file to a
|
||||
mirror so that Spack can find it. For instructions on how to set up a
|
||||
mirror, see http://software.llnl.gov/spack/mirrors.html"""
|
||||
|
||||
homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe"
|
||||
|
||||
# TODO: can also try the online installer (will download files on demand)
|
||||
version('composer.2016.2', '1133fb831312eb519f7da897fec223fa',
|
||||
url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" # NOQA: ignore=E501
|
||||
% os.getcwd())
|
||||
version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832',
|
||||
url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) # NOQA: ignore=E501
|
||||
version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832',
|
||||
url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) # NOQA: ignore=E501
|
||||
version('composer.2016.3', '3208eeabee951fc27579177b593cefe9',
|
||||
url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" # NOQA: ignore=E501
|
||||
% os.getcwd())
|
||||
version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3',
|
||||
url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) # NOQA: ignore=E501
|
||||
version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3',
|
||||
url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) # NOQA: ignore=E501
|
||||
|
||||
variant('rpath', default=True, description="Add rpath to .cfg files")
|
||||
variant('newdtags', default=False,
|
||||
description="Allow use of --enable-new-dtags in MPI wrappers")
|
||||
variant('all', default=False,
|
||||
description="Install all files with the requested edition")
|
||||
variant('mpi', default=True,
|
||||
description="Install the Intel MPI library and ITAC tool")
|
||||
variant('mkl', default=True, description="Install the Intel MKL library")
|
||||
variant('daal',
|
||||
default=True, description="Install the Intel DAAL libraries")
|
||||
variant('ipp', default=True, description="Install the Intel IPP libraries")
|
||||
variant('tools', default=True, description="""Install the Intel Advisor,\
|
||||
VTune Amplifier, and Inspector tools""")
|
||||
|
||||
provides('mpi', when='@cluster:+mpi')
|
||||
provides('mkl', when='+mkl')
|
||||
provides('daal', when='+daal')
|
||||
provides('ipp', when='+ipp')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
base_components = "ALL" # when in doubt, install everything
|
||||
mpi_components = ""
|
||||
mkl_components = ""
|
||||
daal_components = ""
|
||||
ipp_components = ""
|
||||
|
||||
if spec.satisfies('+all'):
|
||||
base_components = "ALL"
|
||||
else:
|
||||
all_components = get_all_components()
|
||||
regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)'
|
||||
base_components = \
|
||||
filter_pick(all_components, re.compile(regex).search)
|
||||
regex = '(icsxe|imb|mpi|itac|intel-tc|clck)'
|
||||
mpi_components = \
|
||||
filter_pick(all_components, re.compile(regex).search)
|
||||
mkl_components = \
|
||||
filter_pick(all_components, re.compile('(mkl)').search)
|
||||
daal_components = \
|
||||
filter_pick(all_components, re.compile('(daal)').search)
|
||||
ipp_components = \
|
||||
filter_pick(all_components, re.compile('(ipp)').search)
|
||||
regex = '(gdb|vtune|inspector|advisor)'
|
||||
tool_components = \
|
||||
filter_pick(all_components, re.compile(regex).search)
|
||||
|
||||
components = base_components
|
||||
if not spec.satisfies('+all'):
|
||||
if spec.satisfies('+mpi') and 'cluster' in str(spec.version):
|
||||
components += mpi_components
|
||||
if spec.satisfies('+mkl'):
|
||||
components += mkl_components
|
||||
if spec.satisfies('+daal'):
|
||||
components += daal_components
|
||||
if spec.satisfies('+ipp'):
|
||||
components += ipp_components
|
||||
if spec.satisfies('+tools') and (spec.satisfies('@cluster') or
|
||||
spec.satisfies('@professional')):
|
||||
components += tool_components
|
||||
|
||||
self.intel_components = ';'.join(components)
|
||||
IntelInstaller.install(self, spec, prefix)
|
||||
|
||||
absbindir = os.path.dirname(os.path.realpath(os.path.join(
|
||||
self.prefix.bin, "icc")))
|
||||
abslibdir = os.path.dirname(os.path.realpath(os.path.join
|
||||
(self.prefix.lib, "intel64", "libimf.a")))
|
||||
|
||||
os.symlink(self.global_license_file, os.path.join(absbindir,
|
||||
"license.lic"))
|
||||
if spec.satisfies('+tools') and (spec.satisfies('@cluster') or
|
||||
spec.satisfies('@professional')):
|
||||
os.mkdir(os.path.join(self.prefix, "inspector_xe/licenses"))
|
||||
os.symlink(self.global_license_file, os.path.join(
|
||||
self.prefix, "inspector_xe/licenses", "license.lic"))
|
||||
os.mkdir(os.path.join(self.prefix, "advisor_xe/licenses"))
|
||||
os.symlink(self.global_license_file, os.path.join(
|
||||
self.prefix, "advisor_xe/licenses", "license.lic"))
|
||||
os.mkdir(os.path.join(self.prefix, "vtune_amplifier_xe/licenses"))
|
||||
os.symlink(self.global_license_file, os.path.join(
|
||||
self.prefix, "vtune_amplifier_xe/licenses", "license.lic"))
|
||||
|
||||
if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \
|
||||
spec.satisfies('@cluster'):
|
||||
os.symlink(self.global_license_file, os.path.join(
|
||||
self.prefix, "itac_latest", "license.lic"))
|
||||
if spec.satisfies('~newdtags'):
|
||||
wrappers = ["mpif77", "mpif77", "mpif90", "mpif90",
|
||||
"mpigcc", "mpigcc", "mpigxx", "mpigxx",
|
||||
"mpiicc", "mpiicc", "mpiicpc", "mpiicpc",
|
||||
"mpiifort", "mpiifort"]
|
||||
wrapper_paths = []
|
||||
for root, dirs, files in os.walk(spec.prefix):
|
||||
for name in files:
|
||||
if name in wrappers:
|
||||
wrapper_paths.append(os.path.join(spec.prefix,
|
||||
root, name))
|
||||
for wrapper in wrapper_paths:
|
||||
filter_file(r'-Xlinker --enable-new-dtags', r' ',
|
||||
wrapper)
|
||||
|
||||
if spec.satisfies('+rpath'):
|
||||
for compiler_command in ["icc", "icpc", "ifort"]:
|
||||
cfgfilename = os.path.join(absbindir, "%s.cfg" %
|
||||
compiler_command)
|
||||
with open(cfgfilename, "w") as f:
|
||||
f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir)
|
||||
|
||||
os.symlink(os.path.join(self.prefix.man, "common", "man1"),
|
||||
os.path.join(self.prefix.man, "man1"))
|
125
var/spack/repos/builtin/packages/intel/package.py
Normal file
125
var/spack/repos/builtin/packages/intel/package.py
Normal file
@@ -0,0 +1,125 @@
|
||||
from spack import *
|
||||
import os
|
||||
import re
|
||||
|
||||
|
||||
def filter_pick(input_list, regex_filter):
|
||||
"""Returns the items in input_list that are found in the regex_filter"""
|
||||
return [l for l in input_list for m in (regex_filter(l),) if m]
|
||||
|
||||
|
||||
def unfilter_pick(input_list, regex_filter):
|
||||
"""Returns the items in input_list that are not found in the
|
||||
regex_filter"""
|
||||
return [l for l in input_list for m in (regex_filter(l),) if not m]
|
||||
|
||||
|
||||
def get_all_components():
|
||||
"""Returns a list of all the components associated with the downloaded
|
||||
Intel package"""
|
||||
all_components = []
|
||||
with open("pset/mediaconfig.xml", "r") as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
if line.find('<Abbr>') != -1:
|
||||
component = line[line.find('<Abbr>') + 6:line.find('</Abbr>')]
|
||||
all_components.append(component)
|
||||
return all_components
|
||||
|
||||
|
||||
class IntelInstaller(Package):
|
||||
"""Base package containing common methods for installing Intel software"""
|
||||
|
||||
homepage = "https://software.intel.com/en-us"
|
||||
intel_components = "ALL"
|
||||
license_required = True
|
||||
license_comment = '#'
|
||||
license_files = ['Licenses/license.lic']
|
||||
license_vars = ['INTEL_LICENSE_FILE']
|
||||
license_url = \
|
||||
'https://software.intel.com/en-us/articles/intel-license-manager-faq'
|
||||
|
||||
@property
|
||||
def global_license_file(self):
|
||||
"""Returns the path where a global license file should be stored."""
|
||||
if not self.license_files:
|
||||
return
|
||||
return join_path(self.global_license_dir, "intel",
|
||||
os.path.basename(self.license_files[0]))
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
# Remove the installation DB, otherwise it will try to install into
|
||||
# location of other Intel builds
|
||||
if os.path.exists(os.path.join(os.environ["HOME"], "intel",
|
||||
"intel_sdp_products.db")):
|
||||
os.remove(os.path.join(os.environ["HOME"], "intel",
|
||||
"intel_sdp_products.db"))
|
||||
|
||||
if not hasattr(self, "intel_prefix"):
|
||||
self.intel_prefix = self.prefix
|
||||
|
||||
silent_config_filename = 'silent.cfg'
|
||||
with open(silent_config_filename, 'w') as f:
|
||||
f.write("""
|
||||
ACCEPT_EULA=accept
|
||||
PSET_MODE=install
|
||||
CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes
|
||||
PSET_INSTALL_DIR=%s
|
||||
ACTIVATION_LICENSE_FILE=%s
|
||||
ACTIVATION_TYPE=license_file
|
||||
PHONEHOME_SEND_USAGE_DATA=no
|
||||
CONTINUE_WITH_OPTIONAL_ERROR=yes
|
||||
COMPONENTS=%s
|
||||
""" % (self.intel_prefix, self.global_license_file, self.intel_components))
|
||||
|
||||
install_script = which("install.sh")
|
||||
install_script('--silent', silent_config_filename)
|
||||
|
||||
|
||||
class Intel(IntelInstaller):
|
||||
"""Intel Compilers.
|
||||
|
||||
Note: You will have to add the download file to a
|
||||
mirror so that Spack can find it. For instructions on how to set up a
|
||||
mirror, see http://software.llnl.gov/spack/mirrors.html"""
|
||||
|
||||
homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe"
|
||||
|
||||
# TODO: can also try the online installer (will download files on demand)
|
||||
version('16.0.2', '1133fb831312eb519f7da897fec223fa',
|
||||
url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" # NOQA: ignore=E501
|
||||
% os.getcwd())
|
||||
version('16.0.3', '3208eeabee951fc27579177b593cefe9',
|
||||
url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" # NOQA: ignore=E501
|
||||
% os.getcwd())
|
||||
|
||||
variant('rpath', default=True, description="Add rpath to .cfg files")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
components = []
|
||||
all_components = get_all_components()
|
||||
regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)'
|
||||
components = filter_pick(all_components, re.compile(regex).search)
|
||||
|
||||
self.intel_components = ';'.join(components)
|
||||
IntelInstaller.install(self, spec, prefix)
|
||||
|
||||
absbindir = os.path.split(os.path.realpath(os.path.join(
|
||||
self.prefix.bin, "icc")))[0]
|
||||
abslibdir = os.path.split(os.path.realpath(os.path.join(
|
||||
self.prefix.lib, "intel64", "libimf.a")))[0]
|
||||
|
||||
# symlink or copy?
|
||||
os.symlink(self.global_license_file, os.path.join(absbindir,
|
||||
"license.lic"))
|
||||
|
||||
if spec.satisfies('+rpath'):
|
||||
for compiler_command in ["icc", "icpc", "ifort"]:
|
||||
cfgfilename = os.path.join(absbindir, "%s.cfg" %
|
||||
compiler_command)
|
||||
with open(cfgfilename, "w") as f:
|
||||
f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir)
|
||||
|
||||
os.symlink(os.path.join(self.prefix.man, "common", "man1"),
|
||||
os.path.join(self.prefix.man, "man1"))
|
26
var/spack/repos/builtin/packages/ipp/package.py
Normal file
26
var/spack/repos/builtin/packages/ipp/package.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
from spack.pkg.builtin.intel import IntelInstaller
|
||||
|
||||
|
||||
class Ipp(IntelInstaller):
|
||||
"""Intel Integrated Performance Primitives.
|
||||
|
||||
Note: You will have to add the download file to a
|
||||
mirror so that Spack can find it. For instructions on how to set up a
|
||||
mirror, see http://software.llnl.gov/spack/mirrors.html"""
|
||||
|
||||
homepage = "https://software.intel.com/en-us/intel-ipp"
|
||||
|
||||
version('9.0.3.210', '0e1520dd3de7f811a6ef6ebc7aa429a3',
|
||||
url="file://%s/l_ipp_9.0.3.210.tgz" % os.getcwd())
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
self.intel_prefix = os.path.join(prefix, "pkg")
|
||||
IntelInstaller.install(self, spec, prefix)
|
||||
|
||||
ipp_dir = os.path.join(self.intel_prefix, "ipp")
|
||||
for f in os.listdir(ipp_dir):
|
||||
os.symlink(os.path.join(ipp_dir, f), os.path.join(self.prefix, f))
|
43
var/spack/repos/builtin/packages/libaio/package.py
Normal file
43
var/spack/repos/builtin/packages/libaio/package.py
Normal file
@@ -0,0 +1,43 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Libaio(Package):
|
||||
"""This is the linux native Asynchronous I/O interface library."""
|
||||
|
||||
homepage = "https://git.fedorahosted.org/cgit/libaio.git"
|
||||
url = "https://git.fedorahosted.org/cgit/libaio.git/snapshot/libaio-0.3.110-1.tar.gz"
|
||||
|
||||
version('0.3.110-1', 'eb6b1b435afadb5b80c5dd80984249f6')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# libaio is not supported on OS X
|
||||
if spec.satisfies('arch=darwin-x86_64'):
|
||||
# create a dummy directory
|
||||
mkdir(prefix.lib)
|
||||
return
|
||||
|
||||
make('prefix={0}'.format(prefix), 'install')
|
@@ -23,11 +23,11 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
# Only build certain parts of dwarf because the other ones break.
|
||||
dwarf_dirs = ['libdwarf', 'dwarfdump2']
|
||||
|
||||
|
||||
class Libdwarf(Package):
|
||||
"""The DWARF Debugging Information Format is of interest to
|
||||
programmers working on compilers and debuggers (and any one
|
||||
@@ -45,12 +45,13 @@ class Libdwarf(Package):
|
||||
list_url = homepage
|
||||
|
||||
version('20160507', 'ae32d6f9ece5daf05e2d4b14822ea811')
|
||||
|
||||
version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d')
|
||||
version('20130207', '64b42692e947d5180e162e46c689dfbf')
|
||||
version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db')
|
||||
depends_on("libelf")
|
||||
|
||||
parallel = False
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# dwarf build does not set arguments for ar properly
|
||||
make.add_default_arg('ARFLAGS=rcs')
|
||||
@@ -67,7 +68,11 @@ def install(self, spec, prefix):
|
||||
install('libdwarf.h', prefix.include)
|
||||
install('dwarf.h', prefix.include)
|
||||
|
||||
with working_dir('dwarfdump'):
|
||||
if spec.satisfies('@20130126:20130729'):
|
||||
dwarfdump_dir = 'dwarfdump2'
|
||||
else:
|
||||
dwarfdump_dir = 'dwarfdump'
|
||||
with working_dir(dwarfdump_dir):
|
||||
configure("--prefix=" + prefix)
|
||||
|
||||
# This makefile has strings of copy commands that
|
||||
|
@@ -37,7 +37,7 @@ class Libpciaccess(Package):
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# libpciaccess does not support OS X
|
||||
if spec.satisfies('arch=darwin-x86_64'):
|
||||
if spec.satisfies('platform=darwin'):
|
||||
# create a dummy directory
|
||||
mkdir(prefix.lib)
|
||||
return
|
||||
|
39
var/spack/repos/builtin/packages/libpthread-stubs/package.py
Normal file
39
var/spack/repos/builtin/packages/libpthread-stubs/package.py
Normal file
@@ -0,0 +1,39 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
class LibpthreadStubs(Package):
|
||||
"""The libpthread-stubs package provides weak aliases for pthread
|
||||
functions not provided in libc or otherwise available by
|
||||
default. """
|
||||
homepage = "http://xcb.freedesktop.org/"
|
||||
url = "http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.bz2"
|
||||
|
||||
version('0.3', 'e8fa31b42e13f87e8f5a7a2b731db7ee')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure('--prefix=%s' % prefix)
|
||||
make()
|
||||
make("install")
|
44
var/spack/repos/builtin/packages/libxau/package.py
Normal file
44
var/spack/repos/builtin/packages/libxau/package.py
Normal file
@@ -0,0 +1,44 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
class Libxau(Package):
|
||||
"""The libXau package contains a library implementing the X11
|
||||
Authorization Protocol. This is useful for restricting client
|
||||
access to the display."""
|
||||
homepage = "http://xcb.freedesktop.org/"
|
||||
url = "http://ftp.x.org/pub/individual/lib/libXau-1.0.8.tar.bz2"
|
||||
|
||||
version('1.0.8', '685f8abbffa6d145c0f930f00703b21b')
|
||||
|
||||
depends_on('xproto')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# FIXME: Modify the configure line to suit your build system here.
|
||||
configure('--prefix=%s' % prefix)
|
||||
|
||||
# FIXME: Add logic to build and install here
|
||||
make()
|
||||
make("install")
|
@@ -35,18 +35,19 @@ class Libxcb(Package):
|
||||
|
||||
version('1.11', '1698dd837d7e6e94d029dbe8b3a82deb')
|
||||
version('1.11.1', '118623c15a96b08622603a71d8789bf3')
|
||||
|
||||
depends_on("python")
|
||||
depends_on("xcb-proto")
|
||||
depends_on("pkg-config")
|
||||
|
||||
# depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev
|
||||
# depends_on('xau') # Ubuntu: apt-get install libxau-dev
|
||||
depends_on("libpthread-stubs")
|
||||
depends_on('libxau')
|
||||
|
||||
def patch(self):
|
||||
filter_file('typedef struct xcb_auth_info_t {', 'typedef struct {', 'src/xcb.h')
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
env['PKG_CONFIG_PATH'] = env['PKG_CONFIG_PATH'] + ':/usr/lib64/pkgconfig'
|
||||
configure("--prefix=%s" % prefix)
|
||||
|
||||
make()
|
||||
|
@@ -267,16 +267,16 @@ def install(self, spec, prefix):
|
||||
|
||||
if '+all_targets' not in spec: # all is default on cmake
|
||||
targets = ['CppBackend', 'NVPTX', 'AMDGPU']
|
||||
if 'x86' in spec.architecture.lower():
|
||||
if 'x86' in spec.architecture.target.lower():
|
||||
targets.append('X86')
|
||||
elif 'arm' in spec.architecture.lower():
|
||||
elif 'arm' in spec.architecture.target.lower():
|
||||
targets.append('ARM')
|
||||
elif 'aarch64' in spec.architecture.lower():
|
||||
elif 'aarch64' in spec.architecture.target.lower():
|
||||
targets.append('AArch64')
|
||||
elif 'sparc' in spec.architecture.lower():
|
||||
elif 'sparc' in spec.architecture.target.lower():
|
||||
targets.append('sparc')
|
||||
elif ('ppc' in spec.architecture.lower() or
|
||||
'power' in spec.architecture.lower()):
|
||||
elif ('ppc' in spec.architecture.target.lower() or
|
||||
'power' in spec.architecture.target.lower()):
|
||||
targets.append('PowerPC')
|
||||
|
||||
cmake_args.append('-DLLVM_TARGETS_TO_BUILD:Bool=' + ';'.join(targets))
|
||||
|
@@ -23,7 +23,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Lmod(Package):
|
||||
"""
|
||||
@@ -34,17 +34,25 @@ class Lmod(Package):
|
||||
variable. Modulefiles for Library packages provide environment variables
|
||||
that specify where the library and header files can be found.
|
||||
"""
|
||||
homepage = "https://www.tacc.utexas.edu/research-development/tacc-projects/lmod"
|
||||
url = "http://sourceforge.net/projects/lmod/files/Lmod-6.0.1.tar.bz2/download"
|
||||
homepage = 'https://www.tacc.utexas.edu/research-development/tacc-projects/lmod' # NOQA: ignore=E501
|
||||
url = 'https://github.com/TACC/Lmod/archive/6.4.1.tar.gz'
|
||||
|
||||
version('6.4.1', '7978ba777c8aa41a4d8c05fec5f780f4')
|
||||
version('6.3.7', '0fa4d5a24c41cae03776f781aa2dedc1')
|
||||
version('6.0.1', '91abf52fe5033bd419ffe2842ebe7af9')
|
||||
|
||||
depends_on("lua@5.2:")
|
||||
depends_on('lua@5.2:')
|
||||
depends_on('lua-luaposix')
|
||||
depends_on('lua-luafilesystem')
|
||||
|
||||
parallel = False
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
stage_lua_path = join_path(
|
||||
self.stage.path, 'Lmod-{version}', 'src', '?.lua')
|
||||
spack_env.append_path('LUA_PATH', stage_lua_path.format(
|
||||
version=self.version), separator=';')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Add our lua to PATH
|
||||
os.environ['PATH'] = spec['lua'].prefix.bin + ';' + os.environ['PATH']
|
||||
|
||||
configure('--prefix=%s' % prefix)
|
||||
make()
|
||||
make("install")
|
||||
make('install')
|
||||
|
@@ -0,0 +1,51 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class LuaLuafilesystem(Package):
|
||||
"""
|
||||
LuaFileSystem is a Lua library developed to complement the set of
|
||||
functions related to file systems offered by the standard Lua distribution.
|
||||
|
||||
LuaFileSystem offers a portable way to access the underlying directory
|
||||
structure and file attributes.
|
||||
|
||||
LuaFileSystem is free software and uses the same license as Lua 5.1
|
||||
"""
|
||||
homepage = 'http://keplerproject.github.io/luafilesystem'
|
||||
url = 'https://github.com/keplerproject/luafilesystem/archive/v_1_6_3.tar.gz'
|
||||
|
||||
version('1_6_3', 'd0552c7e5a082f5bb2865af63fb9dc95')
|
||||
|
||||
extends('lua')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
rockspec_fmt = join_path(self.stage.path,
|
||||
'luafilesystem-v_{version.underscored}',
|
||||
'rockspecs',
|
||||
'luafilesystem-{version.dotted}-1.rockspec')
|
||||
luarocks('--tree=' + prefix, 'install',
|
||||
rockspec_fmt.format(version=self.spec.version))
|
@@ -57,7 +57,7 @@ class Lua(Package):
|
||||
placement='luarocks')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
if spec.satisfies("arch=darwin-i686") or spec.satisfies("arch=darwin-x86_64"):
|
||||
if spec.satisfies("platform=darwin"):
|
||||
target = 'macosx'
|
||||
else:
|
||||
target = 'linux'
|
||||
@@ -105,6 +105,9 @@ def setup_dependent_environment(self, spack_env, run_env, extension_spec):
|
||||
spack_env.set('LUA_PATH', ';'.join(lua_patterns), separator=';')
|
||||
spack_env.set('LUA_CPATH', ';'.join(lua_cpatterns), separator=';')
|
||||
|
||||
# Add LUA to PATH for dependent packages
|
||||
spack_env.prepend_path('PATH', self.prefix.bin)
|
||||
|
||||
# For run time environment set only the path for extension_spec and
|
||||
# prepend it to LUAPATH
|
||||
if extension_spec.package.extends(self.spec):
|
||||
@@ -153,5 +156,5 @@ def setup_dependent_package(self, module, ext_spec):
|
||||
"""
|
||||
# Lua extension builds can have lua and luarocks executable functions
|
||||
module.lua = Executable(join_path(self.spec.prefix.bin, 'lua'))
|
||||
module.luarocks = Executable(join_path(self.spec.prefix.bin,
|
||||
'luarocks'))
|
||||
module.luarocks = Executable(
|
||||
join_path(self.spec.prefix.bin, 'luarocks'))
|
||||
|
59
var/spack/repos/builtin/packages/mariadb/package.py
Normal file
59
var/spack/repos/builtin/packages/mariadb/package.py
Normal file
@@ -0,0 +1,59 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Mariadb(Package):
|
||||
"""MariaDB turns data into structured information in a wide array of
|
||||
applications, ranging from banking to websites. It is an enhanced, drop-in
|
||||
replacement for MySQL. MariaDB is used because it is fast, scalable and
|
||||
robust, with a rich ecosystem of storage engines, plugins and many other
|
||||
tools make it very versatile for a wide variety of use cases."""
|
||||
|
||||
homepage = "https://mariadb.org/about/"
|
||||
url = "https://downloads.mariadb.org/f/mariadb-10.1.14/source/mariadb-10.1.14.tar.gz"
|
||||
|
||||
version('10.1.14', '294925531e0fd2f0461e3894496a5adc')
|
||||
version('5.5.49', '67b5a499a5f158b2a586e6e3bfb4f304')
|
||||
|
||||
variant('nonblocking', default=True, description='Allow non blocking '
|
||||
'operations in the mariadb client library.')
|
||||
|
||||
depends_on('boost')
|
||||
depends_on('cmake')
|
||||
depends_on('jemalloc')
|
||||
depends_on('libaio')
|
||||
depends_on('libedit')
|
||||
depends_on('libevent', when='+nonblocking')
|
||||
depends_on('ncurses')
|
||||
depends_on('zlib')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir('spack-build', create=True):
|
||||
|
||||
cmake('..', *std_cmake_args)
|
||||
|
||||
make()
|
||||
make('install')
|
28
var/spack/repos/builtin/packages/mkl/package.py
Normal file
28
var/spack/repos/builtin/packages/mkl/package.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
from spack.pkg.builtin.intel import IntelInstaller
|
||||
|
||||
|
||||
class Mkl(IntelInstaller):
|
||||
"""Intel Math Kernel Library.
|
||||
|
||||
Note: You will have to add the download file to a
|
||||
mirror so that Spack can find it. For instructions on how to set up a
|
||||
mirror, see http://software.llnl.gov/spack/mirrors.html"""
|
||||
|
||||
homepage = "https://software.intel.com/en-us/intel-mkl"
|
||||
|
||||
version('11.3.2.181', '536dbd82896d6facc16de8f961d17d65',
|
||||
url="file://%s/l_mkl_11.3.2.181.tgz" % os.getcwd())
|
||||
version('11.3.3.210', 'f72546df27f5ebb0941b5d21fd804e34',
|
||||
url="file://%s/l_mkl_11.3.3.210.tgz" % os.getcwd())
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
self.intel_prefix = os.path.join(prefix, "pkg")
|
||||
IntelInstaller.install(self, spec, prefix)
|
||||
|
||||
mkl_dir = os.path.join(self.intel_prefix, "mkl")
|
||||
for f in os.listdir(mkl_dir):
|
||||
os.symlink(os.path.join(mkl_dir, f), os.path.join(self.prefix, f))
|
@@ -23,15 +23,14 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Mpich(Package):
|
||||
"""MPICH is a high performance and widely portable implementation of
|
||||
the Message Passing Interface (MPI) standard."""
|
||||
homepage = "http://www.mpich.org"
|
||||
url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
|
||||
list_url = "http://www.mpich.org/static/downloads/"
|
||||
url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
|
||||
list_url = "http://www.mpich.org/static/downloads/"
|
||||
list_depth = 2
|
||||
|
||||
version('3.2', 'f414cfa77099cd1fa1a5ae4e22db508a')
|
||||
@@ -42,7 +41,8 @@ class Mpich(Package):
|
||||
version('3.1', '5643dd176499bfb7d25079aaff25f2ec')
|
||||
version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0')
|
||||
|
||||
variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
|
||||
variant('verbs', default=False,
|
||||
description='Build support for OpenFabrics verbs.')
|
||||
variant('pmi', default=True, description='Build with PMI support')
|
||||
variant('hydra', default=True, description='Build the hydra process manager')
|
||||
|
||||
@@ -57,9 +57,9 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
|
||||
spack_env.set('MPICH_FC', spack_fc)
|
||||
|
||||
def setup_dependent_package(self, module, dep_spec):
|
||||
self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
|
||||
self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
|
||||
self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')
|
||||
self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
|
||||
self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
|
||||
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
@@ -92,7 +92,6 @@ def install(self, spec, prefix):
|
||||
|
||||
self.filter_compilers()
|
||||
|
||||
|
||||
def filter_compilers(self):
|
||||
"""Run after install to make the MPI compilers use the
|
||||
compilers that Spack built the package with.
|
||||
@@ -102,18 +101,20 @@ def filter_compilers(self):
|
||||
be bound to whatever compiler they were built with.
|
||||
"""
|
||||
bin = self.prefix.bin
|
||||
mpicc = os.path.join(bin, 'mpicc')
|
||||
mpicxx = os.path.join(bin, 'mpicxx')
|
||||
mpif77 = os.path.join(bin, 'mpif77')
|
||||
mpif90 = os.path.join(bin, 'mpif90')
|
||||
mpicc = join_path(bin, 'mpicc')
|
||||
mpicxx = join_path(bin, 'mpicxx')
|
||||
mpif77 = join_path(bin, 'mpif77')
|
||||
mpif90 = join_path(bin, 'mpif90')
|
||||
|
||||
spack_cc = os.environ['CC']
|
||||
spack_cxx = os.environ['CXX']
|
||||
spack_f77 = os.environ['F77']
|
||||
spack_fc = os.environ['FC']
|
||||
# Substitute Spack compile wrappers for the real
|
||||
# underlying compiler
|
||||
kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
|
||||
filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
|
||||
filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
|
||||
filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
|
||||
filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
|
||||
|
||||
kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True }
|
||||
filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
|
||||
filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
|
||||
filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
|
||||
filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
|
||||
# Remove this linking flag if present
|
||||
# (it turns RPATH into RUNPATH)
|
||||
for wrapper in (mpicc, mpicxx, mpif77, mpif90):
|
||||
filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
|
||||
|
119
var/spack/repos/builtin/packages/mumps/mumps-shared.patch
Normal file
119
var/spack/repos/builtin/packages/mumps/mumps-shared.patch
Normal file
@@ -0,0 +1,119 @@
|
||||
diff -Naur MUMPS_5.0.1/libseq/Makefile MUMPS_5.0.1.new/libseq/Makefile
|
||||
--- MUMPS_5.0.1/libseq/Makefile 2015-07-23 19:08:32.000000000 +0200
|
||||
+++ MUMPS_5.0.1.new/libseq/Makefile 2016-06-07 10:41:16.585179151 +0200
|
||||
@@ -8,11 +8,15 @@
|
||||
|
||||
include ../Makefile.inc
|
||||
|
||||
-libmpiseq: libmpiseq$(PLAT)$(LIBEXT)
|
||||
+libmpiseq: libmpiseq$(PLAT)$(LIBEXT) libmpiseq$(PLAT)$(SHLIBEXT)
|
||||
|
||||
libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
|
||||
$(AR)$@ mpi.o mpic.o elapse.o
|
||||
$(RANLIB) $@
|
||||
+
|
||||
+libmpiseq$(PLAT)$(SHLIBEXT): mpi.o mpic.o elapse.o
|
||||
+ $(FC) $(LDFLAGS) $^ -o libmpiseq$(PLAT)$(SHLIBEXT)
|
||||
+
|
||||
.f.o:
|
||||
$(FC) $(OPTF) -c $*.f $(OUTF)$*.o
|
||||
.c.o:
|
||||
diff -Naur MUMPS_5.0.1/Makefile MUMPS_5.0.1.new/Makefile
|
||||
--- MUMPS_5.0.1/Makefile 2015-07-23 19:08:29.000000000 +0200
|
||||
+++ MUMPS_5.0.1.new/Makefile 2016-06-07 10:50:21.863281217 +0200
|
||||
@@ -51,7 +51,7 @@
|
||||
dexamples: d
|
||||
(cd examples ; $(MAKE) d)
|
||||
|
||||
-requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
|
||||
+requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT)$(SHLIBEXT)
|
||||
|
||||
# dummy MPI library (sequential version)
|
||||
|
||||
@@ -62,16 +62,25 @@
|
||||
$(libdir)/libpord$(PLAT)$(LIBEXT):
|
||||
if [ "$(LPORDDIR)" != "" ] ; then \
|
||||
cd $(LPORDDIR); \
|
||||
- $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT); \
|
||||
+ $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT) PLAT=$(PLAT) SHLIBEXT=$(SHLIBEXT); \
|
||||
fi;
|
||||
if [ "$(LPORDDIR)" != "" ] ; then \
|
||||
cp $(LPORDDIR)/libpord$(LIBEXT) $@; \
|
||||
fi;
|
||||
|
||||
+$(libdir)/libpord$(PLAT)$(SHLIBEXT):
|
||||
+ if [ "$(LPORDDIR)" != "" ] ; then \
|
||||
+ cd $(LPORDDIR); \
|
||||
+ $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT) PLAT=$(PLAT) SHLIBEXT=$(SHLIBEXT) libpord$(PLAT)$(SHLIBEXT); \
|
||||
+ fi;
|
||||
+ if [ "$(LPORDDIR)" != "" ] ; then \
|
||||
+ cp $(LPORDDIR)/libpord$(PLAT)$(SHLIBEXT) $@; \
|
||||
+ fi;
|
||||
+
|
||||
clean:
|
||||
(cd src; $(MAKE) clean)
|
||||
(cd examples; $(MAKE) clean)
|
||||
- (cd $(libdir); $(RM) *$(PLAT)$(LIBEXT))
|
||||
+ (cd $(libdir); $(RM) *$(PLAT)$(LIBEXT) *$(PLAT)$(SHLIBEXT))
|
||||
(cd libseq; $(MAKE) clean)
|
||||
if [ "$(LPORDDIR)" != "" ] ; then \
|
||||
cd $(LPORDDIR); $(MAKE) realclean; \
|
||||
diff -Naur MUMPS_5.0.1/PORD/lib/Makefile MUMPS_5.0.1.new/PORD/lib/Makefile
|
||||
--- MUMPS_5.0.1/PORD/lib/Makefile 2015-07-23 19:08:29.000000000 +0200
|
||||
+++ MUMPS_5.0.1.new/PORD/lib/Makefile 2016-06-07 10:49:48.889000958 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o \
|
||||
multisector.o gelim.o bucket.o tree.o \
|
||||
- symbfac.o interface.o sort.o minpriority.o
|
||||
+ symbfac.o interface.o sort.o minpriority.o
|
||||
|
||||
# Note: numfac.c read.c mapping.c triangular.c matrix.c kernel.c
|
||||
# were not direcly used by MUMPS and have been removed from the
|
||||
@@ -24,12 +24,15 @@
|
||||
.c.o:
|
||||
$(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
|
||||
|
||||
-libpord$(LIBEXT):$(OBJS)
|
||||
+libpord$(PLAT)$(LIBEXT):$(OBJS)
|
||||
$(AR)$@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
+libpord$(PLAT)$(SHLIBEXT): $(OBJS)
|
||||
+ $(CC) $(LDFLAGS) $(OBJS) -o libpord$(PLAT)$(SHLIBEXT)
|
||||
+
|
||||
clean:
|
||||
rm -f *.o
|
||||
|
||||
realclean:
|
||||
- rm -f *.o libpord.a
|
||||
+ rm -f *.o libpord$(PLAT)$(SHLIBEXT) libpord$(PLAT)$(LIBEXT)
|
||||
diff -Naur MUMPS_5.0.1/src/Makefile MUMPS_5.0.1.new/src/Makefile
|
||||
--- MUMPS_5.0.1/src/Makefile 2015-07-23 19:08:29.000000000 +0200
|
||||
+++ MUMPS_5.0.1.new/src/Makefile 2016-06-07 10:40:52.534703722 +0200
|
||||
@@ -24,7 +24,10 @@
|
||||
include $(topdir)/Makefile.inc
|
||||
|
||||
mumps_lib: $(libdir)/libmumps_common$(PLAT)$(LIBEXT) \
|
||||
- $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT)
|
||||
+ $(libdir)/libmumps_common$(PLAT)$(SHLIBEXT) \
|
||||
+ $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT) \
|
||||
+ $(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT)
|
||||
+
|
||||
|
||||
OBJS_COMMON_MOD = \
|
||||
ana_omp_m.o\
|
||||
@@ -162,6 +165,13 @@
|
||||
$(AR)$@ $?
|
||||
$(RANLIB) $@
|
||||
|
||||
+$(libdir)/libmumps_common$(PLAT)$(SHLIBEXT): $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
|
||||
+ $(FC) $(LDFLAGS) $^ -L$(libdir) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS) -o $(libdir)/libmumps_common$(PLAT)$(SHLIBEXT)
|
||||
+
|
||||
+
|
||||
+$(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT): $(OBJS_MOD) $(OBJS_OTHER)
|
||||
+ $(FC) $(LDFLAGS) $^ -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS) -o $(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT)
|
||||
+
|
||||
# Dependencies between modules:
|
||||
$(ARITH)mumps_load.o: $(ARITH)mumps_comm_buffer.o \
|
||||
$(ARITH)mumps_struc_def.o \
|
@@ -23,7 +23,10 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os, sys, glob
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
class Mumps(Package):
|
||||
"""MUMPS: a MUltifrontal Massively Parallel sparse direct Solver"""
|
||||
@@ -44,7 +47,6 @@ class Mumps(Package):
|
||||
variant('idx64', default=False, description='Use int64_t/integer*8 as default index type')
|
||||
variant('shared', default=True, description='Build shared libraries')
|
||||
|
||||
|
||||
depends_on('scotch + esmumps', when='~ptscotch+scotch')
|
||||
depends_on('scotch + esmumps + mpi', when='+ptscotch')
|
||||
depends_on('metis@5:', when='+metis')
|
||||
@@ -54,49 +56,64 @@ class Mumps(Package):
|
||||
depends_on('scalapack', when='+mpi')
|
||||
depends_on('mpi', when='+mpi')
|
||||
|
||||
patch('mumps-shared.patch', when='+shared')
|
||||
|
||||
# this function is not a patch function because in case scalapack
|
||||
# is needed it uses self.spec['scalapack'].fc_link set by the
|
||||
# setup_dependent_environment in scalapck. This happen after patch
|
||||
# end before install
|
||||
# def patch(self):
|
||||
def write_makefile_inc(self):
|
||||
if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec:
|
||||
raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi')
|
||||
if (('+parmetis' in self.spec or
|
||||
'+ptscotch' in self.spec)) and '+mpi' not in self.spec:
|
||||
raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi') # NOQA: E501
|
||||
|
||||
makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib]
|
||||
makefile_conf = [
|
||||
"LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib
|
||||
]
|
||||
|
||||
orderings = ['-Dpord']
|
||||
|
||||
if '+ptscotch' in self.spec or '+scotch' in self.spec:
|
||||
join_lib = ' -l%s' % ('pt' if '+ptscotch' in self.spec else '')
|
||||
makefile_conf.extend(
|
||||
["ISCOTCH = -I%s" % self.spec['scotch'].prefix.include,
|
||||
"LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib,
|
||||
join_lib,
|
||||
join_lib.join(['esmumps', 'scotch', 'scotcherr']))])
|
||||
makefile_conf.extend([
|
||||
"ISCOTCH = -I%s" % self.spec['scotch'].prefix.include,
|
||||
"LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib,
|
||||
join_lib,
|
||||
join_lib.join(['esmumps',
|
||||
'scotch',
|
||||
'scotcherr']))
|
||||
])
|
||||
orderings.append('-Dscotch')
|
||||
if '+ptscotch' in self.spec:
|
||||
orderings.append('-Dptscotch')
|
||||
|
||||
if '+parmetis' in self.spec and '+metis' in self.spec:
|
||||
libname = 'parmetis' if '+parmetis' in self.spec else 'metis'
|
||||
makefile_conf.extend(
|
||||
["IMETIS = -I%s" % self.spec['parmetis'].prefix.include,
|
||||
"LMETIS = -L%s -l%s -L%s -l%s" % (self.spec['parmetis'].prefix.lib, 'parmetis',self.spec['metis'].prefix.lib, 'metis')])
|
||||
makefile_conf.extend([
|
||||
"IMETIS = -I%s" % self.spec['parmetis'].prefix.include,
|
||||
"LMETIS = -L%s -l%s -L%s -l%s" % (
|
||||
self.spec['parmetis'].prefix.lib, 'parmetis',
|
||||
self.spec['metis'].prefix.lib, 'metis')
|
||||
])
|
||||
|
||||
orderings.append('-Dparmetis')
|
||||
elif '+metis' in self.spec:
|
||||
makefile_conf.extend(
|
||||
["IMETIS = -I%s" % self.spec['metis'].prefix.include,
|
||||
"LMETIS = -L%s -l%s" % (self.spec['metis'].prefix.lib, 'metis')])
|
||||
makefile_conf.extend([
|
||||
"IMETIS = -I%s" % self.spec['metis'].prefix.include,
|
||||
"LMETIS = -L%s -l%s" % (self.spec['metis'].prefix.lib,
|
||||
'metis')
|
||||
])
|
||||
|
||||
orderings.append('-Dmetis')
|
||||
|
||||
makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings)))
|
||||
|
||||
# when building shared libs need -fPIC, otherwise
|
||||
# /usr/bin/ld: graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
|
||||
# when building shared libs need -fPIC, otherwise /usr/bin/ld:
|
||||
# graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can
|
||||
# not be used when making a shared object; recompile with
|
||||
# -fPIC
|
||||
fpic = '-fPIC' if '+shared' in self.spec else ''
|
||||
|
||||
# TODO: test this part, it needs a full blas, scalapack and
|
||||
# partitionning environment with 64bit integers
|
||||
if '+idx64' in self.spec:
|
||||
@@ -104,7 +121,7 @@ def write_makefile_inc(self):
|
||||
# the fortran compilation flags most probably are
|
||||
# working only for intel and gnu compilers this is
|
||||
# perhaps something the compiler should provide
|
||||
['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic,'-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'),
|
||||
['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic, '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'), # NOQA: E501
|
||||
'OPTL = %s -O ' % fpic,
|
||||
'OPTC = %s -O -DINTSIZE64' % fpic])
|
||||
else:
|
||||
@@ -113,49 +130,47 @@ def write_makefile_inc(self):
|
||||
'OPTL = %s -O ' % fpic,
|
||||
'OPTC = %s -O ' % fpic])
|
||||
|
||||
|
||||
if '+mpi' in self.spec:
|
||||
makefile_conf.extend(
|
||||
["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'),
|
||||
"FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
|
||||
"FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
|
||||
["CC = %s" % self.spec['mpi'].mpicc,
|
||||
"FC = %s" % self.spec['mpi'].mpifc,
|
||||
"SCALAP = %s" % self.spec['scalapack'].fc_link,
|
||||
"MUMPS_TYPE = par"])
|
||||
else:
|
||||
makefile_conf.extend(
|
||||
["CC = cc",
|
||||
"FC = fc",
|
||||
"FL = fc",
|
||||
"MUMPS_TYPE = seq"])
|
||||
|
||||
# TODO: change the value to the correct one according to the
|
||||
# compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER
|
||||
makefile_conf.append("CDEFS = -DAdd_")
|
||||
makefile_conf.extend([
|
||||
'CDEFS = -DAdd_',
|
||||
'FL = $(FC)',
|
||||
])
|
||||
|
||||
if '+shared' in self.spec:
|
||||
makefile_conf.append('SHLIBEXT = .%s' % dso_suffix)
|
||||
if sys.platform == 'darwin':
|
||||
# Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew)
|
||||
makefile_conf.extend([
|
||||
'LIBEXT=.dylib',
|
||||
'AR=%s -dynamiclib -Wl,-install_name -Wl,%s/$(notdir $@) -undefined dynamic_lookup -o ' % (os.environ['FC'],prefix.lib),
|
||||
'RANLIB=echo'
|
||||
])
|
||||
makefile_conf.append(
|
||||
'LDFLAGS = -dynamiclib -Wl,-install_name -Wl,{0}/$(notdir $@) {1}{0} -undefined dynamic_lookup'.format(prefix.lib, self.compiler.fc_rpath_arg) # NOQA: E501
|
||||
)
|
||||
else:
|
||||
makefile_conf.extend([
|
||||
'LIBEXT=.so',
|
||||
'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) -o' % prefix.lib,
|
||||
'RANLIB=echo'
|
||||
])
|
||||
else:
|
||||
makefile_conf.extend([
|
||||
'LIBEXT = .a',
|
||||
'AR = ar vr',
|
||||
'RANLIB = ranlib'
|
||||
])
|
||||
makefile_conf.append(
|
||||
'LDFLAGS = -shared {0}{1}'.format(
|
||||
self.compiler.fc_rpath_arg,
|
||||
prefix.lib)
|
||||
)
|
||||
|
||||
makefile_conf.extend([
|
||||
'LIBEXT = .a',
|
||||
'AR = ar vr ',
|
||||
'RANLIB = ranlib'
|
||||
])
|
||||
|
||||
makefile_inc_template = join_path(os.path.dirname(self.module.__file__),
|
||||
'Makefile.inc')
|
||||
makefile_inc_template = \
|
||||
join_path(os.path.dirname(self.module.__file__),
|
||||
'Makefile.inc')
|
||||
with open(makefile_inc_template, "r") as fh:
|
||||
makefile_conf.extend(fh.read().split('\n'))
|
||||
|
||||
@@ -164,46 +179,53 @@ def write_makefile_inc(self):
|
||||
makefile_inc = '\n'.join(makefile_conf)
|
||||
fh.write(makefile_inc)
|
||||
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
make_libs = []
|
||||
|
||||
# the choice to compile ?examples is to have kind of a sanity
|
||||
# check on the libraries generated.
|
||||
if '+float' in spec:
|
||||
make_libs.append('sexamples')
|
||||
make_libs.append('s')
|
||||
if '+complex' in spec:
|
||||
make_libs.append('cexamples')
|
||||
make_libs.append('c')
|
||||
|
||||
if '+double' in spec:
|
||||
make_libs.append('dexamples')
|
||||
make_libs.append('d')
|
||||
if '+complex' in spec:
|
||||
make_libs.append('zexamples')
|
||||
make_libs.append('z')
|
||||
|
||||
self.write_makefile_inc()
|
||||
|
||||
# Build fails in parallel
|
||||
make(*make_libs, parallel=False)
|
||||
make('mumps_lib', parallel=False)
|
||||
make(*make_libs)
|
||||
|
||||
install_tree('lib', prefix.lib)
|
||||
install_tree('include', prefix.include)
|
||||
|
||||
if '~mpi' in spec:
|
||||
lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
|
||||
lib_suffix = lib_dsuffix if '+shared' in spec else '.a'
|
||||
install('libseq/libmpiseq%s' % lib_suffix, prefix.lib)
|
||||
for f in glob.glob(join_path('libseq','*.h')):
|
||||
install(f, prefix.include)
|
||||
if '~mpi' in spec:
|
||||
install('libseq/libmpiseq.a', prefix.lib)
|
||||
if '+shared' in spec:
|
||||
install('libseq/libmpiseq.{0}'.format(dso_suffix), prefix.lib)
|
||||
install('libseq/mpi.h', prefix.include)
|
||||
install('libseq/mpif.h', prefix.include)
|
||||
|
||||
# FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI
|
||||
# FIXME: use something like numdiff to compare blessed output with the current
|
||||
with working_dir('examples'):
|
||||
if '+float' in spec:
|
||||
os.system('./ssimpletest < input_simpletest_real')
|
||||
if '+complex' in spec:
|
||||
os.system('./csimpletest < input_simpletest_real')
|
||||
if '+double' in spec:
|
||||
os.system('./dsimpletest < input_simpletest_real')
|
||||
if '+complex' in spec:
|
||||
os.system('./zsimpletest < input_simpletest_cmplx')
|
||||
# FIXME: extend the tests to mpirun -np 2 (or alike) when
|
||||
# build with MPI
|
||||
# FIXME: use something like numdiff to compare blessed output
|
||||
# with the current
|
||||
# TODO: test the installed mumps and not the one in stage
|
||||
if '~mpi' in spec:
|
||||
for t in make_libs:
|
||||
make('{0}examples'.format(t))
|
||||
|
||||
with working_dir('examples'):
|
||||
for t in make_libs:
|
||||
input_file = 'input_simpletest_{0}'.format(
|
||||
'real' if t in ['s', 'd'] else 'cmplx')
|
||||
with open(input_file) as input:
|
||||
test = './{0}simpletest'.format(t)
|
||||
ret = subprocess.call(test,
|
||||
stdin=input)
|
||||
if ret is not 0:
|
||||
raise RuntimeError(
|
||||
'The test {0} did not pass'.format(test))
|
||||
|
@@ -23,7 +23,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Mvapich2(Package):
|
||||
"""MVAPICH2 is an MPI implementation for Infiniband networks."""
|
||||
@@ -43,8 +43,9 @@ class Mvapich2(Package):
|
||||
variant('debug', default=False, description='Enables debug information and error messages at run-time')
|
||||
|
||||
##########
|
||||
# TODO : Process managers should be grouped into the same variant, as soon as variant capabilities will be extended
|
||||
# See https://groups.google.com/forum/#!topic/spack/F8-f8B4_0so
|
||||
# TODO : Process managers should be grouped into the same variant,
|
||||
# as soon as variant capabilities will be extended See
|
||||
# https://groups.google.com/forum/#!topic/spack/F8-f8B4_0so
|
||||
SLURM = 'slurm'
|
||||
HYDRA = 'hydra'
|
||||
GFORKER = 'gforker'
|
||||
@@ -57,7 +58,8 @@ class Mvapich2(Package):
|
||||
##########
|
||||
|
||||
##########
|
||||
# TODO : Network types should be grouped into the same variant, as soon as variant capabilities will be extended
|
||||
# TODO : Network types should be grouped into the same variant, as
|
||||
# soon as variant capabilities will be extended
|
||||
PSM = 'psm'
|
||||
SOCK = 'sock'
|
||||
NEMESISIBTCP = 'nemesisibtcp'
|
||||
@@ -84,8 +86,8 @@ def url_for_version(self, version):
|
||||
|
||||
@staticmethod
|
||||
def enabled(x):
|
||||
"""
|
||||
Given a variant name returns the string that means the variant is enabled
|
||||
"""Given a variant name returns the string that means the variant is
|
||||
enabled
|
||||
|
||||
:param x: variant name
|
||||
:return:
|
||||
@@ -93,8 +95,8 @@ def enabled(x):
|
||||
return '+' + x
|
||||
|
||||
def set_build_type(self, spec, configure_args):
|
||||
"""
|
||||
Appends to configure_args the flags that depends only on the build type (i.e. release or debug)
|
||||
"""Appends to configure_args the flags that depends only on the build
|
||||
type (i.e. release or debug)
|
||||
|
||||
:param spec: spec
|
||||
:param configure_args: list of current configure arguments
|
||||
@@ -104,7 +106,8 @@ def set_build_type(self, spec, configure_args):
|
||||
"--disable-fast",
|
||||
"--enable-error-checking=runtime",
|
||||
"--enable-error-messages=all",
|
||||
"--enable-g=dbg", "--enable-debuginfo" # Permits debugging with TotalView
|
||||
# Permits debugging with TotalView
|
||||
"--enable-g=dbg", "--enable-debuginfo"
|
||||
]
|
||||
else:
|
||||
build_type_options = ["--enable-fast=all"]
|
||||
@@ -112,25 +115,41 @@ def set_build_type(self, spec, configure_args):
|
||||
configure_args.extend(build_type_options)
|
||||
|
||||
def set_process_manager(self, spec, configure_args):
|
||||
"""
|
||||
Appends to configure_args the flags that will enable the appropriate process managers
|
||||
"""Appends to configure_args the flags that will enable the
|
||||
appropriate process managers
|
||||
|
||||
:param spec: spec
|
||||
:param configure_args: list of current configure arguments
|
||||
"""
|
||||
# Check that slurm variant is not activated together with other pm variants
|
||||
has_slurm_incompatible_variants = any(self.enabled(x) in spec for x in Mvapich2.SLURM_INCOMPATIBLE_PMS)
|
||||
if self.enabled(Mvapich2.SLURM) in spec and has_slurm_incompatible_variants:
|
||||
raise RuntimeError(" %s : 'slurm' cannot be activated together with other process managers" % self.name)
|
||||
# Check that slurm variant is not activated together with
|
||||
# other pm variants
|
||||
has_slurm_incompatible_variants = \
|
||||
any(self.enabled(x) in spec
|
||||
for x in Mvapich2.SLURM_INCOMPATIBLE_PMS)
|
||||
|
||||
if self.enabled(Mvapich2.SLURM) in spec and \
|
||||
has_slurm_incompatible_variants:
|
||||
raise RuntimeError(" %s : 'slurm' cannot be activated \
|
||||
together with other process managers" % self.name)
|
||||
|
||||
process_manager_options = []
|
||||
# See: http://slurm.schedmd.com/mpi_guide.html#mvapich2
|
||||
if self.enabled(Mvapich2.SLURM) in spec:
|
||||
process_manager_options = [
|
||||
"--with-pm=slurm"
|
||||
]
|
||||
if self.version > Version('2.0'):
|
||||
process_manager_options = [
|
||||
"--with-pmi=pmi2",
|
||||
"--with-pm=slurm"
|
||||
]
|
||||
else:
|
||||
process_manager_options = [
|
||||
"--with-pmi=slurm",
|
||||
"--with-pm=no"
|
||||
]
|
||||
|
||||
elif has_slurm_incompatible_variants:
|
||||
pms = []
|
||||
# The variant name is equal to the process manager name in the configuration options
|
||||
# The variant name is equal to the process manager name in
|
||||
# the configuration options
|
||||
for x in Mvapich2.SLURM_INCOMPATIBLE_PMS:
|
||||
if self.enabled(x) in spec:
|
||||
pms.append(x)
|
||||
@@ -146,7 +165,9 @@ def set_network_type(self, spec, configure_args):
|
||||
if self.enabled(x) in spec:
|
||||
count += 1
|
||||
if count > 1:
|
||||
raise RuntimeError('network variants are mutually exclusive (only one can be selected at a time)')
|
||||
raise RuntimeError('network variants are mutually exclusive \
|
||||
(only one can be selected at a time)')
|
||||
|
||||
network_options = []
|
||||
# From here on I can suppose that only one variant has been selected
|
||||
if self.enabled(Mvapich2.PSM) in spec:
|
||||
@@ -164,6 +185,11 @@ def set_network_type(self, spec, configure_args):
|
||||
|
||||
configure_args.extend(network_options)
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
if self.enabled(Mvapich2.SLURM) in self.spec and \
|
||||
self.version > Version('2.0'):
|
||||
run_env.set('SLURM_MPI_TYPE', 'pmi2')
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
|
||||
spack_env.set('MPICH_CC', spack_cc)
|
||||
spack_env.set('MPICH_CXX', spack_cxx)
|
||||
@@ -178,7 +204,8 @@ def setup_dependent_package(self, module, dep_spec):
|
||||
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# we'll set different configure flags depending on our environment
|
||||
# we'll set different configure flags depending on our
|
||||
# environment
|
||||
configure_args = [
|
||||
"--prefix=%s" % prefix,
|
||||
"--enable-shared",
|
||||
@@ -208,7 +235,6 @@ def install(self, spec, prefix):
|
||||
|
||||
self.filter_compilers()
|
||||
|
||||
|
||||
def filter_compilers(self):
|
||||
"""Run after install to make the MPI compilers use the
|
||||
compilers that Spack built the package with.
|
||||
@@ -218,18 +244,20 @@ def filter_compilers(self):
|
||||
be bound to whatever compiler they were built with.
|
||||
"""
|
||||
bin = self.prefix.bin
|
||||
mpicc = os.path.join(bin, 'mpicc')
|
||||
mpicxx = os.path.join(bin, 'mpicxx')
|
||||
mpif77 = os.path.join(bin, 'mpif77')
|
||||
mpif90 = os.path.join(bin, 'mpif90')
|
||||
mpicc = join_path(bin, 'mpicc')
|
||||
mpicxx = join_path(bin, 'mpicxx')
|
||||
mpif77 = join_path(bin, 'mpif77')
|
||||
mpif90 = join_path(bin, 'mpif90')
|
||||
|
||||
spack_cc = os.environ['CC']
|
||||
spack_cxx = os.environ['CXX']
|
||||
spack_f77 = os.environ['F77']
|
||||
spack_fc = os.environ['FC']
|
||||
# Substitute Spack compile wrappers for the real
|
||||
# underlying compiler
|
||||
kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
|
||||
filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
|
||||
filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
|
||||
filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
|
||||
filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
|
||||
|
||||
kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True }
|
||||
filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs)
|
||||
filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs)
|
||||
filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs)
|
||||
filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs)
|
||||
# Remove this linking flag if present
|
||||
# (it turns RPATH into RUNPATH)
|
||||
for wrapper in (mpicc, mpicxx, mpif77, mpif90):
|
||||
filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
|
||||
|
@@ -48,6 +48,13 @@ class Openblas(Package):
|
||||
patch('make.patch')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# As of 06/2016 there is no mechanism to specify that packages which
|
||||
# depends on Blas/Lapack need C or/and Fortran symbols. For now
|
||||
# require both.
|
||||
if self.compiler.f77 is None:
|
||||
raise InstallError('OpenBLAS requires both C and Fortran ',
|
||||
'compilers!')
|
||||
|
||||
# Configure fails to pick up fortran from FC=/abs/path/to/f77, but
|
||||
# works fine with FC=/abs/path/to/gfortran.
|
||||
# When mixing compilers make sure that
|
||||
|
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Openjpeg(Package):
|
||||
"""
|
||||
OpenJPEG is an open-source JPEG 2000 codec written in C language.
|
||||
@@ -36,12 +37,13 @@ class Openjpeg(Package):
|
||||
homepage = "https://github.com/uclouvain/openjpeg"
|
||||
url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz"
|
||||
|
||||
version('2.1' , '3e1c451c087f8462955426da38aa3b3d')
|
||||
version('2.1', '3e1c451c087f8462955426da38aa3b3d')
|
||||
version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5')
|
||||
version('2.0' , 'cdf266530fee8af87454f15feb619609')
|
||||
version('2.0', 'cdf266530fee8af87454f15feb619609')
|
||||
version('1.5.2', '545f98923430369a6b046ef3632ef95c')
|
||||
version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e')
|
||||
|
||||
depends_on('cmake')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
cmake('.', *std_cmake_args)
|
||||
|
@@ -24,6 +24,8 @@
|
||||
##############################################################################
|
||||
import os
|
||||
|
||||
import llnl.util.tty as tty
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
@@ -61,6 +63,7 @@ class Openmpi(Package):
|
||||
list_url = "http://www.open-mpi.org/software/ompi/"
|
||||
list_depth = 3
|
||||
|
||||
version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b')
|
||||
version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c')
|
||||
version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e')
|
||||
version('1.10.0', '280cf952de68369cebaca886c5ce0304')
|
||||
@@ -72,20 +75,27 @@ class Openmpi(Package):
|
||||
patch('configure.patch', when="@1.10.0:1.10.1")
|
||||
|
||||
variant('psm', default=False, description='Build support for the PSM library.')
|
||||
variant('psm2', default=False, description='Build support for the Intel PSM2 library.')
|
||||
variant('pmi', default=False, description='Build support for PMI-based launchers')
|
||||
variant('verbs', default=_verbs_dir() is not None, description='Build support for OpenFabrics verbs.')
|
||||
variant('psm2', default=False,
|
||||
description='Build support for the Intel PSM2 library.')
|
||||
variant('pmi', default=False,
|
||||
description='Build support for PMI-based launchers')
|
||||
variant('verbs', default=_verbs_dir() is not None,
|
||||
description='Build support for OpenFabrics verbs.')
|
||||
variant('mxm', default=False, description='Build Mellanox Messaging support')
|
||||
|
||||
variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support')
|
||||
variant('thread_multiple', default=False,
|
||||
description='Enable MPI_THREAD_MULTIPLE support')
|
||||
|
||||
# TODO : variant support for alps, loadleveler is missing
|
||||
variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support')
|
||||
variant('slurm', default=False, description='Build SLURM scheduler component')
|
||||
variant('tm', default=False,
|
||||
description='Build TM (Torque, PBSPro, and compatible) support')
|
||||
variant('slurm', default=False,
|
||||
description='Build SLURM scheduler component')
|
||||
|
||||
variant('sqlite3', default=False, description='Build sqlite3 support')
|
||||
|
||||
variant('vt', default=True, description='Build support for contributed package vt')
|
||||
variant('vt', default=True,
|
||||
description='Build support for contributed package vt')
|
||||
|
||||
# TODO : support for CUDA is missing
|
||||
|
||||
@@ -96,8 +106,7 @@ class Openmpi(Package):
|
||||
depends_on('sqlite', when='+sqlite3')
|
||||
|
||||
def url_for_version(self, version):
|
||||
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version)
|
||||
|
||||
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) # NOQA: ignore=E501
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
|
||||
spack_env.set('OMPI_CC', spack_cc)
|
||||
@@ -106,14 +115,30 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
|
||||
spack_env.set('OMPI_F77', spack_f77)
|
||||
|
||||
def setup_dependent_package(self, module, dep_spec):
|
||||
self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
|
||||
self.spec.mpicc = join_path(self.prefix.bin, 'mpicc')
|
||||
self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++')
|
||||
self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
|
||||
self.spec.mpifc = join_path(self.prefix.bin, 'mpif90')
|
||||
self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77')
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
# As of 06/2016 there is no mechanism to specify that packages which
|
||||
# depends on MPI need C or/and Fortran implementation. For now
|
||||
# require both.
|
||||
if (self.compiler.f77 is None) or (self.compiler.fc is None):
|
||||
tty.warn('OpenMPI : FORTRAN compiler not found')
|
||||
tty.warn('OpenMPI : FORTRAN bindings will be disabled')
|
||||
spack_env.unset('FC')
|
||||
spack_env.unset('F77')
|
||||
# Setting an attribute here and using it in the 'install'
|
||||
# method is needed to ensure tty.warn is actually displayed
|
||||
# to user and not redirected to spack-build.out
|
||||
self.config_extra = ['--enable-mpi-fortran=none',
|
||||
'--disable-oshmem-fortran']
|
||||
|
||||
@property
|
||||
def verbs(self):
|
||||
# Up through version 1.6, this option was previously named --with-openib
|
||||
# Up through version 1.6, this option was previously named
|
||||
# --with-openib
|
||||
if self.spec.satisfies('@:1.6'):
|
||||
return 'openib'
|
||||
# In version 1.7, it was renamed to be --with-verbs
|
||||
@@ -125,6 +150,10 @@ def install(self, spec, prefix):
|
||||
"--with-hwloc=%s" % spec['hwloc'].prefix,
|
||||
"--enable-shared",
|
||||
"--enable-static"]
|
||||
|
||||
if getattr(self, 'config_extra', None) is not None:
|
||||
config_args.extend(self.config_extra)
|
||||
|
||||
# Variant based arguments
|
||||
config_args.extend([
|
||||
# Schedulers
|
||||
@@ -135,14 +164,14 @@ def install(self, spec, prefix):
|
||||
'--with-psm2' if '+psm2' in spec else '--without-psm2',
|
||||
'--with-mxm' if '+mxm' in spec else '--without-mxm',
|
||||
# Other options
|
||||
'--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple',
|
||||
'--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', # NOQA: ignore=E501
|
||||
'--with-pmi' if '+pmi' in spec else '--without-pmi',
|
||||
'--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3',
|
||||
'--enable-vt' if '+vt' in spec else '--disable-vt'
|
||||
])
|
||||
if '+verbs' in spec:
|
||||
path = _verbs_dir()
|
||||
if path is not None:
|
||||
if path is not None and path not in ('/usr', '/usr/local'):
|
||||
config_args.append('--with-%s=%s' % (self.verbs, path))
|
||||
else:
|
||||
config_args.append('--with-%s' % self.verbs)
|
||||
@@ -153,10 +182,7 @@ def install(self, spec, prefix):
|
||||
# use this for LANL builds, but for LLNL builds, we need:
|
||||
# "--with-platform=contrib/platform/llnl/optimized"
|
||||
if self.version == ver("1.6.5") and '+lanl' in spec:
|
||||
config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas")
|
||||
|
||||
if not self.compiler.f77 and not self.compiler.fc:
|
||||
config_args.append("--enable-mpi-fortran=no")
|
||||
config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") # NOQA: ignore=E501
|
||||
|
||||
configure(*config_args)
|
||||
make()
|
||||
@@ -173,40 +199,33 @@ def filter_compilers(self):
|
||||
be bound to whatever compiler they were built with.
|
||||
"""
|
||||
kwargs = {'ignore_absent': True, 'backup': False, 'string': False}
|
||||
dir = os.path.join(self.prefix, 'share/openmpi/')
|
||||
wrapper_basepath = join_path(self.prefix, 'share', 'openmpi')
|
||||
|
||||
cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt',
|
||||
'ortecc-wrapper-data.txt', 'shmemcc-wrapper-data.txt']
|
||||
wrappers = [
|
||||
('mpicc-vt-wrapper-data.txt', self.compiler.cc),
|
||||
('mpicc-wrapper-data.txt', self.compiler.cc),
|
||||
('ortecc-wrapper-data.txt', self.compiler.cc),
|
||||
('shmemcc-wrapper-data.txt', self.compiler.cc),
|
||||
('mpic++-vt-wrapper-data.txt', self.compiler.cxx),
|
||||
('mpic++-wrapper-data.txt', self.compiler.cxx),
|
||||
('ortec++-wrapper-data.txt', self.compiler.cxx),
|
||||
('mpifort-vt-wrapper-data.txt', self.compiler.fc),
|
||||
('mpifort-wrapper-data.txt', self.compiler.fc),
|
||||
('shmemfort-wrapper-data.txt', self.compiler.fc),
|
||||
('mpif90-vt-wrapper-data.txt', self.compiler.fc),
|
||||
('mpif90-wrapper-data.txt', self.compiler.fc),
|
||||
('mpif77-vt-wrapper-data.txt', self.compiler.f77),
|
||||
('mpif77-wrapper-data.txt', self.compiler.f77)
|
||||
]
|
||||
|
||||
cxx_wrappers = ['mpic++-vt-wrapper-data.txt', 'mpic++-wrapper-data.txt',
|
||||
'ortec++-wrapper-data.txt']
|
||||
|
||||
fc_wrappers = ['mpifort-vt-wrapper-data.txt',
|
||||
'mpifort-wrapper-data.txt', 'shmemfort-wrapper-data.txt']
|
||||
|
||||
for wrapper in cc_wrappers:
|
||||
filter_file('compiler=.*', 'compiler=%s' % self.compiler.cc,
|
||||
os.path.join(dir, wrapper), **kwargs)
|
||||
|
||||
for wrapper in cxx_wrappers:
|
||||
filter_file('compiler=.*', 'compiler=%s' % self.compiler.cxx,
|
||||
os.path.join(dir, wrapper), **kwargs)
|
||||
|
||||
for wrapper in fc_wrappers:
|
||||
filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
|
||||
os.path.join(dir, wrapper), **kwargs)
|
||||
|
||||
# These are symlinks in newer versions, so check that here
|
||||
f77_wrappers = ['mpif77-vt-wrapper-data.txt', 'mpif77-wrapper-data.txt']
|
||||
f90_wrappers = ['mpif90-vt-wrapper-data.txt', 'mpif90-wrapper-data.txt']
|
||||
|
||||
for wrapper in f77_wrappers:
|
||||
path = os.path.join(dir, wrapper)
|
||||
if not os.path.islink(path):
|
||||
filter_file('compiler=.*', 'compiler=%s' % self.compiler.f77,
|
||||
path, **kwargs)
|
||||
for wrapper in f90_wrappers:
|
||||
path = os.path.join(dir, wrapper)
|
||||
if not os.path.islink(path):
|
||||
filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
|
||||
path, **kwargs)
|
||||
for wrapper_name, compiler in wrappers:
|
||||
wrapper = join_path(wrapper_basepath, wrapper_name)
|
||||
if not os.path.islink(wrapper):
|
||||
# Substitute Spack compile wrappers for the real
|
||||
# underlying compiler
|
||||
match = 'compiler=.*'
|
||||
substitute = 'compiler={compiler}'.format(compiler=compiler)
|
||||
filter_file(match, substitute, wrapper, **kwargs)
|
||||
# Remove this linking flag if present
|
||||
# (it turns RPATH into RUNPATH)
|
||||
filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
|
||||
|
@@ -100,7 +100,7 @@ def install(self, spec, prefix):
|
||||
# in the environment, then this will override what is set in the
|
||||
# Makefile, leading to build errors.
|
||||
env.pop('APPS', None)
|
||||
if spec.satisfies("arch=darwin-x86_64") or spec.satisfies("arch=ppc64"):
|
||||
if spec.satisfies("target=x86_64") or spec.satisfies("target=ppc64"):
|
||||
# This needs to be done for all 64-bit architectures (except Linux,
|
||||
# where it happens automatically?)
|
||||
env['KERNEL_BITS'] = '64'
|
||||
|
12
var/spack/repos/builtin/packages/pcre/intel.patch
Normal file
12
var/spack/repos/builtin/packages/pcre/intel.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -up pcre-8.38/pcrecpp.cc.intel pcre-8.38/pcrecpp.cc
|
||||
--- pcre-8.38/pcrecpp.cc.intel 2014-09-15 07:48:59.000000000 -0600
|
||||
+++ pcre-8.38/pcrecpp.cc 2016-06-08 16:16:56.702721214 -0600
|
||||
@@ -66,7 +66,7 @@ Arg RE::no_arg((void*)NULL);
|
||||
// inclusive test if we ever needed it. (Note that not only the
|
||||
// __attribute__ syntax, but also __USER_LABEL_PREFIX__, are
|
||||
// gnu-specific.)
|
||||
-#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__)
|
||||
+#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__) && !defined(__INTEL_COMPILER)
|
||||
# define ULP_AS_STRING(x) ULP_AS_STRING_INTERNAL(x)
|
||||
# define ULP_AS_STRING_INTERNAL(x) #x
|
||||
# define USER_LABEL_PREFIX_STR ULP_AS_STRING(__USER_LABEL_PREFIX__)
|
@@ -24,17 +24,29 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Pcre(Package):
|
||||
"""The PCRE package contains Perl Compatible Regular Expression
|
||||
libraries. These are useful for implementing regular expression
|
||||
pattern matching using the same syntax and semantics as Perl 5."""
|
||||
|
||||
homepage = "http://www.pcre.org"""
|
||||
url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2"
|
||||
|
||||
version('8.36', 'b767bc9af0c20bc9c1fe403b0d41ad97')
|
||||
version('8.38', '00aabbfe56d5a48b270f999b508c5ad2')
|
||||
|
||||
patch("intel.patch")
|
||||
|
||||
variant('utf', default=True,
|
||||
description='Enable support for UTF-8/16/32, '
|
||||
'incompatible with EBCDIC.')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix)
|
||||
configure_args = ['--prefix=%s' % prefix]
|
||||
if '+utf' in spec:
|
||||
configure_args.append('--enable-utf')
|
||||
|
||||
configure(*configure_args)
|
||||
make()
|
||||
make("install")
|
||||
|
@@ -28,13 +28,16 @@
|
||||
|
||||
class Petsc(Package):
|
||||
"""
|
||||
PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications
|
||||
modeled by partial differential equations.
|
||||
PETSc is a suite of data structures and routines for the scalable
|
||||
(parallel) solution of scientific applications modeled by partial
|
||||
differential equations.
|
||||
"""
|
||||
|
||||
homepage = "http://www.mcs.anl.gov/petsc/index.html"
|
||||
url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"
|
||||
|
||||
version('3.7.2', '50da49867ce7a49e7a0c1b37f4ec7b34')
|
||||
version('3.6.4', '7632da2375a3df35b8891c9526dbdde7')
|
||||
version('3.6.3', '91dd3522de5a5ef039ff8f50800db606')
|
||||
version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f')
|
||||
version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13')
|
||||
@@ -69,10 +72,12 @@ class Petsc(Package):
|
||||
depends_on('hdf5+mpi', when='+hdf5+mpi')
|
||||
depends_on('parmetis', when='+metis+mpi')
|
||||
# Hypre does not support complex numbers.
|
||||
# Also PETSc prefer to build it without internal superlu, likely due to conflict in headers
|
||||
# see https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py
|
||||
# Also PETSc prefer to build it without internal superlu, likely due to
|
||||
# conflict in headers see
|
||||
# https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py # NOQA: ignore=E501
|
||||
depends_on('hypre~internal-superlu', when='+hypre+mpi~complex')
|
||||
depends_on('superlu-dist', when='+superlu-dist+mpi')
|
||||
depends_on('superlu-dist@:4.3', when='@:3.6.4+superlu-dist+mpi')
|
||||
depends_on('superlu-dist@5.0.0:', when='@3.7:+superlu-dist+mpi')
|
||||
depends_on('mumps+mpi', when='+mumps+mpi')
|
||||
depends_on('scalapack', when='+mumps+mpi')
|
||||
|
||||
@@ -80,17 +85,17 @@ def mpi_dependent_options(self):
|
||||
if '~mpi' in self.spec:
|
||||
compiler_opts = [
|
||||
'--with-cc=%s' % os.environ['CC'],
|
||||
'--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'),
|
||||
'--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'),
|
||||
'--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'), # NOQA: ignore=E501
|
||||
'--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'), # NOQA: ignore=E501
|
||||
'--with-mpi=0'
|
||||
]
|
||||
error_message_fmt = '\t{library} support requires "+mpi" to be activated'
|
||||
error_message_fmt = '\t{library} support requires "+mpi" to be activated' # NOQA: ignore=E501
|
||||
|
||||
# If mpi is disabled (~mpi), it's an error to have any of these enabled.
|
||||
# This generates a list of any such errors.
|
||||
# If mpi is disabled (~mpi), it's an error to have any of these
|
||||
# enabled. This generates a list of any such errors.
|
||||
errors = [error_message_fmt.format(library=x)
|
||||
for x in ('hdf5', 'hypre', 'parmetis','mumps','superlu-dist')
|
||||
if ('+'+x) in self.spec]
|
||||
for x in ('hdf5', 'hypre', 'parmetis', 'mumps', 'superlu-dist') # NOQA: ignore=E501
|
||||
if ('+' + x) in self.spec]
|
||||
if errors:
|
||||
errors = ['incompatible variants given'] + errors
|
||||
raise RuntimeError('\n'.join(errors))
|
||||
@@ -105,26 +110,31 @@ def install(self, spec, prefix):
|
||||
options = ['--with-ssl=0']
|
||||
options.extend(self.mpi_dependent_options())
|
||||
options.extend([
|
||||
'--with-precision=%s' % ('double' if '+double' in spec else 'single'),
|
||||
'--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'),
|
||||
'--with-precision=%s' % ('double' if '+double' in spec else 'single'), # NOQA: ignore=E501
|
||||
'--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'), # NOQA: ignore=E501
|
||||
'--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'),
|
||||
'--with-debugging=%s' % ('1' if '+debug' in spec else '0'),
|
||||
'--with-blas-lapack-dir=%s' % spec['lapack'].prefix
|
||||
])
|
||||
# Activates library support if needed
|
||||
for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis','mumps','scalapack'):
|
||||
for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis',
|
||||
'mumps', 'scalapack'):
|
||||
options.append(
|
||||
'--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0'))
|
||||
'--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0')) # NOQA: ignore=E501
|
||||
)
|
||||
if library in spec:
|
||||
options.append(
|
||||
'--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix)
|
||||
'--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix) # NOQA: ignore=E501
|
||||
)
|
||||
# PETSc does not pick up SuperluDist from the dir as they look for superlu_dist_4.1.a
|
||||
# PETSc does not pick up SuperluDist from the dir as they look for
|
||||
# superlu_dist_4.1.a
|
||||
if 'superlu-dist' in spec:
|
||||
options.extend([
|
||||
'--with-superlu_dist-include=%s' % spec['superlu-dist'].prefix.include,
|
||||
'--with-superlu_dist-lib=%s' % join_path(spec['superlu-dist'].prefix.lib, 'libsuperlu_dist.a'),
|
||||
'--with-superlu_dist-include=%s' %
|
||||
spec['superlu-dist'].prefix.include,
|
||||
'--with-superlu_dist-lib=%s' %
|
||||
join_path(spec['superlu-dist'].prefix.lib,
|
||||
'libsuperlu_dist.a'),
|
||||
'--with-superlu_dist=1'
|
||||
])
|
||||
else:
|
||||
|
@@ -24,18 +24,21 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Postgresql(Package):
|
||||
"""PostgreSQL is a powerful, open source object-relational
|
||||
database system. It has more than 15 years of active
|
||||
development and a proven architecture that has earned it a
|
||||
strong reputation for reliability, data integrity, and
|
||||
correctness."""
|
||||
"""PostgreSQL is a powerful, open source object-relational database system.
|
||||
It has more than 15 years of active development and a proven architecture
|
||||
that has earned it a strong reputation for reliability, data integrity, and
|
||||
correctness."""
|
||||
|
||||
homepage = "http://www.postgresql.org/"
|
||||
url = "http://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.bz2"
|
||||
|
||||
version('9.3.4', 'd0a41f54c377b2d2fab4a003b0dac762')
|
||||
version('9.5.3', '3f0c388566c688c82b01a0edf1e6b7a0')
|
||||
|
||||
depends_on("openssl")
|
||||
depends_on('openssl')
|
||||
depends_on('readline')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix,
|
||||
|
115
var/spack/repos/builtin/packages/psi4/package.py
Normal file
115
var/spack/repos/builtin/packages/psi4/package.py
Normal file
@@ -0,0 +1,115 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Psi4(Package):
|
||||
"""Psi4 is an open-source suite of ab initio quantum chemistry
|
||||
programs designed for efficient, high-accuracy simulations of
|
||||
a variety of molecular properties."""
|
||||
|
||||
homepage = "http://www.psicode.org/"
|
||||
url = "https://github.com/psi4/psi4/archive/0.5.tar.gz"
|
||||
|
||||
version('0.5', '53041b8a9be3958384171d0d22f9fdd0')
|
||||
|
||||
# Required dependencies
|
||||
depends_on('blas')
|
||||
depends_on('lapack')
|
||||
depends_on('boost+chrono+filesystem+python+regex+serialization+system+timer+thread')
|
||||
depends_on('python')
|
||||
depends_on('cmake')
|
||||
depends_on('py-numpy')
|
||||
|
||||
# Optional dependencies
|
||||
# TODO: add packages for these
|
||||
# depends_on('perl')
|
||||
# depends_on('erd')
|
||||
# depends_on('pcm-solver')
|
||||
# depends_on('chemps2')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
cmake_args = [
|
||||
'-DBLAS_TYPE={0}'.format(spec['blas'].name.upper()),
|
||||
'-DBLAS_LIBRARIES={0}'.format(spec['blas'].blas_shared_lib),
|
||||
'-DLAPACK_TYPE={0}'.format(spec['lapack'].name.upper()),
|
||||
'-DLAPACK_LIBRARIES={0}'.format(spec['lapack'].lapack_shared_lib),
|
||||
'-DBOOST_INCLUDEDIR={0}'.format(spec['boost'].prefix.include),
|
||||
'-DBOOST_LIBRARYDIR={0}'.format(spec['boost'].prefix.lib),
|
||||
'-DENABLE_CHEMPS2=OFF'
|
||||
]
|
||||
|
||||
cmake_args.extend(std_cmake_args)
|
||||
|
||||
with working_dir('spack-build', create=True):
|
||||
cmake('..', *cmake_args)
|
||||
|
||||
make()
|
||||
make('install')
|
||||
|
||||
self.filter_compilers(spec, prefix)
|
||||
|
||||
def filter_compilers(self, spec, prefix):
|
||||
"""Run after install to tell the configuration files to
|
||||
use the compilers that Spack built the package with.
|
||||
|
||||
If this isn't done, they'll have PLUGIN_CXX set to
|
||||
Spack's generic cxx. We want it to be bound to
|
||||
whatever compiler it was built with."""
|
||||
|
||||
kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
|
||||
|
||||
cc_files = ['bin/psi4-config']
|
||||
cxx_files = ['bin/psi4-config', 'include/psi4/psiconfig.h']
|
||||
template = 'share/psi4/plugin/Makefile.template'
|
||||
|
||||
for filename in cc_files:
|
||||
filter_file(os.environ['CC'], self.compiler.cc,
|
||||
os.path.join(prefix, filename), **kwargs)
|
||||
|
||||
for filename in cxx_files:
|
||||
filter_file(os.environ['CXX'], self.compiler.cxx,
|
||||
os.path.join(prefix, filename), **kwargs)
|
||||
|
||||
# The binary still keeps track of the compiler used to install Psi4
|
||||
# and uses it when creating a plugin template
|
||||
filter_file('@PLUGIN_CXX@', self.compiler.cxx,
|
||||
os.path.join(prefix, template), **kwargs)
|
||||
|
||||
# The binary links to the build include directory instead of the
|
||||
# installation include directory:
|
||||
# https://github.com/psi4/psi4/issues/410
|
||||
filter_file('@PLUGIN_INCLUDES@', '-I{0}'.format(
|
||||
' -I'.join([
|
||||
os.path.join(spec['psi4'].prefix.include, 'psi4'),
|
||||
os.path.join(spec['boost'].prefix.include, 'boost'),
|
||||
os.path.join(spec['python'].prefix.include, 'python{0}'.format(
|
||||
spec['python'].version.up_to(2))),
|
||||
spec['lapack'].prefix.include,
|
||||
spec['blas'].prefix.include,
|
||||
'/usr/include'
|
||||
])
|
||||
), os.path.join(prefix, template), **kwargs)
|
40
var/spack/repos/builtin/packages/py-3to2/package.py
Normal file
40
var/spack/repos/builtin/packages/py-3to2/package.py
Normal file
@@ -0,0 +1,40 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Py3to2(Package):
|
||||
"""lib3to2 is a set of fixers that are intended to backport code written
|
||||
for Python version 3.x into Python version 2.x."""
|
||||
|
||||
homepage = "https://pypi.python.org/pypi/3to2"
|
||||
url = "https://pypi.python.org/packages/source/3/3to2/3to2-1.1.1.zip"
|
||||
|
||||
version('1.1.1', 'cbeed28e350dbdaef86111ace3052824')
|
||||
|
||||
extends('python')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
@@ -24,29 +24,38 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
class PyAstropy(Package):
|
||||
"""
|
||||
The Astropy Project is a community effort to develop a single core
|
||||
package for Astronomy in Python and foster interoperability between
|
||||
Python astronomy packages.
|
||||
"""
|
||||
homepage = 'http://www.astropy.org/'
|
||||
|
||||
class PyAstropy(Package):
|
||||
"""The Astropy Project is a community effort to develop a single core
|
||||
package for Astronomy in Python and foster interoperability between
|
||||
Python astronomy packages."""
|
||||
|
||||
homepage = 'http://www.astropy.org/'
|
||||
url = 'https://pypi.python.org/packages/source/a/astropy/astropy-1.1.2.tar.gz'
|
||||
|
||||
version('1.1.2', 'cbe32023b5b1177d1e2498a0d00cda51')
|
||||
version('1.1.post1', 'b52919f657a37d45cc45f5cb0f58c44d')
|
||||
|
||||
def url_for_version(self, version):
|
||||
return 'https://pypi.python.org/packages/source/a/astropy/astropy-{0}.tar.gz'.format(version)
|
||||
|
||||
# Required dependencies
|
||||
extends('python')
|
||||
depends_on('py-numpy')
|
||||
|
||||
# Optional dependencies
|
||||
depends_on('py-h5py')
|
||||
depends_on('py-beautifulsoup4')
|
||||
depends_on('py-pyyaml')
|
||||
depends_on('py-scipy')
|
||||
depends_on('libxml2')
|
||||
depends_on('py-matplotlib')
|
||||
depends_on('py-pytz')
|
||||
depends_on('py-scikit-image')
|
||||
depends_on('py-pandas')
|
||||
|
||||
# System dependencies
|
||||
depends_on('cfitsio')
|
||||
depends_on('expat')
|
||||
depends_on('py-h5py')
|
||||
depends_on('py-numpy')
|
||||
depends_on('py-scipy')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'build', '--use-system-cfitsio',
|
||||
'--use-system-expat')
|
||||
python('setup.py', 'install', '--prefix=' + prefix)
|
||||
|
||||
'--use-system-expat')
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))
|
||||
|
@@ -23,10 +23,12 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class PyBasemap(Package):
|
||||
"""The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python."""
|
||||
"""The matplotlib basemap toolkit is a library for plotting
|
||||
2D data on maps in Python."""
|
||||
|
||||
homepage = "http://matplotlib.org/basemap/"
|
||||
url = "https://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz"
|
||||
|
||||
@@ -36,7 +38,7 @@ class PyBasemap(Package):
|
||||
depends_on('py-setuptools')
|
||||
depends_on('py-numpy')
|
||||
depends_on('py-matplotlib+gui')
|
||||
depends_on('py-pillow')
|
||||
depends_on('pil')
|
||||
depends_on("geos")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
@@ -0,0 +1,41 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyBeautifulsoup4(Package):
|
||||
"""Beautiful Soup is a Python library for pulling data out of HTML and
|
||||
XML files. It works with your favorite parser to provide idiomatic ways
|
||||
of navigating, searching, and modifying the parse tree."""
|
||||
|
||||
homepage = "https://www.crummy.com/software/BeautifulSoup"
|
||||
url = "https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-4.4.1.tar.gz"
|
||||
|
||||
version('4.4.1', '8fbd9a7cac0704645fa20d1419036815')
|
||||
|
||||
extends('python')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))
|
41
var/spack/repos/builtin/packages/py-emcee/package.py
Normal file
41
var/spack/repos/builtin/packages/py-emcee/package.py
Normal file
@@ -0,0 +1,41 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyEmcee(Package):
|
||||
"""emcee is an MIT licensed pure-Python implementation of Goodman & Weare's
|
||||
Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler."""
|
||||
|
||||
homepage = "http://dan.iel.fm/emcee/current/"
|
||||
url = "https://pypi.python.org/packages/source/e/emcee/emcee-2.1.0.tar.gz"
|
||||
|
||||
version('2.1.0', 'c6b6fad05c824d40671d4a4fc58dfff7')
|
||||
|
||||
extends('python')
|
||||
depends_on('py-numpy')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))
|
@@ -23,21 +23,42 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import re
|
||||
|
||||
|
||||
class PyH5py(Package):
|
||||
"""The h5py package provides both a high- and low-level interface to the HDF5 library from Python."""
|
||||
"""The h5py package provides both a high- and low-level interface to the
|
||||
HDF5 library from Python."""
|
||||
|
||||
homepage = "https://pypi.python.org/pypi/h5py"
|
||||
url = "https://pypi.python.org/packages/source/h/h5py/h5py-2.4.0.tar.gz"
|
||||
|
||||
version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758')
|
||||
version('2.6.0', 'ec476211bd1de3f5ac150544189b0bf4')
|
||||
version('2.5.0', '6e4301b5ad5da0d51b0a1e5ac19e3b74')
|
||||
version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758')
|
||||
|
||||
extends('python', ignore=lambda f: re.match(r'bin/cy*', f))
|
||||
depends_on('hdf5')
|
||||
depends_on('py-numpy')
|
||||
depends_on('py-cython')
|
||||
variant('mpi', default=False, description='Build with MPI support')
|
||||
|
||||
extends('python')
|
||||
|
||||
# Build dependencies
|
||||
depends_on('py-cython@0.19:')
|
||||
depends_on('pkg-config')
|
||||
depends_on('hdf5@1.8.4:+mpi', when='+mpi')
|
||||
depends_on('hdf5@1.8.4:~mpi', when='~mpi')
|
||||
depends_on('mpi', when='+mpi')
|
||||
|
||||
# Build and runtime dependencies
|
||||
depends_on('py-numpy@1.6.1:')
|
||||
|
||||
# Runtime dependencies
|
||||
depends_on('py-six')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'configure', '--hdf5=%s' % spec['hdf5'].prefix)
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
python('setup.py', 'configure',
|
||||
'--hdf5={0}'.format(spec['hdf5'].prefix))
|
||||
|
||||
if '+mpi' in spec:
|
||||
env['CC'] = spec['mpi'].mpicc
|
||||
python('setup.py', 'configure', '--mpi')
|
||||
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))
|
||||
|
46
var/spack/repos/builtin/packages/py-iminuit/package.py
Normal file
46
var/spack/repos/builtin/packages/py-iminuit/package.py
Normal file
@@ -0,0 +1,46 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyIminuit(Package):
|
||||
"""Interactive IPython-Friendly Minimizer based on SEAL Minuit2."""
|
||||
|
||||
homepage = "https://pypi.python.org/pypi/iminuit"
|
||||
url = "https://pypi.python.org/packages/source/i/iminuit/iminuit-1.2.tar.gz"
|
||||
|
||||
version('1.2', '4701ec472cae42015e26251703e6e984')
|
||||
|
||||
# Required dependencies
|
||||
extends('python')
|
||||
depends_on('py-setuptools')
|
||||
|
||||
# Optional dependencies
|
||||
depends_on('py-numpy')
|
||||
depends_on('py-matplotlib')
|
||||
depends_on('py-cython')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))
|
44
var/spack/repos/builtin/packages/py-nestle/package.py
Normal file
44
var/spack/repos/builtin/packages/py-nestle/package.py
Normal file
@@ -0,0 +1,44 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyNestle(Package):
|
||||
"""Nested sampling algorithms for evaluating Bayesian evidence."""
|
||||
|
||||
homepage = "http://kbarbary.github.io/nestle/"
|
||||
url = "https://pypi.python.org/packages/source/n/nestle/nestle-0.1.1.tar.gz"
|
||||
|
||||
version('0.1.1', '4875c0f9a0a8e263c1d7f5fa6ce604c5')
|
||||
|
||||
# Required dependencies
|
||||
extends('python')
|
||||
depends_on('py-numpy')
|
||||
|
||||
# Optional dependencies
|
||||
depends_on('py-scipy')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))
|
@@ -24,14 +24,19 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyPil(Package):
|
||||
"""The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities."""
|
||||
"""The Python Imaging Library (PIL) adds image processing capabilities
|
||||
to your Python interpreter. This library supports many file formats,
|
||||
and provides powerful image processing and graphics capabilities."""
|
||||
|
||||
homepage = "http://www.pythonware.com/products/pil/"
|
||||
url = "http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz"
|
||||
|
||||
version('1.1.7', 'fc14a54e1ce02a0225be8854bfba478e')
|
||||
|
||||
provides('pil')
|
||||
|
||||
extends('python')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
@@ -23,77 +23,108 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class PyPillow(Package):
|
||||
"""Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities."""
|
||||
"""Pillow is a fork of the Python Imaging Library (PIL). It adds image
|
||||
processing capabilities to your Python interpreter. This library supports
|
||||
many file formats, and provides powerful image processing and graphics
|
||||
capabilities."""
|
||||
|
||||
homepage = "https://python-pillow.github.io/"
|
||||
homepage = "https://python-pillow.org/"
|
||||
url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz"
|
||||
|
||||
# TODO: This version should be deleted once the next release comes out.
|
||||
# TODO: It fixes a bug that prevented us from linking to Tk/Tcl.
|
||||
# TODO: Tk/Tcl support is necessary for tkinter bitmap and photo images.
|
||||
# TODO: If you require this support, run the following command:
|
||||
# TODO: `spack install py-pillow@3.3.0.dev0 ^python+tk`
|
||||
version('3.3.0.dev0', git='https://github.com/python-pillow/Pillow.git',
|
||||
commit='30eced62868141a6c859a4370efd40b9434a7c3f')
|
||||
|
||||
version('3.2.0', '7cfd093c11205d9e2ebe3c51dfcad510', preferred=True)
|
||||
version('3.0.0', 'fc8ac44e93da09678eac7e30c9b7377d')
|
||||
provides('PIL')
|
||||
|
||||
provides('pil')
|
||||
|
||||
# These defaults correspond to Pillow defaults
|
||||
variant('jpeg', default=True, description='Provide JPEG functionality')
|
||||
variant('zlib', default=True, description='Access to compressed PNGs')
|
||||
variant('tiff', default=False, description='Access to TIFF files')
|
||||
variant('freetype', default=False, description='Font related services')
|
||||
variant('tk', default=False, description='Support for tkinter bitmap and photo images')
|
||||
variant('lcms', default=False, description='Color management')
|
||||
variant('jpeg2000', default=False, description='Provide JPEG 2000 functionality')
|
||||
|
||||
# Spack does not (yet) support these modes of building
|
||||
# variant('webp', default=False, description='')
|
||||
# variant('webpmux', default=False, description='')
|
||||
# variant('jpeg2000', default=False, description='')
|
||||
# variant('webp', default=False, description='Provide the WebP format')
|
||||
# variant('webpmux', default=False, description='WebP metadata, relies on WebP support') # NOQA: ignore=E501
|
||||
# variant('imagequant', default=False, description='Provide improved color quantization') # NOQA: ignore=E501
|
||||
|
||||
# Required dependencies
|
||||
extends('python')
|
||||
depends_on('binutils')
|
||||
depends_on('py-setuptools')
|
||||
|
||||
depends_on('jpeg', when='+jpeg') # BUG: It will use the system libjpeg anyway
|
||||
# Recommended dependencies
|
||||
depends_on('jpeg', when='+jpeg')
|
||||
depends_on('zlib', when='+zlib')
|
||||
depends_on('tiff', when='+tiff')
|
||||
|
||||
# Optional dependencies
|
||||
depends_on('libtiff', when='+tiff')
|
||||
depends_on('freetype', when='+freetype')
|
||||
depends_on('lcms', when='+lcms')
|
||||
depends_on('tcl', when='+tk')
|
||||
depends_on('tk', when='+tk')
|
||||
depends_on('openjpeg', when='+jpeg2000')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
libpath=[]
|
||||
# Spack does not (yet) support these modes of building
|
||||
# depends_on('webp', when='+webp')
|
||||
# depends_on('webpmux', when='+webpmux')
|
||||
# depends_on('imagequant', when='+imagequant')
|
||||
|
||||
def patch(self):
|
||||
"""Patch setup.py to provide lib and include directories
|
||||
for dependencies."""
|
||||
|
||||
spec = self.spec
|
||||
setup = FileFilter('setup.py')
|
||||
|
||||
if '+jpeg' in spec:
|
||||
libpath.append(join_path(spec['jpeg'].prefix, 'lib'))
|
||||
setup.filter('JPEG_ROOT = None',
|
||||
'JPEG_ROOT = ("{0}", "{1}")'.format(
|
||||
spec['jpeg'].prefix.lib,
|
||||
spec['jpeg'].prefix.include))
|
||||
if '+zlib' in spec:
|
||||
libpath.append(join_path(spec['zlib'].prefix, 'lib'))
|
||||
setup.filter('ZLIB_ROOT = None',
|
||||
'ZLIB_ROOT = ("{0}", "{1}")'.format(
|
||||
spec['zlib'].prefix.lib,
|
||||
spec['zlib'].prefix.include))
|
||||
if '+tiff' in spec:
|
||||
libpath.append(join_path(spec['tiff'].prefix, 'lib'))
|
||||
setup.filter('TIFF_ROOT = None',
|
||||
'TIFF_ROOT = ("{0}", "{1}")'.format(
|
||||
spec['libtiff'].prefix.lib,
|
||||
spec['libtiff'].prefix.include))
|
||||
if '+freetype' in spec:
|
||||
libpath.append(join_path(spec['freetype'].prefix, 'lib'))
|
||||
setup.filter('FREETYPE_ROOT = None',
|
||||
'FREETYPE_ROOT = ("{0}", "{1}")'.format(
|
||||
spec['freetype'].prefix.lib,
|
||||
spec['freetype'].prefix.include))
|
||||
if '+lcms' in spec:
|
||||
libpath.append(join_path(spec['lcms'].prefix, 'lib'))
|
||||
setup.filter('LCMS_ROOT = None',
|
||||
'LCMS_ROOT = ("{0}", "{1}")'.format(
|
||||
spec['lcms'].prefix.lib,
|
||||
spec['lcms'].prefix.include))
|
||||
if '+jpeg2000' in spec:
|
||||
setup.filter('JPEG2K_ROOT = None',
|
||||
'JPEG2K_ROOT = ("{0}", "{1}")'.format(
|
||||
spec['openjpeg'].prefix.lib,
|
||||
spec['openjpeg'].prefix.include))
|
||||
|
||||
# This has not been tested, and likely needs some other treatment.
|
||||
#if '+tk' in spec:
|
||||
# libpath.append(join_path(spec['tcl'].prefix, 'lib'))
|
||||
# libpath.append(join_path(spec['tk'].prefix, 'lib'))
|
||||
def install(self, spec, prefix):
|
||||
def variant_to_flag(variant):
|
||||
able = 'enable' if '+{0}'.format(variant) in spec else 'disable'
|
||||
return '--{0}-{1}'.format(able, variant)
|
||||
|
||||
# -------- Building
|
||||
cmd = ['build_ext',
|
||||
'--%s-jpeg' % ('enable' if '+jpeg' in spec else 'disable'),
|
||||
'--%s-zlib' % ('enable' if '+zlib' in spec else 'disable'),
|
||||
'--%s-tiff' % ('enable' if '+tiff' in spec else 'disable'),
|
||||
'--%s-freetype' % ('enable' if '+freetype' in spec else 'disable'),
|
||||
'--%s-lcms' % ('enable' if '+lcms' in spec else 'disable'),
|
||||
'-L'+':'.join(libpath) # NOTE: This does not make it find libjpeg
|
||||
]
|
||||
variants = ['jpeg', 'zlib', 'tiff', 'freetype', 'lcms', 'jpeg2000']
|
||||
build_args = list(map(variant_to_flag, variants))
|
||||
|
||||
#if '+tk' in spec:
|
||||
# cmd.extend(['--enable-tcl', '--enable-tk'])
|
||||
#else:
|
||||
# cmd.extend(['--disable-tcl', '--disable-tk'])
|
||||
|
||||
# --------- Installation
|
||||
cmd.extend(['install', '--prefix=%s' % prefix])
|
||||
|
||||
python('setup.py', *cmd)
|
||||
python('setup.py', 'build_ext', *build_args)
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))
|
||||
|
38
var/spack/repos/builtin/packages/py-ply/package.py
Normal file
38
var/spack/repos/builtin/packages/py-ply/package.py
Normal file
@@ -0,0 +1,38 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyPly(Package):
|
||||
"""PLY is nothing more than a straightforward lex/yacc implementation."""
|
||||
homepage = "http://www.dabeaz.com/ply"
|
||||
url = "http://www.dabeaz.com/ply/ply-3.8.tar.gz"
|
||||
|
||||
version('3.8', '94726411496c52c87c2b9429b12d5c50')
|
||||
|
||||
extends('python')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
@@ -24,8 +24,11 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyScikitImage(Package):
|
||||
"""Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipulation, object detection, etc."""
|
||||
"""Image processing algorithms for SciPy, including IO, morphology,
|
||||
filtering, warping, color manipulation, object detection, etc."""
|
||||
|
||||
homepage = "http://scikit-image.org/"
|
||||
url = "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.12.3.tar.gz"
|
||||
|
||||
@@ -34,7 +37,7 @@ class PyScikitImage(Package):
|
||||
extends('python', ignore=r'bin/.*\.py$')
|
||||
|
||||
depends_on('py-dask')
|
||||
depends_on('py-pillow')
|
||||
depends_on('pil')
|
||||
depends_on('py-networkx')
|
||||
depends_on('py-six')
|
||||
depends_on('py-scipy')
|
||||
|
51
var/spack/repos/builtin/packages/py-sncosmo/package.py
Normal file
51
var/spack/repos/builtin/packages/py-sncosmo/package.py
Normal file
@@ -0,0 +1,51 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PySncosmo(Package):
|
||||
"""SNCosmo is a Python library for high-level supernova cosmology
|
||||
analysis."""
|
||||
|
||||
homepage = "http://sncosmo.readthedocs.io/"
|
||||
url = "https://pypi.python.org/packages/source/s/sncosmo/sncosmo-1.2.0.tar.gz"
|
||||
|
||||
version('1.2.0', '028e6d1dc84ab1c17d2f3b6378b2cb1e')
|
||||
|
||||
# Required dependencies
|
||||
# py-sncosmo binaries are duplicates of those from py-astropy
|
||||
extends('python', ignore=r'bin/.*')
|
||||
depends_on('py-numpy')
|
||||
depends_on('py-scipy')
|
||||
depends_on('py-astropy')
|
||||
|
||||
# Recommended dependencies
|
||||
depends_on('py-matplotlib')
|
||||
depends_on('py-iminuit')
|
||||
depends_on('py-emcee')
|
||||
depends_on('py-nestle')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))
|
41
var/spack/repos/builtin/packages/py-unittest2/package.py
Normal file
41
var/spack/repos/builtin/packages/py-unittest2/package.py
Normal file
@@ -0,0 +1,41 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyUnittest2(Package):
|
||||
"""unittest2 is a backport of the new features added to the unittest
|
||||
testing framework in Python 2.7 and onwards."""
|
||||
|
||||
homepage = "https://pypi.python.org/pypi/unittest2"
|
||||
url = "https://pypi.python.org/packages/source/u/unittest2/unittest2-1.1.0.tar.gz"
|
||||
|
||||
version('1.1.0', 'f72dae5d44f091df36b6b513305ea000')
|
||||
|
||||
extends('python')
|
||||
depends_on('py-setuptools')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
42
var/spack/repos/builtin/packages/py-unittest2py3k/package.py
Normal file
42
var/spack/repos/builtin/packages/py-unittest2py3k/package.py
Normal file
@@ -0,0 +1,42 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyUnittest2py3k(Package):
|
||||
"""unittest2 is a backport of the new features added to the unittest
|
||||
testing framework in Python 2.7 and 3.2. This is a Python 3 compatible
|
||||
version of unittest2."""
|
||||
|
||||
homepage = "https://pypi.python.org/pypi/unittest2py3k"
|
||||
url = "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-0.5.1.tar.gz"
|
||||
|
||||
version('0.5.1', '8824ff92044310d9365f90d892bf0f09')
|
||||
|
||||
extends('python')
|
||||
depends_on('py-setuptools')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
43
var/spack/repos/builtin/packages/py-wcsaxes/package.py
Normal file
43
var/spack/repos/builtin/packages/py-wcsaxes/package.py
Normal file
@@ -0,0 +1,43 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyWcsaxes(Package):
|
||||
"""WCSAxes is a framework for making plots of Astronomical data
|
||||
in Matplotlib."""
|
||||
|
||||
homepage = "http://wcsaxes.readthedocs.io/en/latest/index.html"
|
||||
url = "https://github.com/astrofrog/wcsaxes/archive/v0.8.tar.gz"
|
||||
|
||||
version('0.8', 'de1c60fdae4c330bf5ddb9f1ab5ab920')
|
||||
|
||||
extends('python', ignore=r'bin/pbr')
|
||||
depends_on('py-numpy')
|
||||
depends_on('py-matplotlib')
|
||||
depends_on('py-astropy')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))
|
@@ -22,9 +22,6 @@
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
import functools
|
||||
import glob
|
||||
import inspect
|
||||
import os
|
||||
import re
|
||||
from contextlib import closing
|
||||
@@ -37,11 +34,10 @@
|
||||
|
||||
class Python(Package):
|
||||
"""The Python programming language."""
|
||||
|
||||
homepage = "http://www.python.org"
|
||||
url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz"
|
||||
|
||||
extendable = True
|
||||
|
||||
version('3.5.1', 'be78e48cdfc1a7ad90efff146dce6cfe')
|
||||
version('3.5.0', 'a56c0c0b45d75a0ec9c6dee933c41c36')
|
||||
version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b', preferred=True)
|
||||
@@ -49,6 +45,8 @@ class Python(Package):
|
||||
version('2.7.9', '5eebcaa0030dc4061156d3429657fb83')
|
||||
version('2.7.8', 'd4bca0159acb0b44a781292b5231936f')
|
||||
|
||||
extendable = True
|
||||
|
||||
depends_on("openssl")
|
||||
depends_on("bzip2")
|
||||
depends_on("readline")
|
||||
@@ -64,39 +62,63 @@ def install(self, spec, prefix):
|
||||
# Rest of install is pretty standard except setup.py needs to
|
||||
# be able to read the CPPFLAGS and LDFLAGS as it scans for the
|
||||
# library and headers to build
|
||||
configure_args= [
|
||||
"--prefix=%s" % prefix,
|
||||
"--with-threads",
|
||||
"--enable-shared",
|
||||
"CPPFLAGS=-I%s/include -I%s/include -I%s/include -I%s/include -I%s/include -I%s/include" % (
|
||||
spec['openssl'].prefix, spec['bzip2'].prefix,
|
||||
spec['readline'].prefix, spec['ncurses'].prefix,
|
||||
spec['sqlite'].prefix, spec['zlib'].prefix),
|
||||
"LDFLAGS=-L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib" % (
|
||||
spec['openssl'].prefix, spec['bzip2'].prefix,
|
||||
spec['readline'].prefix, spec['ncurses'].prefix,
|
||||
spec['sqlite'].prefix, spec['zlib'].prefix)
|
||||
]
|
||||
cppflags = ' -I'.join([
|
||||
spec['openssl'].prefix.include, spec['bzip2'].prefix.include,
|
||||
spec['readline'].prefix.include, spec['ncurses'].prefix.include,
|
||||
spec['sqlite'].prefix.include, spec['zlib'].prefix.include
|
||||
])
|
||||
|
||||
ldflags = ' -L'.join([
|
||||
spec['openssl'].prefix.lib, spec['bzip2'].prefix.lib,
|
||||
spec['readline'].prefix.lib, spec['ncurses'].prefix.lib,
|
||||
spec['sqlite'].prefix.lib, spec['zlib'].prefix.lib
|
||||
])
|
||||
|
||||
config_args = [
|
||||
"--prefix={0}".format(prefix),
|
||||
"--with-threads",
|
||||
"--enable-shared",
|
||||
"CPPFLAGS=-I{0}".format(cppflags),
|
||||
"LDFLAGS=-L{0}".format(ldflags)
|
||||
]
|
||||
|
||||
if spec.satisfies('@3:'):
|
||||
configure_args.append('--without-ensurepip')
|
||||
configure(*configure_args)
|
||||
config_args.append('--without-ensurepip')
|
||||
|
||||
configure(*config_args)
|
||||
|
||||
make()
|
||||
make("install")
|
||||
|
||||
# Modify compiler paths in configuration files. This is necessary for
|
||||
# building site packages outside of spack
|
||||
filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)',
|
||||
(r'\4\5'),
|
||||
join_path(prefix.lib, 'python%d.%d' % self.version[:2], '_sysconfigdata.py'))
|
||||
self.filter_compilers(spec, prefix)
|
||||
|
||||
python3_version = ''
|
||||
def filter_compilers(self, spec, prefix):
|
||||
"""Run after install to tell the configuration files and Makefiles
|
||||
to use the compilers that Spack built the package with.
|
||||
|
||||
If this isn't done, they'll have CC and CXX set to Spack's generic
|
||||
cc and c++. We want them to be bound to whatever compiler
|
||||
they were built with."""
|
||||
|
||||
kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
|
||||
|
||||
dirname = join_path(prefix.lib,
|
||||
'python{0}'.format(self.version.up_to(2)))
|
||||
|
||||
config = 'config'
|
||||
if spec.satisfies('@3:'):
|
||||
python3_version = '-%d.%dm' % self.version[:2]
|
||||
makefile_filepath = join_path(prefix.lib, 'python%d.%d' % self.version[:2], 'config%s' % python3_version, 'Makefile')
|
||||
filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)',
|
||||
(r'\4\5'),
|
||||
makefile_filepath)
|
||||
config = 'config-{0}m'.format(self.version.up_to(2))
|
||||
|
||||
files = [
|
||||
'_sysconfigdata.py',
|
||||
join_path(config, 'Makefile')
|
||||
]
|
||||
|
||||
for filename in files:
|
||||
filter_file(env['CC'], self.compiler.cc,
|
||||
join_path(dirname, filename), **kwargs)
|
||||
filter_file(env['CXX'], self.compiler.cxx,
|
||||
join_path(dirname, filename), **kwargs)
|
||||
|
||||
# ========================================================================
|
||||
# Set up environment to make install easy for python extensions.
|
||||
@@ -104,57 +126,59 @@ def install(self, spec, prefix):
|
||||
|
||||
@property
|
||||
def python_lib_dir(self):
|
||||
return os.path.join('lib', 'python%d.%d' % self.version[:2])
|
||||
|
||||
return join_path('lib', 'python{0}'.format(self.version.up_to(2)))
|
||||
|
||||
@property
|
||||
def python_include_dir(self):
|
||||
return os.path.join('include', 'python%d.%d' % self.version[:2])
|
||||
|
||||
return join_path('include', 'python{0}'.format(self.version.up_to(2)))
|
||||
|
||||
@property
|
||||
def site_packages_dir(self):
|
||||
return os.path.join(self.python_lib_dir, 'site-packages')
|
||||
|
||||
return join_path(self.python_lib_dir, 'site-packages')
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
|
||||
# TODO: do this only for actual extensions.
|
||||
"""Set PYTHONPATH to include site-packages dir for the
|
||||
extension and any other python extensions it depends on."""
|
||||
|
||||
# Set PYTHONPATH to include site-packages dir for the
|
||||
# extension and any other python extensions it depends on.
|
||||
python_paths = []
|
||||
for d in extension_spec.traverse():
|
||||
if d.package.extends(self.spec):
|
||||
python_paths.append(os.path.join(d.prefix, self.site_packages_dir))
|
||||
python_paths.append(join_path(d.prefix,
|
||||
self.site_packages_dir))
|
||||
|
||||
pythonpath = ':'.join(python_paths)
|
||||
spack_env.set('PYTHONPATH', pythonpath)
|
||||
|
||||
# For run time environment set only the path for extension_spec and prepend it to 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))
|
||||
|
||||
run_env.prepend_path('PYTHONPATH', join_path(
|
||||
extension_spec.prefix, self.site_packages_dir))
|
||||
|
||||
def setup_dependent_package(self, module, ext_spec):
|
||||
"""
|
||||
Called before python modules' install() methods.
|
||||
"""Called before python modules' install() methods.
|
||||
|
||||
In most cases, extensions will only need to have one line::
|
||||
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
"""
|
||||
python('setup.py', 'install', '--prefix={0}'.format(prefix))"""
|
||||
|
||||
# Python extension builds can have a global python executable function
|
||||
if self.version >= Version("3.0.0") and self.version < Version("4.0.0"):
|
||||
module.python = Executable(join_path(self.spec.prefix.bin, 'python3'))
|
||||
if Version("3.0.0") <= self.version < Version("4.0.0"):
|
||||
module.python = Executable(join_path(self.spec.prefix.bin,
|
||||
'python3'))
|
||||
else:
|
||||
module.python = Executable(join_path(self.spec.prefix.bin, 'python'))
|
||||
module.python = Executable(join_path(self.spec.prefix.bin,
|
||||
'python'))
|
||||
|
||||
# Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs.
|
||||
module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir)
|
||||
module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir)
|
||||
module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir)
|
||||
module.python_lib_dir = join_path(ext_spec.prefix,
|
||||
self.python_lib_dir)
|
||||
module.python_include_dir = join_path(ext_spec.prefix,
|
||||
self.python_include_dir)
|
||||
module.site_packages_dir = join_path(ext_spec.prefix,
|
||||
self.site_packages_dir)
|
||||
|
||||
# Make the site packages directory for extensions, if it does not exist already.
|
||||
# Make the site packages directory for extensions
|
||||
if ext_spec.package.is_extension:
|
||||
mkdirp(module.site_packages_dir)
|
||||
|
||||
@@ -167,25 +191,30 @@ def python_ignore(self, ext_pkg, args):
|
||||
ignore_arg = args.get('ignore', lambda f: False)
|
||||
|
||||
# Always ignore easy-install.pth, as it needs to be merged.
|
||||
patterns = [r'easy-install\.pth$']
|
||||
patterns = [r'site-packages/easy-install\.pth$']
|
||||
|
||||
# Ignore pieces of setuptools installed by other packages.
|
||||
# Must include directory name or it will remove all site*.py files.
|
||||
if ext_pkg.name != 'py-setuptools':
|
||||
patterns.append(r'/site[^/]*\.pyc?$')
|
||||
patterns.append(r'setuptools\.pth')
|
||||
patterns.append(r'bin/easy_install[^/]*$')
|
||||
patterns.append(r'setuptools.*egg$')
|
||||
patterns.extend([
|
||||
r'bin/easy_install[^/]*$',
|
||||
r'site-packages/setuptools[^/]*\.egg$',
|
||||
r'site-packages/setuptools\.pth$',
|
||||
r'site-packages/site[^/]*\.pyc?$',
|
||||
r'site-packages/__pycache__/site[^/]*\.pyc?$'
|
||||
])
|
||||
if ext_pkg.name != 'py-pygments':
|
||||
patterns.append(r'bin/pygmentize$')
|
||||
if ext_pkg.name != 'py-numpy':
|
||||
patterns.append(r'bin/f2py$')
|
||||
patterns.append(r'bin/f2py3?$')
|
||||
|
||||
return match_predicate(ignore_arg, patterns)
|
||||
|
||||
|
||||
def write_easy_install_pth(self, exts):
|
||||
paths = []
|
||||
for ext in sorted(exts.values()):
|
||||
ext_site_packages = os.path.join(ext.prefix, self.site_packages_dir)
|
||||
easy_pth = "%s/easy-install.pth" % ext_site_packages
|
||||
ext_site_packages = join_path(ext.prefix, self.site_packages_dir)
|
||||
easy_pth = join_path(ext_site_packages, "easy-install.pth")
|
||||
|
||||
if not os.path.isfile(easy_pth):
|
||||
continue
|
||||
@@ -195,15 +224,18 @@ def write_easy_install_pth(self, exts):
|
||||
line = line.rstrip()
|
||||
|
||||
# Skip lines matching these criteria
|
||||
if not line: continue
|
||||
if re.search(r'^(import|#)', line): continue
|
||||
if (ext.name != 'py-setuptools' and
|
||||
re.search(r'setuptools.*egg$', line)): continue
|
||||
if not line:
|
||||
continue
|
||||
if re.search(r'^(import|#)', line):
|
||||
continue
|
||||
if ((ext.name != 'py-setuptools' and
|
||||
re.search(r'setuptools.*egg$', line))):
|
||||
continue
|
||||
|
||||
paths.append(line)
|
||||
|
||||
site_packages = os.path.join(self.prefix, self.site_packages_dir)
|
||||
main_pth = "%s/easy-install.pth" % site_packages
|
||||
site_packages = join_path(self.prefix, self.site_packages_dir)
|
||||
main_pth = join_path(site_packages, "easy-install.pth")
|
||||
|
||||
if not paths:
|
||||
if os.path.isfile(main_pth):
|
||||
@@ -211,15 +243,22 @@ def write_easy_install_pth(self, exts):
|
||||
|
||||
else:
|
||||
with closing(open(main_pth, 'w')) as f:
|
||||
f.write("import sys; sys.__plen = len(sys.path)\n")
|
||||
f.write("""
|
||||
import sys
|
||||
sys.__plen = len(sys.path)
|
||||
""")
|
||||
for path in paths:
|
||||
f.write("%s\n" % path)
|
||||
f.write("import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; "
|
||||
"p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)\n")
|
||||
|
||||
f.write("{0}\n".format(path))
|
||||
f.write("""
|
||||
new = sys.path[sys.__plen:]
|
||||
del sys.path[sys.__plen:]
|
||||
p = getattr(sys, '__egginsert', 0)
|
||||
sys.path[p:p] = new
|
||||
sys.__egginsert = p + len(new)
|
||||
""")
|
||||
|
||||
def activate(self, ext_pkg, **args):
|
||||
ignore=self.python_ignore(ext_pkg, args)
|
||||
ignore = self.python_ignore(ext_pkg, args)
|
||||
args.update(ignore=ignore)
|
||||
|
||||
super(Python, self).activate(ext_pkg, **args)
|
||||
@@ -228,12 +267,12 @@ def activate(self, ext_pkg, **args):
|
||||
exts[ext_pkg.name] = ext_pkg.spec
|
||||
self.write_easy_install_pth(exts)
|
||||
|
||||
|
||||
def deactivate(self, ext_pkg, **args):
|
||||
args.update(ignore=self.python_ignore(ext_pkg, args))
|
||||
super(Python, self).deactivate(ext_pkg, **args)
|
||||
|
||||
exts = spack.install_layout.extension_map(self.spec)
|
||||
if ext_pkg.name in exts: # Make deactivate idempotent.
|
||||
# Make deactivate idempotent
|
||||
if ext_pkg.name in exts:
|
||||
del exts[ext_pkg.name]
|
||||
self.write_easy_install_pth(exts)
|
||||
|
@@ -24,15 +24,33 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RBiocgenerics(Package):
|
||||
"""S4 generic functions needed by many Bioconductor packages."""
|
||||
|
||||
homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html'
|
||||
url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz"
|
||||
|
||||
version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False)
|
||||
homepage = 'https://bioconductor.org/packages/BiocGenerics/'
|
||||
version('bioc-3.3',
|
||||
git='https://github.com/Bioconductor-mirror/BiocGenerics.git',
|
||||
branch='release-3.3')
|
||||
version('bioc-3.2',
|
||||
git='https://github.com/Bioconductor-mirror/BiocGenerics.git',
|
||||
branch='release-3.2')
|
||||
|
||||
extends('R')
|
||||
|
||||
def validate(self, spec):
|
||||
"""
|
||||
Checks that the version of R is appropriate for the Bioconductor
|
||||
version.
|
||||
"""
|
||||
if spec.satisfies('@bioc-3.3'):
|
||||
if not spec.satisfies('^R@3.3.0:3.3.9'):
|
||||
raise InstallError('Must use R-3.3 for Bioconductor-3.3')
|
||||
elif spec.satisfies('@bioc-3.2'):
|
||||
if not spec.satisfies('^R@3.2.0:3.2.9'):
|
||||
raise InstallError('Must use R-3.2 for Bioconductor-3.2')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
||||
self.validate(spec)
|
||||
R('CMD', 'INSTALL', '--library=%s' %
|
||||
self.module.r_lib_dir, '%s' % self.stage.source_path)
|
||||
|
46
var/spack/repos/builtin/packages/r-R6/package.py
Normal file
46
var/spack/repos/builtin/packages/r-R6/package.py
Normal file
@@ -0,0 +1,46 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RR6(Package):
|
||||
"""The R6 package allows the creation of classes with reference semantics,
|
||||
similar to R's built-in reference classes. Compared to reference classes,
|
||||
R6 classes are simpler and lighter-weight, and they are not built on S4
|
||||
classes so they do not require the methods package. These classes allow
|
||||
public and private members, and they support inheritance, even when the
|
||||
classes are defined in different packages."""
|
||||
|
||||
homepage = "https://github.com/wch/R6/"
|
||||
url = "https://cran.r-project.org/src/contrib/R6_2.1.2.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/R6"
|
||||
|
||||
version('2.1.2', 'b6afb9430e48707be87638675390e457')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RAbind(Package):
|
||||
"""Combine multidimensional arrays into a single array. This is a
|
||||
generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and
|
||||
@@ -32,11 +33,12 @@ class RAbind(Package):
|
||||
|
||||
homepage = "https://cran.r-project.org/"
|
||||
url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/abind"
|
||||
|
||||
version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False)
|
||||
version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
||||
|
51
var/spack/repos/builtin/packages/r-curl/package.py
Normal file
51
var/spack/repos/builtin/packages/r-curl/package.py
Normal file
@@ -0,0 +1,51 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RCurl(Package):
|
||||
"""The curl() and curl_download() functions provide highly configurable
|
||||
drop-in replacements for base url() and download.file() with better
|
||||
performance, support for encryption (https, ftps), gzip compression,
|
||||
authentication, and other libcurl goodies. The core of the package
|
||||
implements a framework for performing fully customized requests where data
|
||||
can be processed either in memory, on disk, or streaming via the callback
|
||||
or connection interfaces. Some knowledge of libcurl is recommended; for a
|
||||
more-user-friendly web client see the 'httr' package which builds on this
|
||||
package with http specific tools and logic."""
|
||||
|
||||
homepage = "https://github.com/jeroenooms/curl"
|
||||
url = "https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/RCurl"
|
||||
|
||||
version('0.9.7', 'a101f7de948cb828fef571c730f39217')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('curl')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
43
var/spack/repos/builtin/packages/r-dbi/package.py
Normal file
43
var/spack/repos/builtin/packages/r-dbi/package.py
Normal file
@@ -0,0 +1,43 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RDbi(Package):
|
||||
"""A database interface definition for communication between R and
|
||||
relational database management systems. All classes in this package are
|
||||
virtual and need to be extended by the various R/DBMS implementations."""
|
||||
|
||||
homepage = "https://github.com/rstats-db/DBI"
|
||||
url = "https://cran.r-project.org/src/contrib/DBI_0.4-1.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/DBI"
|
||||
|
||||
version('0.4-1', 'c7ee8f1c5037c2284e99c62698d0f087')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
50
var/spack/repos/builtin/packages/r-devtools/package.py
Normal file
50
var/spack/repos/builtin/packages/r-devtools/package.py
Normal file
@@ -0,0 +1,50 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RDevtools(Package):
|
||||
"""Collection of package development tools."""
|
||||
|
||||
homepage = "https://github.com/hadley/devtools"
|
||||
url = "https://cran.r-project.org/src/contrib/devtools_1.11.1.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/devtools"
|
||||
|
||||
version('1.11.1', '242672ee27d24dddcbdaac88c586b6c2')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-httr')
|
||||
depends_on('r-memoise')
|
||||
depends_on('r-whisker')
|
||||
depends_on('r-digest')
|
||||
depends_on('r-rstudioapi')
|
||||
depends_on('r-jsonlite')
|
||||
depends_on('r-git2r')
|
||||
depends_on('r-withr')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
56
var/spack/repos/builtin/packages/r-digest/package.py
Normal file
56
var/spack/repos/builtin/packages/r-digest/package.py
Normal file
@@ -0,0 +1,56 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RDigest(Package):
|
||||
"""Implementation of a function 'digest()' for the creation of hash digests
|
||||
of arbitrary R objects (using the md5, sha-1, sha-256, crc32, xxhash and
|
||||
murmurhash algorithms) permitting easy comparison of R language objects, as
|
||||
well as a function 'hmac()' to create hash-based message authentication
|
||||
code. The md5 algorithm by Ron Rivest is specified in RFC 1321, the sha-1
|
||||
and sha-256 algorithms are specified in FIPS-180-1 and FIPS-180-2, and the
|
||||
crc32 algorithm is described in
|
||||
ftp://ftp.rocksoft.com/cliens/rocksoft/papers/crc_v3.txt. For md5, sha-1,
|
||||
sha-256 and aes, this package uses small standalone implementations that
|
||||
were provided by Christophe Devine. For crc32, code from the zlib library
|
||||
is used. For sha-512, an implementation by Aaron D. Gifford is used. For
|
||||
xxhash, the implementation by Yann Collet is used. For murmurhash, an
|
||||
implementation by Shane Day is used. Please note that this package is not
|
||||
meant to be deployed for cryptographic purposes for which more
|
||||
comprehensive (and widely tested) libraries such as OpenSSL should be
|
||||
used."""
|
||||
|
||||
homepage = "http://dirk.eddelbuettel.com/code/digest.html"
|
||||
url = "https://cran.r-project.org/src/contrib/digest_0.6.9.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/digest"
|
||||
|
||||
version('0.6.9', '48048ce6c466bdb124716e45ba4a0e83')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RFilehash(Package):
|
||||
"""Implements a simple key-value style database where character string keys
|
||||
are associated with data values that are stored on the disk. A simple
|
||||
@@ -37,10 +38,12 @@ class RFilehash(Package):
|
||||
|
||||
homepage = 'https://cran.r-project.org/'
|
||||
url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/filehash"
|
||||
|
||||
version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False)
|
||||
version('2.3', '01fffafe09b148ccadc9814c103bdc2f')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
||||
|
43
var/spack/repos/builtin/packages/r-foreign/package.py
Normal file
43
var/spack/repos/builtin/packages/r-foreign/package.py
Normal file
@@ -0,0 +1,43 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RForeign(Package):
|
||||
"""Functions for reading and writing data stored by some versions of Epi
|
||||
Info, Minitab, S, SAS, SPSS, Stata, Systat and Weka and for reading and
|
||||
writing some dBase files."""
|
||||
|
||||
homepage = "https://cran.r-project.org/web/packages/foreign/index.html"
|
||||
url = "https://cran.r-project.org/src/contrib/foreign_0.8-66.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/foreign"
|
||||
|
||||
version('0.8-66', 'ff12190f4631dca31e30ca786c2c8f62')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
46
var/spack/repos/builtin/packages/r-git2r/package.py
Normal file
46
var/spack/repos/builtin/packages/r-git2r/package.py
Normal file
@@ -0,0 +1,46 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RGit2r(Package):
|
||||
"""Interface to the 'libgit2' library, which is a pure C implementation of
|
||||
the 'Git' core methods. Provides access to 'Git' repositories to extract
|
||||
data and running some basic 'Git' commands."""
|
||||
|
||||
homepage = "https://github.com/ropensci/git2r"
|
||||
url = "https://cran.r-project.org/src/contrib/git2r_0.15.0.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/git2r"
|
||||
|
||||
version('0.15.0', '57658b3298f9b9aadc0dd77b4ef6a1e1')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('zlib')
|
||||
depends_on('openssl')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
49
var/spack/repos/builtin/packages/r-httr/package.py
Normal file
49
var/spack/repos/builtin/packages/r-httr/package.py
Normal file
@@ -0,0 +1,49 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RHttr(Package):
|
||||
"""Useful tools for working with HTTP organised by HTTP verbs (GET(),
|
||||
POST(), etc). Configuration functions make it easy to control additional
|
||||
request components (authenticate(), add_headers() and so on)."""
|
||||
|
||||
homepage = "https://github.com/hadley/httr"
|
||||
url = "https://cran.r-project.org/src/contrib/httr_1.1.0.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/httr"
|
||||
|
||||
version('1.1.0', '5ffbbc5c2529e49f00aaa521a2b35600')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-jsonlite')
|
||||
depends_on('r-mime')
|
||||
depends_on('r-curl')
|
||||
depends_on('r-openssl')
|
||||
depends_on('r-R6')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
50
var/spack/repos/builtin/packages/r-jsonlite/package.py
Normal file
50
var/spack/repos/builtin/packages/r-jsonlite/package.py
Normal file
@@ -0,0 +1,50 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RJsonlite(Package):
|
||||
"""A fast JSON parser and generator optimized for statistical data and the
|
||||
web. Started out as a fork of 'RJSONIO', but has been completely rewritten
|
||||
in recent versions. The package offers flexible, robust, high performance
|
||||
tools for working with JSON in R and is particularly powerful for building
|
||||
pipelines and interacting with a web API. The implementation is based on
|
||||
the mapping described in the vignette (Ooms, 2014). In addition to
|
||||
converting JSON data from/to R objects, 'jsonlite' contains functions to
|
||||
stream, validate, and prettify JSON data. The unit tests included with the
|
||||
package verify that all edge cases are encoded and decoded consistently for
|
||||
use with dynamic data in systems and applications."""
|
||||
|
||||
homepage = "https://github.com/jeroenooms/jsonlite"
|
||||
url = "https://cran.r-project.org/src/contrib/jsonlite_0.9.21.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/jsonlite"
|
||||
|
||||
version('0.9.21', '4fc382747f88a79ff0718a0d06bed45d')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
@@ -24,6 +24,7 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RMagic(Package):
|
||||
"""A collection of efficient, vectorized algorithms for the creation and
|
||||
investigation of magic squares and hypercubes, including a variety of
|
||||
@@ -32,12 +33,14 @@ class RMagic(Package):
|
||||
|
||||
homepage = "https://cran.r-project.org/"
|
||||
url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/magic"
|
||||
|
||||
version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False)
|
||||
version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-abind')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
||||
|
44
var/spack/repos/builtin/packages/r-memoise/package.py
Normal file
44
var/spack/repos/builtin/packages/r-memoise/package.py
Normal file
@@ -0,0 +1,44 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RMemoise(Package):
|
||||
"""Cache the results of a function so that when you call it again with the
|
||||
same arguments it returns the pre-computed value."""
|
||||
|
||||
homepage = "https://github.com/hadley/memoise"
|
||||
url = "https://cran.r-project.org/src/contrib/memoise_1.0.0.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/memoise"
|
||||
|
||||
version('1.0.0', 'd31145292e2a88ae9a504cab1602e4ac')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-digest')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
42
var/spack/repos/builtin/packages/r-mime/package.py
Normal file
42
var/spack/repos/builtin/packages/r-mime/package.py
Normal file
@@ -0,0 +1,42 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RMime(Package):
|
||||
"""Guesses the MIME type from a filename extension using the data derived
|
||||
from /etc/mime.types in UNIX-type systems."""
|
||||
|
||||
homepage = "https://github.com/yihui/mime"
|
||||
url = "https://cran.r-project.org/src/contrib/mime_0.4.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/mime"
|
||||
|
||||
version('0.4', '789cb33e41db2206c6fc7c3e9fbc2c02')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
52
var/spack/repos/builtin/packages/r-openssl/package.py
Normal file
52
var/spack/repos/builtin/packages/r-openssl/package.py
Normal file
@@ -0,0 +1,52 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class ROpenssl(Package):
|
||||
"""Bindings to OpenSSL libssl and libcrypto, plus custom SSH pubkey
|
||||
parsers. Supports RSA, DSA and EC curves P-256, P-384 and P-521.
|
||||
Cryptographic signatures can either be created and verified manually or via
|
||||
x509 certificates. AES can be used in cbc, ctr or gcm mode for symmetric
|
||||
encryption; RSA for asymmetric (public key) encryption or EC for Diffie
|
||||
Hellman. High-level envelope functions combine RSA and AES for encrypting
|
||||
arbitrary sized data. Other utilities include key generators, hash
|
||||
functions (md5, sha1, sha256, etc), base64 encoder, a secure random number
|
||||
generator, and 'bignum' math methods for manually performing crypto
|
||||
calculations on large multibyte integers."""
|
||||
|
||||
homepage = "https://github.com/jeroenooms/openssl#readme"
|
||||
url = "https://cran.r-project.org/src/contrib/openssl_0.9.4.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/openssl"
|
||||
|
||||
version('0.9.4', '82a890e71ed0e74499878bedacfb8ccb')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('openssl')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
42
var/spack/repos/builtin/packages/r-packrat/package.py
Normal file
42
var/spack/repos/builtin/packages/r-packrat/package.py
Normal file
@@ -0,0 +1,42 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RPackrat(Package):
|
||||
"""Manage the R packages your project depends on in an isolated, portable,
|
||||
and reproducible way."""
|
||||
|
||||
homepage = "https://github.com/rstudio/packrat/"
|
||||
url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/packrat"
|
||||
|
||||
version('0.4.7-1', '80c2413269b292ade163a70ba5053e84')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
42
var/spack/repos/builtin/packages/r-rjava/package.py
Normal file
42
var/spack/repos/builtin/packages/r-rjava/package.py
Normal file
@@ -0,0 +1,42 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RRjava(Package):
|
||||
"""Low-level interface to Java VM very much like .C/.Call and friends.
|
||||
Allows creation of objects, calling methods and accessing fields."""
|
||||
|
||||
homepage = "http://www.rforge.net/rJava/"
|
||||
url = "https://cran.r-project.org/src/contrib/rJava_0.9-8.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/rJava"
|
||||
|
||||
version('0.9-8', '51ae0d690ceed056ebe7c4be71fc6c7a')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
44
var/spack/repos/builtin/packages/r-rmysql/package.py
Normal file
44
var/spack/repos/builtin/packages/r-rmysql/package.py
Normal file
@@ -0,0 +1,44 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RRmysql(Package):
|
||||
"""Implements 'DBI' Interface to 'MySQL' and 'MariaDB' Databases."""
|
||||
|
||||
homepage = "https://github.com/rstats-db/rmysql"
|
||||
url = "https://cran.r-project.org/src/contrib/RMySQL_0.10.9.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/RMySQL"
|
||||
|
||||
version('0.10.9', '3628200a1864ac3005cfd55cc7cde17a')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-DBI')
|
||||
depends_on('mariadb')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
43
var/spack/repos/builtin/packages/r-rodbc/package.py
Normal file
43
var/spack/repos/builtin/packages/r-rodbc/package.py
Normal file
@@ -0,0 +1,43 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RRodbc(Package):
|
||||
"""An ODBC database interface."""
|
||||
|
||||
homepage = "https://cran.rstudio.com/web/packages/RODBC/"
|
||||
url = "https://cran.rstudio.com/src/contrib/RODBC_1.3-13.tar.gz"
|
||||
list_url = "https://cran.rstudio.com/src/contrib/Archive/RODBC"
|
||||
|
||||
version('1.3-13', 'c52ef9139c2ed85adc53ad6effa7d68e')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('unixODBC')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
52
var/spack/repos/builtin/packages/r-rpostgresql/package.py
Normal file
52
var/spack/repos/builtin/packages/r-rpostgresql/package.py
Normal file
@@ -0,0 +1,52 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RRpostgresql(Package):
|
||||
"""Database interface and PostgreSQL driver for R This package provides a
|
||||
Database Interface (DBI) compliant driver for R to access PostgreSQL
|
||||
database systems. In order to build and install this package from source,
|
||||
PostgreSQL itself must be present your system to provide PostgreSQL
|
||||
functionality via its libraries and header files. These files are provided
|
||||
as postgresql-devel package under some Linux distributions. On Microsoft
|
||||
Windows system the attached libpq library source will be used. A wiki and
|
||||
issue tracking system for the package are available at Google Code at
|
||||
https://code.google.com/p/rpostgresql/."""
|
||||
|
||||
homepage = "https://code.google.com/p/rpostgresql/"
|
||||
url = "https://cran.r-project.org/src/contrib/RPostgreSQL_0.4-1.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/RPostgreSQL"
|
||||
|
||||
version('0.4-1', 'e7b22e212afbb2cbb88bab937f93e55a')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-DBI')
|
||||
depends_on('postgresql')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
45
var/spack/repos/builtin/packages/r-rsqlite/package.py
Normal file
45
var/spack/repos/builtin/packages/r-rsqlite/package.py
Normal file
@@ -0,0 +1,45 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RRsqlite(Package):
|
||||
"""This package embeds the SQLite database engine in R and provides an
|
||||
interface compliant with the DBI package. The source for the SQLite engine
|
||||
(version 3.8.6) is included."""
|
||||
|
||||
homepage = "https://github.com/rstats-db/RSQLite"
|
||||
url = "https://cran.r-project.org/src/contrib/RSQLite_1.0.0.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/RSQLite"
|
||||
|
||||
version('1.0.0', 'e6cbe2709612b687c13a10d30c7bad45')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-DBI')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
42
var/spack/repos/builtin/packages/r-rstudioapi/package.py
Normal file
42
var/spack/repos/builtin/packages/r-rstudioapi/package.py
Normal file
@@ -0,0 +1,42 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RRstudioapi(Package):
|
||||
"""Access the RStudio API (if available) and provide informative error
|
||||
messages when it's not."""
|
||||
|
||||
homepage = "https://cran.r-project.org/web/packages/rstudioapi/index.html"
|
||||
url = "https://cran.r-project.org/src/contrib/rstudioapi_0.5.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/rstudioapi"
|
||||
|
||||
version('0.5', '6ce1191da74e7bcbf06b61339486b3ba')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
42
var/spack/repos/builtin/packages/r-whisker/package.py
Normal file
42
var/spack/repos/builtin/packages/r-whisker/package.py
Normal file
@@ -0,0 +1,42 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RWhisker(Package):
|
||||
"""logicless templating, reuse templates in many programming languages
|
||||
including R"""
|
||||
|
||||
homepage = "http://github.com/edwindj/whisker"
|
||||
url = "https://cran.r-project.org/src/contrib/whisker_0.3-2.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/whisker"
|
||||
|
||||
version('0.3-2', 'c4b9bf9a22e69ce003fe68663ab5e8e6')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
44
var/spack/repos/builtin/packages/r-withr/package.py
Normal file
44
var/spack/repos/builtin/packages/r-withr/package.py
Normal file
@@ -0,0 +1,44 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RWithr(Package):
|
||||
"""A set of functions to run code 'with' safely and temporarily modified
|
||||
global state. Many of these functions were originally a part of the
|
||||
'devtools' package, this provides a simple package with limited
|
||||
dependencies to provide access to these functions."""
|
||||
|
||||
homepage = "http://github.com/jimhester/withr"
|
||||
url = "https://cran.r-project.org/src/contrib/withr_1.0.1.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/withr"
|
||||
|
||||
version('1.0.1', 'ac38af2c6f74027c9592dd8f0acb7598')
|
||||
|
||||
extends('R')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
45
var/spack/repos/builtin/packages/r-xlconnect/package.py
Normal file
45
var/spack/repos/builtin/packages/r-xlconnect/package.py
Normal file
@@ -0,0 +1,45 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RXlconnect(Package):
|
||||
"""Provides comprehensive functionality to read, write and format Excel
|
||||
data."""
|
||||
|
||||
homepage = "http://miraisolutions.wordpress.com/"
|
||||
url = "https://cran.r-project.org/src/contrib/XLConnect_0.2-11.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnect"
|
||||
|
||||
version('0.2-11', '9d1769a103cda05665df399cc335017d')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-XLConnectJars')
|
||||
depends_on('r-rJava')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
43
var/spack/repos/builtin/packages/r-xlconnectjars/package.py
Normal file
43
var/spack/repos/builtin/packages/r-xlconnectjars/package.py
Normal file
@@ -0,0 +1,43 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RXlconnectjars(Package):
|
||||
"""Provides external JAR dependencies for the XLConnect package."""
|
||||
|
||||
homepage = "http://miraisolutions.wordpress.com/"
|
||||
url = "https://cran.r-project.org/src/contrib/XLConnectJars_0.2-9.tar.gz"
|
||||
list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnectJars"
|
||||
|
||||
version('0.2-9', 'e6d6b1acfede26acaa616ee421bd30fb')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-rJava')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
45
var/spack/repos/builtin/packages/r-xlsx/package.py
Normal file
45
var/spack/repos/builtin/packages/r-xlsx/package.py
Normal file
@@ -0,0 +1,45 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RXlsx(Package):
|
||||
"""Provide R functions to read/write/format Excel 2007 and Excel
|
||||
97/2000/XP/2003 file formats."""
|
||||
|
||||
homepage = "http://code.google.com/p/rexcel/"
|
||||
url = "https://cran.rstudio.com/src/contrib/xlsx_0.5.7.tar.gz"
|
||||
list_url = "https://cran.rstudio.com/src/contrib/Archive/xlsx"
|
||||
|
||||
version('0.5.7', '36b1b16f29c54b6089b1dae923180dd5')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-rJava')
|
||||
depends_on('r-xlsxjars')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
44
var/spack/repos/builtin/packages/r-xlsxjars/package.py
Normal file
44
var/spack/repos/builtin/packages/r-xlsxjars/package.py
Normal file
@@ -0,0 +1,44 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class RXlsxjars(Package):
|
||||
"""The xlsxjars package collects all the external jars required for the
|
||||
xlxs package. This release corresponds to POI 3.10.1."""
|
||||
|
||||
homepage = "https://cran.rstudio.com/web/packages/xlsxjars/index.html"
|
||||
url = "https://cran.rstudio.com/src/contrib/xlsxjars_0.6.1.tar.gz"
|
||||
list_url = "https://cran.rstudio.com/src/contrib/Archive/xlsxjars"
|
||||
|
||||
version('0.6.1', '5a1721d5733cb42f3a29e3f353e39166')
|
||||
|
||||
extends('R')
|
||||
|
||||
depends_on('r-rJava')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
|
||||
self.stage.source_path)
|
@@ -24,28 +24,32 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
|
||||
class Serf(Package):
|
||||
"""Apache Serf - a high performance C-based HTTP client library built upon the Apache Portable Runtime (APR) library"""
|
||||
"""Apache Serf - a high performance C-based HTTP client library
|
||||
built upon the Apache Portable Runtime (APR) library"""
|
||||
|
||||
homepage = 'https://serf.apache.org/'
|
||||
url = 'https://archive.apache.org/dist/serf/serf-1.3.8.tar.bz2'
|
||||
|
||||
version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446')
|
||||
version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446')
|
||||
|
||||
depends_on('apr')
|
||||
depends_on('apr-util')
|
||||
depends_on('scons')
|
||||
depends_on('expat')
|
||||
depends_on('openssl')
|
||||
depends_on('zlib')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
scons = which("scons")
|
||||
|
||||
options = ['PREFIX=%s' % prefix]
|
||||
options.append('APR=%s' % spec['apr'].prefix)
|
||||
options.append('APU=%s' % spec['apr-util'].prefix)
|
||||
options.append('OPENSSL=%s' % spec['openssl'].prefix)
|
||||
options.append('LINKFLAGS=-L%s/lib' % spec['expat'].prefix)
|
||||
options.append('CPPFLAGS=-I%s/include' % spec['expat'].prefix)
|
||||
options.append('LINKFLAGS=-L%s/lib -L%s/lib' %
|
||||
(spec['expat'].prefix, spec['zlib'].prefix))
|
||||
options.append('CPPFLAGS=-I%s/include -I%s/include' %
|
||||
(spec['expat'].prefix, spec['zlib'].prefix))
|
||||
|
||||
scons(*options)
|
||||
scons('install')
|
||||
|
@@ -34,13 +34,16 @@ class Slepc(Package):
|
||||
homepage = "http://www.grycap.upv.es/slepc"
|
||||
url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz"
|
||||
|
||||
version('3.7.1', '670216f263e3074b21e0623c01bc0f562fdc0bffcd7bd42dd5d8edbe73a532c2')
|
||||
version('3.6.3', '384939d009546db37bc05ed81260c8b5ba451093bf891391d32eb7109ccff876')
|
||||
version('3.6.2', '2ab4311bed26ccf7771818665991b2ea3a9b15f97e29fd13911ab1293e8e65df')
|
||||
|
||||
variant('arpack', default=False, description='Enables Arpack wrappers')
|
||||
variant('arpack', default=True, description='Enables Arpack wrappers')
|
||||
|
||||
depends_on('petsc')
|
||||
depends_on('arpack-ng~mpi',when='+arpack^petsc~mpi')
|
||||
depends_on('arpack-ng+mpi',when='+arpack^petsc+mpi')
|
||||
depends_on('petsc@3.7:', when='@3.7.1:')
|
||||
depends_on('petsc@3.6.3:3.6.4', when='@3.6.2:3.6.3')
|
||||
depends_on('arpack-ng~mpi', when='+arpack^petsc~mpi')
|
||||
depends_on('arpack-ng+mpi', when='+arpack^petsc+mpi')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# set SLEPC_DIR for installation
|
||||
@@ -64,7 +67,7 @@ def install(self, spec, prefix):
|
||||
configure('--prefix=%s' % prefix, *options)
|
||||
|
||||
make('MAKE_NP=%s' % make_jobs, parallel=False)
|
||||
#FIXME:
|
||||
# FIXME:
|
||||
# make('test')
|
||||
make('install')
|
||||
|
||||
|
@@ -23,17 +23,151 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Sundials(Package):
|
||||
"""SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)"""
|
||||
"""SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation
|
||||
Solvers)"""
|
||||
|
||||
homepage = "http://computation.llnl.gov/casc/sundials/"
|
||||
url = "http://computation.llnl.gov/casc/sundials/download/code/sundials-2.5.0.tar.gz"
|
||||
url = "http://computation.llnl.gov/projects/sundials-suite-nonlinear-differential-algebraic-equation-solvers/download/sundials-2.6.2.tar.gz"
|
||||
|
||||
version('2.5.0', 'aba8b56eec600de3109cfb967aa3ba0f')
|
||||
version('2.6.2', '3deeb0ede9f514184c6bd83ecab77d95')
|
||||
|
||||
depends_on("mpi")
|
||||
variant('mpi', default=True, description='Enable MPI support')
|
||||
variant('lapack', default=True, description='Build with external BLAS/LAPACK libraries')
|
||||
variant('klu', default=False, description='Build with SuiteSparse KLU libraries')
|
||||
variant('superlu', default=False, description='Build with SuperLU_MT libraries')
|
||||
variant('openmp', default=False, description='Enable OpenMP support')
|
||||
variant('pthread', default=True, description='Enable POSIX threads support')
|
||||
|
||||
depends_on('mpi', when='+mpi')
|
||||
depends_on('blas', when='+lapack')
|
||||
depends_on('lapack', when='+lapack')
|
||||
depends_on('suite-sparse', when='+klu')
|
||||
depends_on('superlu-mt+openmp', when='+superlu+openmp')
|
||||
depends_on('superlu-mt+pthread', when='+superlu+pthread')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix)
|
||||
make()
|
||||
make("install")
|
||||
cmake_args = std_cmake_args[:]
|
||||
cmake_args.extend([
|
||||
'-DBUILD_SHARED_LIBS=ON',
|
||||
'-DCMAKE_C_FLAGS=-fPIC',
|
||||
'-DCMAKE_Fortran_FLAGS=-fPIC',
|
||||
'-DEXAMPLES_ENABLE=ON',
|
||||
'-DEXAMPLES_INSTALL=ON',
|
||||
'-DFCMIX_ENABLE=ON'
|
||||
])
|
||||
|
||||
# MPI support
|
||||
if '+mpi' in spec:
|
||||
cmake_args.extend([
|
||||
'-DMPI_ENABLE=ON',
|
||||
'-DMPI_MPICC={0}'.format(spec['mpi'].mpicc),
|
||||
'-DMPI_MPIF77={0}'.format(spec['mpi'].mpif77)
|
||||
])
|
||||
else:
|
||||
cmake_args.append('-DMPI_ENABLE=OFF')
|
||||
|
||||
# Building with LAPACK and BLAS
|
||||
if '+lapack' in spec:
|
||||
cmake_args.extend([
|
||||
'-DLAPACK_ENABLE=ON',
|
||||
'-DLAPACK_LIBRARIES={0};{1}'.format(
|
||||
spec['lapack'].lapack_shared_lib,
|
||||
spec['blas'].blas_shared_lib
|
||||
)
|
||||
])
|
||||
else:
|
||||
cmake_args.append('-DLAPACK_ENABLE=OFF')
|
||||
|
||||
# Building with KLU
|
||||
if '+klu' in spec:
|
||||
cmake_args.extend([
|
||||
'-DKLU_ENABLE=ON',
|
||||
'-DKLU_INCLUDE_DIR={0}'.format(
|
||||
spec['suite-sparse'].prefix.include),
|
||||
'-DKLU_LIBRARY_DIR={0}'.format(
|
||||
spec['suite-sparse'].prefix.lib)
|
||||
])
|
||||
else:
|
||||
cmake_args.append('-DKLU_ENABLE=OFF')
|
||||
|
||||
# Building with SuperLU_MT
|
||||
if '+superlu' in spec:
|
||||
cmake_args.extend([
|
||||
'-DSUPERLUMT_ENABLE=ON',
|
||||
'-DSUPERLUMT_INCLUDE_DIR={0}'.format(
|
||||
spec['superlu-mt'].prefix.include),
|
||||
'-DSUPERLUMT_LIBRARY_DIR={0}'.format(
|
||||
spec['superlu-mt'].prefix.lib)
|
||||
])
|
||||
if '+openmp' in spec:
|
||||
cmake_args.append('-DSUPERLUMT_THREAD_TYPE=OpenMP')
|
||||
elif '+pthread' in spec:
|
||||
cmake_args.append('-DSUPERLUMT_THREAD_TYPE=Pthread')
|
||||
else:
|
||||
msg = 'You must choose either +openmp or +pthread when '
|
||||
msg += 'building with SuperLU_MT'
|
||||
raise RuntimeError(msg)
|
||||
else:
|
||||
cmake_args.append('-DSUPERLUMT_ENABLE=OFF')
|
||||
|
||||
# OpenMP support
|
||||
if '+openmp' in spec:
|
||||
cmake_args.append('-DOPENMP_ENABLE=ON')
|
||||
else:
|
||||
cmake_args.append('-DOPENMP_ENABLE=OFF')
|
||||
|
||||
# POSIX threads support
|
||||
if '+pthread' in spec:
|
||||
cmake_args.append('-DPTHREAD_ENABLE=ON')
|
||||
else:
|
||||
cmake_args.append('-DPTHREAD_ENABLE=OFF')
|
||||
|
||||
with working_dir('build', create=True):
|
||||
cmake('..', *cmake_args)
|
||||
|
||||
make()
|
||||
make('install')
|
||||
|
||||
install('LICENSE', prefix)
|
||||
|
||||
self.filter_compilers()
|
||||
|
||||
def filter_compilers(self):
|
||||
"""Run after install to tell the Makefiles to use
|
||||
the compilers that Spack built the package with.
|
||||
|
||||
If this isn't done, they'll have CC, CPP, and F77 set to
|
||||
Spack's generic cc and f77. We want them to be bound to
|
||||
whatever compiler they were built with."""
|
||||
|
||||
kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
|
||||
dirname = os.path.join(self.prefix, 'examples')
|
||||
|
||||
cc_files = [
|
||||
'arkode/C_serial/Makefile', 'arkode/C_parallel/Makefile',
|
||||
'cvode/serial/Makefile', 'cvode/parallel/Makefile',
|
||||
'cvodes/serial/Makefile', 'cvodes/parallel/Makefile',
|
||||
'ida/serial/Makefile', 'ida/parallel/Makefile',
|
||||
'idas/serial/Makefile', 'idas/parallel/Makefile',
|
||||
'kinsol/serial/Makefile', 'kinsol/parallel/Makefile',
|
||||
'nvector/serial/Makefile', 'nvector/parallel/Makefile',
|
||||
'nvector/pthreads/Makefile'
|
||||
]
|
||||
|
||||
f77_files = [
|
||||
'arkode/F77_serial/Makefile', 'cvode/fcmix_serial/Makefile',
|
||||
'ida/fcmix_serial/Makefile', 'ida/fcmix_pthreads/Makefile',
|
||||
'kinsol/fcmix_serial/Makefile'
|
||||
]
|
||||
|
||||
for filename in cc_files:
|
||||
filter_file(os.environ['CC'], self.compiler.cc,
|
||||
os.path.join(dirname, filename), **kwargs)
|
||||
|
||||
for filename in f77_files:
|
||||
filter_file(os.environ['F77'], self.compiler.f77,
|
||||
os.path.join(dirname, filename), **kwargs)
|
||||
|
@@ -25,50 +25,54 @@
|
||||
from spack import *
|
||||
import glob
|
||||
|
||||
|
||||
class SuperluDist(Package):
|
||||
"""A general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines."""
|
||||
"""A general purpose library for the direct solution of large, sparse,
|
||||
nonsymmetric systems of linear equations on high performance machines."""
|
||||
homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
|
||||
url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz"
|
||||
|
||||
version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670')
|
||||
# default to version 4.3 since petsc and trilinos are not tested with 5.0.
|
||||
version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae', preferred=True)
|
||||
version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae')
|
||||
version('4.2', 'ae9fafae161f775fbac6eba11e530a65')
|
||||
version('4.1', '4edee38cc29f687bd0c8eb361096a455')
|
||||
version('4.0', 'c0b98b611df227ae050bc1635c6940e0')
|
||||
|
||||
depends_on ('mpi')
|
||||
depends_on ('blas')
|
||||
depends_on ('lapack')
|
||||
depends_on ('parmetis')
|
||||
depends_on ('metis@5:')
|
||||
depends_on('mpi')
|
||||
depends_on('blas')
|
||||
depends_on('lapack')
|
||||
depends_on('parmetis')
|
||||
depends_on('metis@5:')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
makefile_inc = []
|
||||
makefile_inc.extend([
|
||||
'PLAT = _mac_x',
|
||||
'DSuperLUroot = %s' % self.stage.source_path, #self.stage.path, prefix
|
||||
'DSuperLUroot = %s' % self.stage.source_path,
|
||||
'DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a',
|
||||
'BLASDEF = -DUSE_VENDOR_BLAS',
|
||||
'BLASLIB = -L%s -llapack %s -lblas' % (spec['lapack'].prefix.lib, spec['blas'].prefix.lib), # FIXME: avoid hardcoding blas/lapack lib names
|
||||
'BLASLIB = %s %s' %
|
||||
(to_link_flags(spec['lapack'].lapack_shared_lib),
|
||||
to_link_flags(spec['blas'].blas_shared_lib)),
|
||||
'METISLIB = -L%s -lmetis' % spec['metis'].prefix.lib,
|
||||
'PARMETISLIB = -L%s -lparmetis' % spec['parmetis'].prefix.lib,
|
||||
'FLIBS =',
|
||||
'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)',
|
||||
'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)', # NOQA: ignore=E501
|
||||
'ARCH = ar',
|
||||
'ARCHFLAGS = cr',
|
||||
'RANLIB = true',
|
||||
'CC = mpicc', # FIXME avoid hardcoding MPI compiler names
|
||||
'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %(spec['parmetis'].prefix.include, spec['metis'].prefix.include),
|
||||
'CC = %s' % spec['mpi'].mpicc,
|
||||
'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %
|
||||
(spec['parmetis'].prefix.include,
|
||||
spec['metis'].prefix.include),
|
||||
'NOOPTS = -fPIC -std=c99',
|
||||
'FORTRAN = mpif77',
|
||||
'FORTRAN = %s' % spec['mpi'].mpif77,
|
||||
'F90FLAGS = -O2',
|
||||
'LOADER = mpif77',
|
||||
'LOADER = %s' % spec['mpi'].mpif77,
|
||||
'LOADOPTS =',
|
||||
'CDEFS = -DAdd_'
|
||||
])
|
||||
])
|
||||
|
||||
#with working_dir('src'):
|
||||
with open('make.inc', 'w') as fh:
|
||||
fh.write('\n'.join(makefile_inc))
|
||||
|
||||
@@ -83,9 +87,10 @@ def install(self, spec, prefix):
|
||||
mkdirp(headers_location)
|
||||
mkdirp(prefix.lib)
|
||||
|
||||
headers = glob.glob(join_path(self.stage.source_path, 'SRC','*.h'))
|
||||
headers = glob.glob(join_path(self.stage.source_path, 'SRC', '*.h'))
|
||||
for h in headers:
|
||||
install(h,headers_location)
|
||||
install(h, headers_location)
|
||||
|
||||
superludist_lib = join_path(self.stage.source_path, 'lib/libsuperlu_dist.a')
|
||||
install(superludist_lib,self.prefix.lib)
|
||||
superludist_lib = join_path(self.stage.source_path,
|
||||
'lib/libsuperlu_dist.a')
|
||||
install(superludist_lib, self.prefix.lib)
|
||||
|
134
var/spack/repos/builtin/packages/superlu-mt/package.py
Normal file
134
var/spack/repos/builtin/packages/superlu-mt/package.py
Normal file
@@ -0,0 +1,134 @@
|
||||
##############################################################################
|
||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
|
||||
# Produced at the Lawrence Livermore National Laboratory.
|
||||
#
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/llnl/spack
|
||||
# Please also see the LICENSE file for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import glob
|
||||
import os
|
||||
|
||||
|
||||
class SuperluMt(Package):
|
||||
"""SuperLU is a general purpose library for the direct solution of large,
|
||||
sparse, nonsymmetric systems of linear equations on high performance
|
||||
machines. SuperLU_MT is designed for shared memory parallel machines."""
|
||||
|
||||
homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu_mt"
|
||||
url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_mt_3.1.tar.gz"
|
||||
|
||||
version('3.1', '06ac62f1b4b7d17123fffa0d0c315e91')
|
||||
|
||||
variant('blas', default=True, description='Build with external BLAS library')
|
||||
|
||||
# Must choose one or the other
|
||||
variant('openmp', default=False, description='Build with OpenMP support')
|
||||
variant('pthread', default=True, description='Build with POSIX threads support')
|
||||
|
||||
# NOTE: must link with a single-threaded BLAS library
|
||||
depends_on('blas', when='+blas')
|
||||
|
||||
# Cannot be built in parallel
|
||||
parallel = False
|
||||
|
||||
def configure(self, spec):
|
||||
# Validate chosen variants
|
||||
if '+openmp' in spec and '+pthread' in spec:
|
||||
msg = 'You cannot choose both +openmp and +pthread'
|
||||
raise RuntimeError(msg)
|
||||
if '~openmp' in spec and '~pthread' in spec:
|
||||
msg = 'You must choose either +openmp or +pthread'
|
||||
raise RuntimeError(msg)
|
||||
|
||||
# List of configuration options
|
||||
config = []
|
||||
|
||||
# The machine (platform) identifier to append to the library names
|
||||
if '+openmp' in spec:
|
||||
# OpenMP
|
||||
config.extend([
|
||||
'PLAT = _OPENMP',
|
||||
'TMGLIB = libtmglib.a',
|
||||
'MPLIB = {0}'.format(self.compiler.openmp_flag),
|
||||
'CFLAGS = {0}'.format(self.compiler.openmp_flag),
|
||||
'FFLAGS = {0}'.format(self.compiler.openmp_flag)
|
||||
])
|
||||
elif '+pthread' in spec:
|
||||
# POSIX threads
|
||||
config.extend([
|
||||
'PLAT = _PTHREAD',
|
||||
'TMGLIB = libtmglib$(PLAT).a',
|
||||
'MPLIB = -lpthread'
|
||||
])
|
||||
|
||||
# The BLAS library
|
||||
# NOTE: must link with a single-threaded BLAS library
|
||||
if '+blas' in spec:
|
||||
config.extend([
|
||||
'BLASDEF = -DUSE_VENDOR_BLAS',
|
||||
'BLASLIB = -L{0} -lblas'.format(spec['blas'].prefix.lib)
|
||||
])
|
||||
else:
|
||||
config.append('BLASLIB = ../lib/libblas$(PLAT).a')
|
||||
|
||||
# Generic options
|
||||
config.extend([
|
||||
# The name of the libraries to be created/linked to
|
||||
'SUPERLULIB = libsuperlu_mt$(PLAT).a',
|
||||
'MATHLIB = -lm',
|
||||
# The archiver and the flag(s) to use when building archives
|
||||
'ARCH = ar',
|
||||
'ARCHFLAGS = cr',
|
||||
'RANLIB = {0}'.format('ranlib' if which('ranlib') else 'echo'),
|
||||
# Definitions used by CPP
|
||||
'PREDEFS = -D_$(PLAT)',
|
||||
# Compilers and flags
|
||||
'CC = {0}'.format(os.environ['CC']),
|
||||
'CFLAGS += $(PREDEFS) -D_LONGINT',
|
||||
'NOOPTS = -O0',
|
||||
'FORTRAN = {0}'.format(os.environ['FC']),
|
||||
'LOADER = {0}'.format(os.environ['CC']),
|
||||
# C preprocessor defs for compilation
|
||||
'CDEFS = -DAdd_'
|
||||
])
|
||||
|
||||
# Write configuration options to include file
|
||||
with open('make.inc', 'w') as inc:
|
||||
for option in config:
|
||||
inc.write('{0}\n'.format(option))
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Set up make include file manually
|
||||
self.configure(spec)
|
||||
|
||||
# BLAS needs to be compiled separately if using internal BLAS library
|
||||
if '+blas' not in spec:
|
||||
make('blaslib')
|
||||
|
||||
make()
|
||||
|
||||
# Install manually
|
||||
install_tree('lib', prefix.lib)
|
||||
|
||||
headers = glob.glob(join_path('SRC', '*.h'))
|
||||
mkdir(prefix.include)
|
||||
for h in headers:
|
||||
install(h, prefix.include)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user