Merge branch 'features/newarch' of https://github.com/NERSC/spack into features/newarch

This commit is contained in:
Mario Melara 2016-06-03 15:59:00 -07:00
commit bc557cc765
6 changed files with 34 additions and 22 deletions

View file

@ -480,25 +480,23 @@ def arch_from_dict(d):
@memoized
def all_platforms():
modules = []
classes = []
mod_path = spack.platform_path
mod_string = "spack.platformss"
parent_module = "spack.platforms"
for name in list_modules(mod_path):
mod_name = mod_string + name
path = join_path(mod_path, name) + ".py"
mod = imp.load_source(mod_name, path)
mod_name = '%s.%s' % (parent_module, name)
class_name = mod_to_class(name)
mod = __import__(mod_name, fromlist=[class_name])
if not hasattr(mod, class_name):
tty.die('No class %s defined in %s' % (class_name, mod_name))
cls = getattr(mod, class_name)
if not inspect.isclass(cls):
tty.die('%s.%s is not a class' % (mod_name, class_name))
modules.append(cls)
classes.append(cls)
return modules
return classes
@memoized

View file

@ -214,9 +214,10 @@ def _read_spec_from_yaml(self, hash_key, installs, parent_key=None):
# Add dependencies from other records in the install DB to
# form a full spec.
for dep_hash in spec_dict[spec.name]['dependencies'].values():
child = self._read_spec_from_yaml(dep_hash, installs, hash_key)
spec._add_dependency(child)
if 'dependencies' in spec_dict[spec.name]:
for dep_hash in spec_dict[spec.name]['dependencies'].values():
child = self._read_spec_from_yaml(dep_hash, installs, hash_key)
spec._add_dependency(child)
# Specs from the database need to be marked concrete because
# they represent actual installations.
@ -289,7 +290,8 @@ def check(cond, msg):
except Exception as e:
tty.warn("Invalid database reecord:",
"file: %s" % self._index_path,
"hash: %s" % hash_key, "cause: %s" % str(e))
"hash: %s" % hash_key,
"cause: %s: %s" % (type(e).__name__, str(e)))
raise
self._data = data

View file

@ -1,3 +1,4 @@
import re
import platform as py_platform
from spack.architecture import OperatingSystem
@ -9,7 +10,13 @@ class LinuxDistro(OperatingSystem):
platform.dist()
"""
def __init__(self):
name = py_platform.dist()[0]
version = py_platform.dist()[1].split(".")[0] # Grabs major version from tuple
distname, version, _ = py_platform.linux_distribution(
full_distribution_name=False)
super(LinuxDistro, self).__init__(name, version)
# Grabs major version from tuple on redhat; on other platforms
# grab the first legal identifier in the version field. On
# debian you get things like 'wheezy/sid'; sid means unstable.
# We just record 'wheezy' and don't get quite so detailed.
version = re.split(r'[^\w-]', version)[0]
super(LinuxDistro, self).__init__(distname, version)

View file

@ -2150,10 +2150,13 @@ def __init__(self):
(r'\s+', lambda scanner, val: None)])
# Lexer is always the same for every parser.
_lexer = SpecLexer()
class SpecParser(spack.parse.Parser):
def __init__(self):
super(SpecParser, self).__init__(SpecLexer())
super(SpecParser, self).__init__(_lexer)
self.previous = None
def do_parse(self):

View file

@ -30,9 +30,13 @@ class Dealii(Package):
"""C++ software library providing well-documented tools to build finite
element codes for a broad variety of PDEs."""
homepage = "https://www.dealii.org"
url = "https://github.com/dealii/dealii/releases/download/v8.4.0/dealii-8.4.0.tar.gz"
url = "https://github.com/dealii/dealii/releases/download/v8.4.1/dealii-8.4.1.tar.gz"
version('8.4.1', 'efbaf16f9ad59cfccad62302f36c3c1d')
version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00')
version('8.3.0', 'fc6cdcb16309ef4bea338a4f014de6fa')
version('8.2.1', '71c728dbec14f371297cd405776ccf08')
version('8.1.0', 'aa8fadc2ce5eb674f44f997461bf668d')
version('dev', git='https://github.com/dealii/dealii.git')
variant('mpi', default=True, description='Compile with MPI')

View file

@ -41,12 +41,10 @@ class Libdwarf(Package):
MIPS/IRIX C compiler."""
homepage = "http://www.prevanders.net/dwarf.html"
url = "http://www.prevanders.net/libdwarf-20130729.tar.gz"
url = "http://www.prevanders.net/libdwarf-20160507.tar.gz"
list_url = homepage
version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d')
version('20130207', '64b42692e947d5180e162e46c689dfbf')
version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db')
version('20160507', 'ae32d6f9ece5daf05e2d4b14822ea811')
depends_on("libelf")
@ -69,7 +67,7 @@ def install(self, spec, prefix):
install('libdwarf.h', prefix.include)
install('dwarf.h', prefix.include)
with working_dir('dwarfdump2'):
with working_dir('dwarfdump'):
configure("--prefix=" + prefix)
# This makefile has strings of copy commands that