'Create a Cray system platform.
Target names should use craype target names but not include the
\'craype-\' prefix. Uses first viable target from:
self
envars [SPACK_FRONT_END, SPACK_BACK_END]
configuration file "targets.yaml" with keys \'front_end\', \'back_end\'
scanning /etc/bash/bashrc.local for back_end only'

def __init__(self):

    super(Cray, self).__init__('cray')
    for target in self._avail_targets():
        name = target.replace('-', '_')
        self.add_target(name, Target(name, ('craype-%s' % target)))
    for name in ('front_end', 'back_end'):
        _target = getattr(self, name, None)
        if (_target is None):
            _target = os.environ.get(('SPACK_' + name.upper()))
        if ((_target is None) and (name == 'back_end')):
            _target = self._default_target_from_env()
        if (_target is not None):
            safe_name = _target.replace('-', '_')
            setattr(self, name, safe_name)
            self.add_target(name, self.targets[safe_name])
    if (self.back_end is not None):
        self.default = self.back_end
        self.add_target('default', self.targets[self.back_end])
    else:
        raise NoPlatformError()
    front_distro = CrayFrontend()
    back_distro = Cnl()
    self.default_os = str(back_distro)
    self.back_os = self.default_os
    self.front_os = str(front_distro)
    self.add_operating_system(self.back_os, back_distro)
    self.add_operating_system(self.front_os, front_distro)
