diff --git a/setup.py b/setup.py index dc7985260..39608ef05 100755 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ from setuptools import setup, find_packages import os from os import path +import sys import numpy as np from Cython.Build import cythonize from setuptools.extension import Extension @@ -44,10 +45,16 @@ # compile with: python setup.py build_ext -i # clean up with: python setup.py clean --all +if sys.platform == 'darwin': + extra_compiler_args = ['-stdlib=libc++'] +else: + extra_compiler_args = [] + ext_modules = [Extension("caiman.source_extraction.cnmf.oasis", sources=["caiman/source_extraction/cnmf/oasis.pyx"], include_dirs=[np.get_include()], - language="c++")] + language="c++", + extra_compile_args = extra_compiler_args)] setup( name='caiman',