summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-06-16 10:43:12 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-06-16 10:43:12 -0700
commitc7dfa1699a2898250e51bdcccc4eb568161a7c1c (patch)
treea61be479dcfb843ef4d72d9205494063e0b9ab2a
parent6b037706023c6cc138709d4cbca91d81d32cc4c4 (diff)
downloadspack-c7dfa1699a2898250e51bdcccc4eb568161a7c1c.tar.gz
spack-c7dfa1699a2898250e51bdcccc4eb568161a7c1c.tar.bz2
spack-c7dfa1699a2898250e51bdcccc4eb568161a7c1c.tar.xz
spack-c7dfa1699a2898250e51bdcccc4eb568161a7c1c.zip
rename Mac OS X to macos
-rw-r--r--lib/spack/spack/operating_systems/mac_os.py (renamed from lib/spack/spack/operating_systems/mac_osx.py)21
-rw-r--r--lib/spack/spack/platforms/darwin.py6
-rw-r--r--lib/spack/spack/test/operating_system.py13
3 files changed, 19 insertions, 21 deletions
diff --git a/lib/spack/spack/operating_systems/mac_osx.py b/lib/spack/spack/operating_systems/mac_os.py
index 3cf9b4e12e..f35b3ca577 100644
--- a/lib/spack/spack/operating_systems/mac_osx.py
+++ b/lib/spack/spack/operating_systems/mac_os.py
@@ -1,28 +1,29 @@
import platform as py_platform
from spack.architecture import OperatingSystem
-class MacOsx(OperatingSystem):
- """ This class represents the MAC_OSX operating system. This will be auto
- detected using the python platform.mac_ver. The MAC_OSX platform
- will be represented using the major version operating system name, i.e
- el capitan, yosemite...etc.
+class MacOs(OperatingSystem):
+ """This class represents the macOS operating system. This will be
+ auto detected using the python platform.mac_ver. The macOS
+ platform will be represented using the major version operating
+ system name, i.e el capitan, yosemite...etc.
"""
-
+
def __init__(self):
""" Autodetects the mac version from a dictionary. Goes back as
far as 10.6 snowleopard. If the user has an older mac then
the version will just be a generic mac_os.
"""
- mac_releases = {'10.6': "snowleopard",
+ mac_releases = {'10.6': "snowleopard",
"10.7": "lion",
"10.8": "mountainlion",
"10.9": "mavericks",
"10.10": "yosemite",
- "10.11": "elcapitan"}
+ "10.11": "elcapitan",
+ "10.12": "sierra"}
mac_ver = py_platform.mac_ver()[0][:-2]
- name = mac_releases.get(mac_ver, "mac_osx")
- super(MacOsx, self).__init__(name, mac_ver)
+ name = mac_releases.get(mac_ver, "macos")
+ super(MacOs, self).__init__(name, mac_ver)
def __str__(self):
return self.name
diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py
index 8c8af83d55..d47dd640f9 100644
--- a/lib/spack/spack/platforms/darwin.py
+++ b/lib/spack/spack/platforms/darwin.py
@@ -1,6 +1,6 @@
import subprocess
from spack.architecture import Platform, Target
-from spack.operating_systems.mac_osx import MacOsx
+from spack.operating_systems.mac_os import MacOs
class Darwin(Platform):
priority = 89
@@ -11,8 +11,8 @@ class Darwin(Platform):
def __init__(self):
super(Darwin, self).__init__('darwin')
self.add_target(self.default, Target(self.default))
- mac_os = MacOsx()
-
+ mac_os = MacOs()
+
self.default_os = str(mac_os)
self.front_os = str(mac_os)
self.back_os = str(mac_os)
diff --git a/lib/spack/spack/test/operating_system.py b/lib/spack/spack/test/operating_system.py
index 205408db3f..ed5f6ff8ad 100644
--- a/lib/spack/spack/test/operating_system.py
+++ b/lib/spack/spack/test/operating_system.py
@@ -10,7 +10,7 @@ from spack.platforms.cray_xc import CrayXc
from spack.platforms.linux import Linux
from spack.platforms.darwin import Darwin
from spack.operating_system.linux_distro import LinuxDistro
-from spack.operating_system.mac_osx import MacOSX
+from spack.operating_system.mac_os import MacOs
from spack.operating_system.cnl import ComputeNodeLinux
class TestOperatingSystem(unittest.TestCase):
@@ -27,12 +27,12 @@ class TestOperatingSystem(unittest.TestCase):
def test_cray_front_end_operating_system(self):
self.assertIsInstance(self.cray_operating_sys, LinuxDistro)
-
+
def test_cray_front_end_compiler_strategy(self):
self.assertEquals(self.cray_operating_sys.compiler_strategy, "PATH")
def test_cray_back_end_operating_system(self):
- self.assertIsInstance(self.cray_back_os,ComputeNodeLinux)
+ self.assertIsInstance(self.cray_back_os,ComputeNodeLinux)
def test_cray_back_end_compiler_strategy(self):
self.assertEquals(self.cray_back_os.compiler_strategy, "MODULES")
@@ -43,16 +43,13 @@ class TestOperatingSystem(unittest.TestCase):
def test_linux_compiler_strategy(self):
self.assertEquals(self.linux_operating_sys.compiler_strategy, "PATH")
-
+
def test_cray_front_end_compiler_list(self):
""" Operating systems will now be in charge of finding compilers.
So, depending on which operating system you want to build for
- or which operating system you are on, then you could detect
+ or which operating system you are on, then you could detect
compilers in a certain way. Cray linux environment on the front
end is just a regular linux distro whereas the Cray linux compute
node is a stripped down version which modules are important
"""
self.assertEquals(True, False)
-
-
-