spec : removed dead code

This commit is contained in:
alalazo 2016-07-25 09:05:50 +02:00
parent 00d7fd8e21
commit 23006d1195

View File

@ -95,32 +95,30 @@
specs to avoid ambiguity. Both are provided because ~ can cause shell 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. expansion when it is the first character in an id typed on the command line.
""" """
import sys
import hashlib
import base64 import base64
import hashlib
import imp import imp
import sys
from StringIO import StringIO from StringIO import StringIO
from operator import attrgetter from operator import attrgetter
import yaml
from yaml.error import MarkedYAMLError
import llnl.util.tty as tty 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
import spack.architecture import spack.architecture
import spack.parse
import spack.error
import spack.compilers as compilers import spack.compilers as compilers
import spack.error
from spack.version import * import spack.parse
from spack.util.string import * import yaml
from spack.util.prefix import Prefix from llnl.util.filesystem import join_path
from spack.util.naming import mod_to_class from llnl.util.lang import *
from spack.virtual import ProviderIndex from llnl.util.tty.color import *
from spack.build_environment import get_path_from_module, load_module 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 yaml.error import MarkedYAMLError
# Valid pattern for an identifier in Spack # Valid pattern for an identifier in Spack
identifier_re = r'\w[\w-]*' identifier_re = r'\w[\w-]*'
@ -160,20 +158,6 @@
'nolink': nolink, '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): def colorize_spec(spec):
"""Returns a spec colorized according to the colors specified in """Returns a spec colorized according to the colors specified in
color_formats.""" color_formats."""