rename Mac OS X to macos
This commit is contained in:
parent
6b03770602
commit
c7dfa1699a
3 changed files with 19 additions and 21 deletions
|
@ -1,11 +1,11 @@
|
||||||
import platform as py_platform
|
import platform as py_platform
|
||||||
from spack.architecture import OperatingSystem
|
from spack.architecture import OperatingSystem
|
||||||
|
|
||||||
class MacOsx(OperatingSystem):
|
class MacOs(OperatingSystem):
|
||||||
""" This class represents the MAC_OSX operating system. This will be auto
|
"""This class represents the macOS operating system. This will be
|
||||||
detected using the python platform.mac_ver. The MAC_OSX platform
|
auto detected using the python platform.mac_ver. The macOS
|
||||||
will be represented using the major version operating system name, i.e
|
platform will be represented using the major version operating
|
||||||
el capitan, yosemite...etc.
|
system name, i.e el capitan, yosemite...etc.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -18,11 +18,12 @@ def __init__(self):
|
||||||
"10.8": "mountainlion",
|
"10.8": "mountainlion",
|
||||||
"10.9": "mavericks",
|
"10.9": "mavericks",
|
||||||
"10.10": "yosemite",
|
"10.10": "yosemite",
|
||||||
"10.11": "elcapitan"}
|
"10.11": "elcapitan",
|
||||||
|
"10.12": "sierra"}
|
||||||
|
|
||||||
mac_ver = py_platform.mac_ver()[0][:-2]
|
mac_ver = py_platform.mac_ver()[0][:-2]
|
||||||
name = mac_releases.get(mac_ver, "mac_osx")
|
name = mac_releases.get(mac_ver, "macos")
|
||||||
super(MacOsx, self).__init__(name, mac_ver)
|
super(MacOs, self).__init__(name, mac_ver)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
|
@ -1,6 +1,6 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
from spack.architecture import Platform, Target
|
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):
|
class Darwin(Platform):
|
||||||
priority = 89
|
priority = 89
|
||||||
|
@ -11,7 +11,7 @@ class Darwin(Platform):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(Darwin, self).__init__('darwin')
|
super(Darwin, self).__init__('darwin')
|
||||||
self.add_target(self.default, Target(self.default))
|
self.add_target(self.default, Target(self.default))
|
||||||
mac_os = MacOsx()
|
mac_os = MacOs()
|
||||||
|
|
||||||
self.default_os = str(mac_os)
|
self.default_os = str(mac_os)
|
||||||
self.front_os = str(mac_os)
|
self.front_os = str(mac_os)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
from spack.platforms.linux import Linux
|
from spack.platforms.linux import Linux
|
||||||
from spack.platforms.darwin import Darwin
|
from spack.platforms.darwin import Darwin
|
||||||
from spack.operating_system.linux_distro import LinuxDistro
|
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
|
from spack.operating_system.cnl import ComputeNodeLinux
|
||||||
|
|
||||||
class TestOperatingSystem(unittest.TestCase):
|
class TestOperatingSystem(unittest.TestCase):
|
||||||
|
@ -53,6 +53,3 @@ def test_cray_front_end_compiler_list(self):
|
||||||
node is a stripped down version which modules are important
|
node is a stripped down version which modules are important
|
||||||
"""
|
"""
|
||||||
self.assertEquals(True, False)
|
self.assertEquals(True, False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue