summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/operating_systems/mac_os.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/spack/spack/operating_systems/mac_os.py b/lib/spack/spack/operating_systems/mac_os.py
index 6c02ba5528..52a26bc69a 100644
--- a/lib/spack/spack/operating_systems/mac_os.py
+++ b/lib/spack/spack/operating_systems/mac_os.py
@@ -24,6 +24,14 @@
##############################################################################
import platform as py_platform
from spack.architecture import OperatingSystem
+from spack.version import *
+
+
+# FIXME: store versions inside OperatingSystem as a Version instead of string
+def macOS_version():
+ """temporary workaround to return a macOS version as a Version object
+ """
+ return Version('.'.join(py_platform.mac_ver()[0].split('.')[:2]))
class MacOs(OperatingSystem):
@@ -44,7 +52,8 @@ class MacOs(OperatingSystem):
"10.9": "mavericks",
"10.10": "yosemite",
"10.11": "elcapitan",
- "10.12": "sierra"}
+ "10.12": "sierra",
+ "10.13": "highsierra"}
mac_ver = '.'.join(py_platform.mac_ver()[0].split('.')[:2])
name = mac_releases.get(mac_ver, "macos")