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

This commit is contained in:
Tom Merrick 2017-05-25 14:29:48 -05:00
commit 2dd55b8721
9 changed files with 94 additions and 57 deletions

View File

@ -2958,16 +2958,23 @@ def do_parse(self):
# We're parsing an anonymous spec beginning with a
# key-value pair.
if not specs:
self.push_tokens([self.previous, self.token])
self.previous = None
specs.append(self.spec(None))
self.expect(VAL)
# Raise an error if the previous spec is already
# concrete (assigned by hash)
if specs[-1]._hash:
raise RedundantSpecError(specs[-1],
'key-value pair')
specs[-1]._add_flag(
self.previous.value, self.token.value)
self.previous = None
else:
if specs[-1].concrete:
# Trying to add k-v pair to spec from hash
raise RedundantSpecError(specs[-1],
'key-value pair')
# We should never end up here.
# This requires starting a new spec with ID, EQ
# After another spec that is not concrete
# If the previous spec is not concrete, this is
# handled in the spec parsing loop
# If it is concrete, see the if statement above
# If there is no previous spec, we don't land in
# this else case.
self.unexpected_token()
else:
# We're parsing a new spec by name
self.previous = None
@ -3151,7 +3158,11 @@ def version(self):
if self.accept(COLON):
if self.accept(ID):
end = self.token.value
if self.next and self.next.type is EQ:
# This is a start: range followed by a key=value pair
self.push_tokens([self.token])
else:
end = self.token.value
elif start:
# No colon, but there was a version.
return Version(start)
@ -3384,7 +3395,8 @@ def __init__(self, spec, hash):
class NoSuchHashError(SpecError):
def __init__(self, hash):
super(NoSuchHashError, self).__init__(
"No installed spec matches the hash: '%s'")
"No installed spec matches the hash: '%s'"
% hash)
class RedundantSpecError(SpecError):

View File

@ -140,10 +140,9 @@ def test_anonymous_specs(self):
self.check_parse("arch=test-None-None", "platform=test")
self.check_parse('@2.7:')
@pytest.mark.xfail()
def test_anonymous_specs_with_multiple_parts(self):
# Parse anonymous spec with multiple tokens
self.check_parse('languages=go @4.2:')
self.check_parse('@4.2: languages=go', 'languages=go @4.2:')
self.check_parse('@4.2: languages=go')
def test_simple_dependence(self):
@ -551,12 +550,8 @@ def test_kv_with_spaces(self):
@pytest.mark.parametrize('spec,anon_spec,spec_name', [
('openmpi languages=go', 'languages=go', 'openmpi'),
('openmpi @4.6:', '@4.6:', 'openmpi'),
pytest.mark.xfail(
('openmpi languages=go @4.6:', 'languages=go @4.6:', 'openmpi')
),
pytest.mark.xfail(
('openmpi @4.6: languages=go', '@4.6: languages=go', 'openmpi')
),
('openmpi languages=go @4.6:', 'languages=go @4.6:', 'openmpi'),
('openmpi @4.6: languages=go', '@4.6: languages=go', 'openmpi'),
])
def test_parse_anonymous_specs(spec, anon_spec, spec_name):

View File

@ -39,6 +39,7 @@ class Ant(Package):
version('1.9.9', '22c9d40dabafbec348aaada226581239')
version('1.9.8', '16253d516d5c33c4af9ef8fafcf1004b')
version('1.9.7', 'a2fd9458c76700b7be51ef12f07d4bb1')
version('1.9.6', '29b7507c9053e301d2b85091f2aec6f0')
depends_on('jdk')

View File

