diff options
Diffstat (limited to 'lib/spack/spack/spec.py')
-rw-r--r-- | lib/spack/spack/spec.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 1a6cc5f6bd..cb4942b157 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -79,7 +79,6 @@ expansion when it is the first character in an id typed on the command line. import base64 import sys import collections -import ctypes import hashlib import itertools import os @@ -88,6 +87,7 @@ import re import six from operator import attrgetter +import ruamel.yaml as yaml from llnl.util.filesystem import find_headers, find_libraries, is_exe from llnl.util.lang import key_ordering, HashableMap, ObjectWrapper, dedupe @@ -185,9 +185,6 @@ _separators = '[\\%s]' % '\\'.join(color_formats.keys()) #: every time we call str() _any_version = VersionList([':']) -#: Max integer helps avoid passing too large a value to cyaml. -maxint = 2 ** (ctypes.sizeof(ctypes.c_int) * 8 - 1) - 1 - default_format = '{name}{@version}' default_format += '{%compiler.name}{@compiler.version}{compiler_flags}' default_format += '{variants}{arch=architecture}' @@ -1366,8 +1363,8 @@ class Spec(object): """ # TODO: curently we strip build dependencies by default. Rethink # this when we move to using package hashing on all specs. - yaml_text = syaml.dump(self.to_node_dict(hash=hash), - default_flow_style=True, width=maxint) + yaml_text = syaml.dump( + self.to_node_dict(hash=hash), default_flow_style=True) sha = hashlib.sha1(yaml_text.encode('utf-8')) b32_hash = base64.b32encode(sha.digest()).lower() @@ -1937,7 +1934,7 @@ class Spec(object): stream -- string or file object to read from. """ try: - data = syaml.load(stream) + data = yaml.load(stream) return Spec.from_dict(data) except MarkedYAMLError as e: raise syaml.SpackYAMLError("error parsing YAML spec:", str(e)) |