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
|
||||
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):
|
||||
|
@ -18,11 +18,12 @@ def __init__(self):
|
|||
"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
|
|
@ -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,7 +11,7 @@ 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)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
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):
|
||||
|
@ -53,6 +53,3 @@ def test_cray_front_end_compiler_list(self):
|
|||
node is a stripped down version which modules are important
|
||||
"""
|
||||
self.assertEquals(True, False)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue