From d237dd2c68ed083d65d69b31d0a1905262a9edca Mon Sep 17 00:00:00 2001 From: Tom Aldcroft Date: Thu, 12 Dec 2019 05:46:59 -0700 Subject: [PATCH] Add compile arg for building on MacOS Catalina / Xcode 11.2 --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 604dac2..f432e39 100755 --- a/setup.py +++ b/setup.py @@ -1,14 +1,17 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst from setuptools import setup, Extension -import os +import platform from Cython.Build import cythonize -if (os.name == "nt"): +os_name = platform.system() +if (os_name == "Windows"): compile_args = ['/EHs', '/D_CRT_SECURE_NO_DEPRECATE'] else: compile_args = ['-Wno-switch-enum', '-Wno-switch', '-Wno-switch-default', '-Wno-deprecated', '-Wno-parentheses'] +if os_name == 'Darwin': + compile_args += ['-stdlib=libc++'] extensions = [Extension("*", ["Chandra/Time/_axTime3.pyx"], extra_compile_args=compile_args)]