import MacOSX subclass and added add_operating_system method to use subclass

This commit is contained in:
Mario Melara 2016-02-22 14:52:52 -08:00
parent 725d6d5fce
commit 1a7d6ed49a

View file

@ -1,5 +1,6 @@
import subprocess
from spack.architecture import Platform, Target
from spack.operating_system.mac_osx import MacOSX
class Darwin(Platform):
priority = 89
@ -10,7 +11,9 @@ class Darwin(Platform):
def __init__(self):
super(Darwin, self).__init__('darwin')
self.add_target(self.default, Target(self.default, 'PATH'))
self.add_operating_system()
mac_os = MacOSX()
self.default_os = mac_os.name
self.add_operating_system(mac_os.name, mac_os)
@classmethod
def detect(self):