Merge branch 'develop' of https://github.com/LLNL/spack into features/install_with_phases

Conflicts:
	var/spack/repos/builtin/packages/swiftsim/package.py
This commit is contained in:
alalazo 2016-07-18 08:49:24 +02:00
commit 6c00a13ed5
15 changed files with 432 additions and 30 deletions

View File

@ -183,7 +183,7 @@ To uninstall a package and every package that depends on it, you may give the
spack uninstall --dependents mpich
will display a list of all the packages that depends on `mpich` and, upon confirmation,
will display a list of all the packages that depend on `mpich` and, upon confirmation,
will uninstall them in the right order.
A line like
@ -543,11 +543,12 @@ More formally, a spec consists of the following pieces:
* ``+`` or ``-`` or ``~`` Optional variant specifiers (``+debug``,
``-qt``, or ``~qt``) for boolean variants
* ``name=<value>`` Optional variant specifiers that are not restricted to
boolean variants
boolean variants
* ``name=<value>`` Optional compiler flag specifiers. Valid flag names are
``cflags``, ``cxxflags``, ``fflags``, ``cppflags``, ``ldflags``, and ``ldlibs``.
``cflags``, ``cxxflags``, ``fflags``, ``cppflags``, ``ldflags``, and ``ldlibs``.
* ``target=<value> os=<value>`` Optional architecture specifier
(``target=haswell os=CNL10``) * ``^`` Dependency specs (``^callpath@1.1``)
(``target=haswell os=CNL10``)
* ``^`` Dependency specs (``^callpath@1.1``)
There are two things to notice here. The first is that specs are
recursively defined. That is, each dependency after ``^`` is a spec

View File

@ -2627,14 +2627,14 @@ Spack packages with variants similar to already-existing Spack
packages should use the same name for their variants. Standard
variant names are:
======= ======== ========================
Name Default Description
------- -------- ------------------------
shared True Build shared libraries
static Build static libraries
mpi Use MPI
python Build Python extension
------- -------- ------------------------
======= ======== ========================
Name Default Description
======= ======== ========================
shared True Build shared libraries
static Build static libraries
mpi Use MPI
python Build Python extension
======= ======== ========================
If specified in this table, the corresponding default should be used
when declaring a variant.

View File

@ -142,9 +142,9 @@ def __call__(self, stage):
# Build dependencies and extensions
dependenciesDict = {
'autotools': "# depends_on('foo')",
'cmake': "depends_on('cmake')",
'scons': "depends_on('scons')",
'python': "extends('python')",
'cmake': "depends_on('cmake', type='build')",
'scons': "depends_on('scons', type='build')",
'python': "extends('python', type=nolink)",
'R': "extends('R')",
'unknown': "# depends_on('foo')"
}

View File

@ -18,7 +18,7 @@ if [[ ! $flake8 ]]; then
fi
# Check if changed files are flake8 conformant [framework]
changed=$(git diff --name-only develop... | grep '.py$')
changed=$(git diff --name-only --find-renames develop... | grep '.py$')
# Add approved style exemptions to the changed packages.
for file in $changed; do
@ -26,6 +26,7 @@ for file in $changed; do
cp "$file" "$file~"
# Exempt lines with urls and descriptions from overlong line errors.
perl -i -pe 's/^(\s*homepage\s*=.*)$/\1 # NOQA: ignore=E501/' $file
perl -i -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file
perl -i -pe 's/^(\s*version\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
perl -i -pe 's/^(\s*variant\(.*\).*)$/\1 # NOQA: ignore=E501/' $file

View File

