From 0017c2c7c3a825704bab0228f2f5024ad01bd4b6 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Wed, 11 Apr 2018 18:13:06 +0800 Subject: [PATCH] Add support for MacOS --- .gitmodules | 3 +++ py_slvs_mac | 1 + sys_slvs.py | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 160000 py_slvs_mac diff --git a/.gitmodules b/.gitmodules index 857099e..f10c8d3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "py_slvs"] path = py_slvs url = https://github.com/realthunder/py_slvs.git +[submodule "py_slvs_mac"] + path = py_slvs_mac + url = https://github.com/realthunder/py_slvs_mac.git diff --git a/py_slvs_mac b/py_slvs_mac new file mode 160000 index 0000000..ff654b6 --- /dev/null +++ b/py_slvs_mac @@ -0,0 +1 @@ +Subproject commit ff654b673c06bc5209522ba8a4dc2c5e9a812487 diff --git a/sys_slvs.py b/sys_slvs.py index 99eafc7..ca46b10 100644 --- a/sys_slvs.py +++ b/sys_slvs.py @@ -1,6 +1,11 @@ from .system import System, SystemBase, SystemExtension from .utils import syslogger as logger, objName -from .py_slvs import slvs +import platform + +if platform.system() == 'Darwin': + from .py_slvs_mac import slvs +else: + from .py_slvs import slvs class SystemSlvs(SystemBase): __metaclass__ = System