From 23006d11951fb5c3b7e3b5631f5fcd075323fc3c Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 25 Jul 2016 09:05:50 +0200 Subject: spec : removed dead code --- lib/spack/spack/spec.py | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 8bdae0445e..b554cb0d33 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -95,32 +95,30 @@ thing. Spack uses ~variant in directory names and in the canonical form of specs to avoid ambiguity. Both are provided because ~ can cause shell expansion when it is the first character in an id typed on the command line. """ -import sys -import hashlib import base64 +import hashlib import imp +import sys from StringIO import StringIO from operator import attrgetter -import yaml -from yaml.error import MarkedYAMLError import llnl.util.tty as tty -from llnl.util.lang import * -from llnl.util.tty.color import * -from llnl.util.filesystem import join_path - import spack import spack.architecture -import spack.parse -import spack.error import spack.compilers as compilers - -from spack.version import * -from spack.util.string import * -from spack.util.prefix import Prefix +import spack.error +import spack.parse +import yaml +from llnl.util.filesystem import join_path +from llnl.util.lang import * +from llnl.util.tty.color import * +from spack.build_environment import get_path_from_module, load_module from spack.util.naming import mod_to_class +from spack.util.prefix import Prefix +from spack.util.string import * +from spack.version import * from spack.virtual import ProviderIndex -from spack.build_environment import get_path_from_module, load_module +from yaml.error import MarkedYAMLError # Valid pattern for an identifier in Spack identifier_re = r'\w[\w-]*' @@ -160,20 +158,6 @@ special_types = { 'nolink': nolink, } - -def index_specs(specs): - """Take a list of specs and return a dict of lists. Dict is - keyed by spec name and lists include all specs with the - same name. - """ - spec_dict = {} - for spec in specs: - if spec.name not in spec_dict: - spec_dict[spec.name] = [] - spec_dict[spec.name].append(spec) - return spec_dict - - def colorize_spec(spec): """Returns a spec colorized according to the colors specified in color_formats.""" -- cgit v1.2.3-70-g09d2