@ -57,6 +57,11 @@
########################################################################
function spack {
# Zsh does not do word splitting by default, this enables it for this function only
if [ -n "$ZSH_VERSION" ]; then
emulate -L sh
fi
# save raw arguments into an array before butchering them
args=( "$@" )
@ -93,11 +98,18 @@ function spack {
;;
"use"|"unuse"|"load"|"unload")
# Shift any other args for use off before parsing spec.
_sp_subcommand_args=""
_sp_module_args=""
if [[ "$1" =~ ^- ]]; then
_sp_module_args="$1"; shift
_sp_spec="$@"
while [[ "$1" =~ ^- ]]; do
if [ "$1" = "-r" -o "$1" = "--dependencies" ]; then
_sp_subcommand_args="$_sp_subcommand_args $1"
else
_sp_module_args="$_sp_module_args $1"
fi
shift
done
_sp_spec="$@"
# Here the user has run use or unuse with a spec. Find a matching
# spec using 'spack module find', then use the appropriate module
@ -105,19 +117,19 @@ function spack {
# If spack module command comes back with an error, do nothing.
case $_sp_subcommand in
"use")
if _sp_full_spec=$(command spack $_sp_flags module find dotkit $_sp_spec); then
if _sp_full_spec=$(command spack $_sp_flags module find $_sp_subcommand_args dotkit $_sp_spec); then
use $_sp_module_args $_sp_full_spec
fi ;;
"unuse")
if _sp_full_spec=$(command spack $_sp_flags module find dotkit $_sp_spec); then
if _sp_full_spec=$(command spack $_sp_flags module find $_sp_subcommand_args dotkit $_sp_spec); then
unuse $_sp_module_args $_sp_full_spec
fi ;;
"load")
if _sp_full_spec=$(command spack $_sp_flags module find tcl $_sp_spec); then
if _sp_full_spec=$(command spack $_sp_flags module find $_sp_subcommand_args tcl $_sp_spec); then
module load $_sp_module_args $_sp_full_spec
fi ;;
"unload")
if _sp_full_spec=$(command spack $_sp_flags module find tcl $_sp_spec); then
if _sp_full_spec=$(command spack $_sp_flags module find $_sp_subcommand_args tcl $_sp_spec); then
module unload $_sp_module_args $_sp_full_spec
fi ;;
esac

View File

@ -0,0 +1,53 @@
##############################################################################
# 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 Gts(Package):
"""GTS stands for the GNU Triangulated Surface Library.
It is an Open Source Free Software Library intended to provide a set of
useful functions to deal with 3D surfaces meshed with interconnected
triangles. The source code is available free of charge under the Free
Software LGPL license.
The code is written entirely in C with an object-oriented approach
based mostly on the design of GTK+. Careful attention is paid to
performance related issues as the initial goal of GTS is to provide a
simple and efficient library to scientists dealing with 3D computational
surface meshes.
"""
homepage = "http://gts.sourceforge.net/index.html"
url = "http://gts.sourceforge.net/tarballs/gts-snapshot-121130.tar.gz"
version('121130', '023ebb6b13b8707534182a3ef0d12908')
depends_on('glib')
def install(self, spec, prefix):
configure('--prefix={0}'.format(prefix))
make()
make('install')

View File

@ -0,0 +1,76 @@
##############################################################################
# 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 Hmmer(Package):
"""HMMER is used for searching sequence databases for sequence homologs,
and for making sequence alignments. It implements methods using
probabilistic models called profile hidden Markov models (profile HMMs).
"""
homepage = 'http://www.hmmer.org'
url = 'http://eddylab.org/software/hmmer3/3.1b2/hmmer-3.1b2.tar.gz'
version('3.1b2', 'c8c141018bc0ccd7fc37b33f2b945d5f')
version('3.0', '4cf685f3bc524ba5b5cdaaa070a83588')
version('2.4i', 'dab234c87e026ac1de942450750acd20')
version('2.3.2', '5f073340c0cf761288f961a73821228a')
version('2.3.1', 'c724413e5761c630892506698a4716e2')
variant('mpi', default=True, description='Compile with MPI')
variant('gsl', default=False, description='Compile with GSL')
depends_on('mpi', when='+mpi')
depends_on('gsl', when='+gsl')
def url_for_version(self, version):
base_url = 'http://eddylab.org/software'
if version >= Version('3.0'):
return '{0}/hmmer3/{1}/hmmer-{1}.tar.gz'.format(base_url, version)
else:
return '{0}/hmmer/{1}/hmmer-{1}.tar.gz'.format(base_url, version)
def install(self, spec, prefix):
configure_args = [
'--prefix={0}'.format(prefix)
]
if '+gsl' in self.spec:
configure_args.extend([
'--with-gsl',
'LIBS=-lgsl -lgslcblas'
])
if '+mpi' in self.spec:
configure_args.append('--enable-mpi')
configure(*configure_args)
make()
if self.run_tests:
make('check')
make('install')

