summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMartin Aumüller <aumuell@reserv.at>2020-11-23 08:37:40 +0100
committerGitHub <noreply@github.com>2020-11-23 08:37:40 +0100
commitb490d65f28e2f746bb93746ff854afd299881cdd (patch)
tree791863416335401cbe8613b53b10bf20f0d09532 /lib
parent92d540fde7333bf340b160c69c4d851516f184fd (diff)
downloadspack-b490d65f28e2f746bb93746ff854afd299881cdd.tar.gz
spack-b490d65f28e2f746bb93746ff854afd299881cdd.tar.bz2
spack-b490d65f28e2f746bb93746ff854afd299881cdd.tar.xz
spack-b490d65f28e2f746bb93746ff854afd299881cdd.zip
recognize macOS 11.1 as big sur (#20038)
Big Sur versions go 11.0, 11.0.1, 11.1 (vs. prior versions that only used the minor component) Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/operating_systems/mac_os.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/spack/spack/operating_systems/mac_os.py b/lib/spack/spack/operating_systems/mac_os.py
index d59e6fce65..0efc298338 100644
--- a/lib/spack/spack/operating_systems/mac_os.py
+++ b/lib/spack/spack/operating_systems/mac_os.py
@@ -55,10 +55,14 @@ class MacOs(OperatingSystem):
'10.14': 'mojave',
'10.15': 'catalina',
'10.16': 'bigsur',
- '11.0': 'bigsur',
+ '11': 'bigsur',
}
- mac_ver = str(macos_version().up_to(2))
+ # Big Sur versions go 11.0, 11.0.1, 11.1 (vs. prior versions that
+ # only used the minor component)
+ part = 1 if macos_version() >= Version('11') else 2
+
+ mac_ver = str(macos_version().up_to(part))
name = mac_releases.get(mac_ver, "macos")
super(MacOs, self).__init__(name, mac_ver)