@ -24,7 +24,6 @@
##############################################################################
from spack import *
from distutils.dir_util import copy_tree
import os
class Converge(Package):
@ -37,25 +36,32 @@ class Converge(Package):
parameters. This grid generation method completely eliminates the need to
manually generate a grid. In addition, CONVERGE offers many other features
to expedite the setup process and to ensure that your simulations are as
computationally efficient as possible.
Note: CONVERGE is licensed software. You will need to create an account on
the CONVERGE homepage and download CONVERGE yourself. Spack will search
your current directory for the download file. Alternatively, add this file
to a mirror so that Spack can find it. For instructions on how to set up a
mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
computationally efficient as possible."""
homepage = "https://www.convergecfd.com/"
url = "file://%s/converge_install_2.3.16.tar.gz" % os.getcwd()
url = "https://download.convergecfd.com/download/CONVERGE_2.4/Full_Solver_Packages/converge_install_2.4.10.tar.gz"
# In order to view available versions, you need to register for an account:
# https://download.convergecfd.com/wp-login.php?action=register
version('2.4.10', '53f5bd4bfb39005bebae46b8d6ee3ce6')
version('2.3.16', '8b80f1e73a63181c427c7732ad279986')
version('2.1.0', '327a917d46aa3bc8dee9511375ce112c',
url="https://download.convergecfd.com/download/CONVERGE_2.1/Full_Solver_Packages/converge_install_2.1.0_111615.tar.gz")
variant('mpi', default=True, description='Build with MPI support')
# The Converge Getting Started Guide recommends:
# MPICH: 3.1.4
# HP-MPI: 2.0.3+
# OpenMPI: 1.6.*
# The CONVERGE Getting Started Guide recommends:
#
# +--------------+--------+---------+---------+
# | MPI Packages | v2.2 | v2.3 | v2.4 |
# +--------------+--------+---------+---------+
# | MPICH | 1.2.1 | 3.1.4 | |
# | HP-MPI | 2.0.3+ | 2.0.3+ | |
# | Platform MPI | | 9.1.2 | 9.1.2 |
# | Open MPI | 1.6+ | 1.6+ | 1.10.1+ |
# | Intel MPI | | 17.0.98 | 17.0.98 |
# +--------------+--------+---------+---------+
depends_on('mpi', when='+mpi')
# Licensing
@ -67,3 +73,7 @@ class Converge(Package):
def install(self, spec, prefix):
copy_tree('.', prefix)
def setup_environment(self, spack_env, run_env):
run_env.set('CONVERGE_ROOT', self.prefix)
run_env.prepend_path('PATH', join_path(self.prefix, 'l_x86_64', 'bin'))

View File

@ -97,17 +97,14 @@ class Gcc(AutotoolsPackage):
# depends_on('guile@1.4.1:', type='test')
# See https://golang.org/doc/install/gccgo#Releases
provides('golang', when='languages=go')
# 'when' does not currently support multiple parts of a spec.
# See https://github.com/LLNL/spack/pull/4151
# provides('golang', when='languages=go @4.6:')
# provides('golang@:1', when='languages=go @4.7.1:')
# provides('golang@:1.1', when='languages=go @4.8:')
# provides('golang@:1.1.2', when='languages=go @4.8.2:')
# provides('golang@:1.2', when='languages=go @4.9:')
# provides('golang@:1.4', when='languages=go @5:')
# provides('golang@:1.6.1', when='languages=go @6:')
# provides('golang@:1.8', when='languages=go @7:')
provides('golang', when='languages=go @4.6:')
provides('golang@:1', when='languages=go @4.7.1:')
provides('golang@:1.1', when='languages=go @4.8:')
provides('golang@:1.1.2', when='languages=go @4.8.2:')
provides('golang@:1.2', when='languages=go @4.9:')
provides('golang@:1.4', when='languages=go @5:')
provides('golang@:1.6.1', when='languages=go @6:')
provides('golang@:1.8', when='languages=go @7:')
# For a list of valid languages for a specific release,
# run the following command in the GCC source directory:

View File

@ -29,16 +29,13 @@ class PyConfigparser(PythonPackage):
"""This library brings the updated configparser from Python 3.5 to
Python 2.6-3.5."""
homepage = "https://pypi.python.org/pypi/configparser"
url = "https://pypi.python.org/packages/source/c/configparser/configparser-3.5.0.tar.gz"
homepage = "https://docs.python.org/3/library/configparser.html"
url = "https://pypi.io/packages/source/c/configparser/configparser-3.5.0.tar.gz"
version('3.5.0', 'cfdd915a5b7a6c09917a64a573140538',
url="https://pypi.python.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz")
version('3.5.0', 'cfdd915a5b7a6c09917a64a573140538')
depends_on('python@2.6:2.8,3.4:')
depends_on('py-setuptools', type='build')
# This dependency breaks concretization
# See https://github.com/LLNL/spack/issues/2793
# depends_on('py-ordereddict', when='^python@2.6:2.6.999', type=('build', 'run')) # noqa
depends_on('py-setuptools', type='build')
# depends_on('py-ordereddict', when='^python@:2.6', type=('build', 'run'))

View File

@ -25,15 +25,22 @@
from spack import *
class PyEntrypoints(Package):
class PyEntrypoints(PythonPackage):
"""Discover and load entry points from installed packages."""
homepage = "https://pypi.python.org/pypi/entrypoints"
url = "https://files.pythonhosted.org/packages/f8/ad/0e77a853c745a15981ab51fa9a0cb4eca7a7a007b4c1970106ee6ba01e0c/entrypoints-0.2.2-py2.py3-none-any.whl"
url = "https://pypi.python.org/packages/f8/ad/0e77a853c745a15981ab51fa9a0cb4eca7a7a007b4c1970106ee6ba01e0c/entrypoints-0.2.2-py2.py3-none-any.whl"
import_modules = ['entrypoints']
version('0.2.2', '73bd7ce92c19b25dc5a20aff41be996a', expand=False)
depends_on('python@2.7:', type=('build', 'run'))
depends_on('py-pip', type='build')
depends_on('py-configparser', when='^python@:2.8', type=('build', 'run'))
phases = ['install']
def install(self, spec, prefix):
pip = which('pip')

View File

@ -30,6 +30,8 @@ class PyOrdereddict(PythonPackage):
OrderedDict that works in Python 2.4-2.6."""
homepage = "https://pypi.python.org/pypi/ordereddict"
url = "https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.1.tar.gz"
url = "https://pypi.io/packages/source/o/ordereddict/ordereddict-1.1.tar.gz"
import_modules = ['ordereddict']
version('1.1', 'a0ed854ee442051b249bfad0f638bbec')

