Add macOS Catalina support (#13070)

This commit is contained in:
Adam J. Stewart 2019-10-08 01:59:33 -05:00 committed by Todd Gamblin
parent 9600eb4f5a
commit 72d8febc4e

View file

@ -32,19 +32,29 @@ class MacOs(OperatingSystem):
""" """
def __init__(self): def __init__(self):
""" Autodetects the mac version from a dictionary. Goes back as """Autodetects the mac version from a dictionary.
far as 10.6 snowleopard. If the user has an older mac then
the version will just be a generic mac_os. If the mac version is too old or too new for Spack to recognize,
will use a generic "macos" version string until Spack is updated.
""" """
mac_releases = {'10.6': "snowleopard", mac_releases = {
"10.7": "lion", '10.0': 'cheetah',
"10.8": "mountainlion", '10.1': 'puma',
"10.9": "mavericks", '10.2': 'jaguar',
"10.10": "yosemite", '10.3': 'panther',
"10.11": "elcapitan", '10.4': 'tiger',
"10.12": "sierra", '10.5': 'leopard',
"10.13": "highsierra", '10.6': 'snowleopard',
"10.14": "mojave"} '10.7': 'lion',
'10.8': 'mountainlion',
'10.9': 'mavericks',
'10.10': 'yosemite',
'10.11': 'elcapitan',
'10.12': 'sierra',
'10.13': 'highsierra',
'10.14': 'mojave',
'10.15': 'catalina',
}
mac_ver = str(macos_version().up_to(2)) mac_ver = str(macos_version().up_to(2))
name = mac_releases.get(mac_ver, "macos") name = mac_releases.get(mac_ver, "macos")