View File

@ -63,6 +63,7 @@ class Openmpi(Package):
list_url = "http://www.open-mpi.org/software/ompi/"
list_depth = 3
version('2.0.0', 'cdacc800cb4ce690c1f1273cb6366674')
version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b')
version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c')
version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e')
@ -101,6 +102,7 @@ class Openmpi(Package):
provides('mpi@:2.2', when='@1.6.5')
provides('mpi@:3.0', when='@1.7.5:')
provides('mpi@:3.1', when='@2.0.0:')
depends_on('hwloc')
depends_on('sqlite', when='+sqlite3')
@ -169,7 +171,8 @@ 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', # NOQA: ignore=E501
('--enable-mpi-thread-multiple' if '+thread_multiple' in spec
else '--disable-mpi-thread-multiple'),
'--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'

View File

@ -24,6 +24,7 @@
##############################################################################
from spack import *
class PyNumpy(Package):
"""NumPy is the fundamental package for scientific computing with Python.
It contains among other things: a powerful N-dimensional array object,
@ -38,7 +39,6 @@ class PyNumpy(Package):
version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645')
version('1.9.1', '78842b73560ec378142665e712ae4ad9')
variant('blas', default=True)
variant('lapack', default=True)
@ -63,6 +63,6 @@ def install(self, spec, prefix):
f.write('[DEFAULT]\n')
f.write('libraries=%s\n' % ','.join(libraries))
f.write('library_dirs=%s\n' % ':'.join(library_dirs))
f.write('rpath=%s\n' % ':'.join(library_dirs))
python('setup.py', 'install', '--prefix=%s' % prefix)

View File

@ -38,16 +38,29 @@ class Python(Package):
homepage = "http://www.python.org"
url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz"
version('3.5.2', '3fe8434643a78630c61c6464fe2e7e72')
version('3.5.1', 'be78e48cdfc1a7ad90efff146dce6cfe')
version('3.5.0', 'a56c0c0b45d75a0ec9c6dee933c41c36')
version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b', preferred=True)
version('3.4.3', '4281ff86778db65892c05151d5de738d')
version('3.3.6', 'cdb3cd08f96f074b3f3994ccb51063e9')
version('3.2.6', '23815d82ae706e9b781ca65865353d39')
version('3.1.5', '02196d3fc7bc76bdda68aa36b0dd16ab')
version('2.7.12', '88d61f82e3616a4be952828b3694109d', preferred=True)
version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b')
version('2.7.10', 'd7547558fd673bd9d38e2108c6b42521')
version('2.7.9', '5eebcaa0030dc4061156d3429657fb83')
version('2.7.8', 'd4bca0159acb0b44a781292b5231936f')
extendable = True
variant('ucs4', default=False, description='Enable UCS4 unicode strings')
variant('ucs4', default=False, description='Enable UCS4 (wide) unicode strings')
# From https://docs.python.org/2/c-api/unicode.html: Python's default
# builds use a 16-bit type for Py_UNICODE and store Unicode values
# internally as UCS2. It is also possible to build a UCS4 version of Python
# (most recent Linux distributions come with UCS4 builds of Python). These
# builds then use a 32-bit type for Py_UNICODE and store Unicode data
# internally as UCS4. Note that UCS2 and UCS4 Python builds are not binary
# compatible.
depends_on("openssl")
depends_on("bzip2")
@ -85,7 +98,13 @@ def install(self, spec, prefix):
]
if '+ucs4' in spec:
if spec.satisfies('@:2.7'):
config_args.append('--enable-unicode=ucs4')
elif spec.satisfies('@3.0:3.2'):
config_args.append('--with-wide-unicode')
elif spec.satisfies('@3.3:'):
# https://docs.python.org/3.3/whatsnew/3.3.html
raise ValueError('+ucs4 variant not compatible with Python 3.3 and beyond') # NOQA: ignore=E501
if spec.satisfies('@3:'):
config_args.append('--without-ensurepip')

View 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 RGgvis(Package):
"""An implementation of an interactive grammar of graphics, taking the best
parts of 'ggplot2', combining them with the reactive framework from 'shiny'
and web graphics from 'vega'."""
homepage = "http://ggvis.rstudio.com/"
url = "https://cran.r-project.org/src/contrib/ggvis_0.4.2.tar.gz"
list_url = "https://cran.r-project.org/src/contrib/Archive/ggvis"
version('0.4.2', '039f45e5c7f1e0652779163d7d99f922')
extends('R')
depends_on('r-assertthat')
depends_on('r-jsonlite')
depends_on('r-shiny')
depends_on('r-magrittr')
depends_on('r-dplyr')
depends_on('r-lazyeval')
depends_on('r-htmltools')
def install(self, spec, prefix):
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
self.stage.source_path)

View 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 RHtmltools(Package):
"""Tools for HTML generation and output."""
homepage = "https://github.com/rstudio/htmltools"
url = "https://cran.r-project.org/src/contrib/htmltools_0.3.5.tar.gz"
list_url = "https://cran.r-project.org/src/contrib/Archive/htmltools"
version('0.3.5', '5f001aff4a39e329f7342dcec5139724')
extends('R')
depends_on('r-digest')
depends_on('r-rcpp')
def install(self, spec, prefix):
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
self.stage.source_path)

View 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 RHttpuv(Package):
"""Provides low-level socket and protocol support for handling HTTP and
WebSocket requests directly from within R. It is primarily intended as a
building block for other packages, rather than making it particularly easy
to create complete web applications using httpuv alone. httpuv is built on
top of the libuv and http-parser C libraries, both of which were developed
by Joyent, Inc. (See LICENSE file for libuv and http-parser license
information.)"""
homepage = "https://github.com/rstudio/httpuv"
url = "https://cran.r-project.org/src/contrib/httpuv_1.3.3.tar.gz"
list_url = "https://cran.r-project.org/src/contrib/Archive/httpuv"
version('1.3.3', 'c78ae068cf59e949b9791be987bb4489')
extends('R')
depends_on('r-rcpp')
def install(self, spec, prefix):
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
self.stage.source_path)

View 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 RShiny(Package):
"""Makes it incredibly easy to build interactive web applications with R.
Automatic "reactive" binding between inputs and outputs and extensive
pre-built widgets make it possible to build beautiful, responsive, and
powerful applications with minimal effort."""
homepage = "http://shiny.rstudio.com/"
url = "https://cran.r-project.org/src/contrib/shiny_0.13.2.tar.gz"
list_url = "https://cran.r-project.org/src/contrib/Archive/shiny"
version('0.13.2', 'cb5bff7a28ad59ec2883cd0912ca9611')
extends('R')
depends_on('r-httpuv')
depends_on('r-mime')
depends_on('r-jsonlite')
depends_on('r-xtable')
depends_on('r-digest')
depends_on('r-htmltools')
depends_on('r-R6')
def install(self, spec, prefix):
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
self.stage.source_path)

View 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 RXtable(Package):
"""Coerce data to LaTeX and HTML tables."""
homepage = "http://xtable.r-forge.r-project.org/"
url = "https://cran.r-project.org/src/contrib/xtable_1.8-2.tar.gz"
list_url = "https://cran.r-project.org/src/contrib/Archive/xtable"
version('1.8-2', '239e4825cd046156a67efae3aac01d86')
extends('R')
def install(self, spec, prefix):
R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
self.stage.source_path)