diff --git a/setup.py b/setup.py index e0745716..3b0d1ca7 100644 --- a/setup.py +++ b/setup.py @@ -92,13 +92,16 @@ vnoes = Extension( libraries=["oes_api"], extra_compile_args=compiler_flags, extra_link_args=extra_link_args, + runtime_library_dirs=["$ORIGIN"], depends=[], language="cpp", ) -if platform.uname().system == "Windows": +if platform.system() == "Windows": # use pre-built pyd for windows ( support python 3.7 only ) ext_modules = [] +elif platform.system() == "Darwin": + ext_modules = [] else: ext_modules = [vnctptd, vnctpmd, vnoes] diff --git a/tests/test_import_all.py b/tests/test_import_all.py index df930c89..38d240f8 100644 --- a/tests/test_import_all.py +++ b/tests/test_import_all.py @@ -1,5 +1,6 @@ # flake8: noqa import unittest +import platform # noinspection PyUnresolvedReferences @@ -24,12 +25,14 @@ class ImportTest(unittest.TestCase): def test_import_ib_gateway(self): from vnpy.gateway.ib import IbGateway + @unittest.skipIf(platform.system() == "Darwin", "Not supported yet under osx") def test_import_ctp_gateway(self): from vnpy.gateway.ctp import CtpGateway def test_import_tiger_gateway(self): from vnpy.gateway.tiger import TigerGateway + @unittest.skipIf(platform.system() == "Darwin", "Not supported yet under osx") def test_import_oes_gateway(self): from vnpy.gateway.oes import OesGateway