View File

@ -87,14 +87,23 @@ class Trilinos(CMakePackage):
description='Enables the build of shared libraries')
variant('debug', default=False,
description='Builds a debug version of the libraries')
variant('boost', default=True, description='Compile with Boost')
variant('tpetra', default=True, description='Compile with Tpetra')
variant('exodus', default=False, description='Compile with Exodus from SEACAS')
variant('boost', default=True, description='Compile with Boost')
variant('tpetra', default=True, description='Compile with Tpetra')
variant('exodus', default=False, description='Compile with Exodus from SEACAS')
variant('dtk', default=False, description='Enable DataTransferKit')
resource(name='dtk',
git='https://github.com/ornl-cees/DataTransferKit',
tag='master',
placement='DataTransferKit',
when='+dtk')
conflicts('+dtk', when='~tpetra')
# Everything should be compiled with -fpic
depends_on('blas')
depends_on('lapack')
depends_on('boost', when='+boost')
depends_on('boost', when='+dtk')
depends_on('matio')
depends_on('glm')
depends_on('metis@5:', when='+metis')
@ -386,6 +395,13 @@ def cmake_args(self):
'-DTrilinos_ENABLE_STK=OFF'
])
if '+dtk' in spec:
options.extend([
'-DTrilinos_EXTRA_REPOSITORIES:STRING=DataTransferKit',
'-DTpetra_INST_INT_UNSIGNED_LONG:BOOL=ON',
'-DTrilinos_ENABLE_DataTransferKit:BOOL=ON'
])
# exodus
if '+exodus' in spec:
options.extend([