diff --git a/setup.py b/setup.py index 678cde50..6ed61b91 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,8 @@ from Cython.Distutils import build_ext from Cython.Build import cythonize from setuptools import dist +from distutils.sysconfig import get_config_var, get_python_inc +from distutils.version import LooseVersion sys.path.insert(1, 'src/') import dp_build @@ -41,7 +43,9 @@ def run(self): os.system("latexmk -pdf fdasrsf.tex") os.chdir("../../../") -os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.14' +if (sys.platform == 'darwin'): + mac_ver = str(LooseVersion(get_config_var('MACOSX_DEPLOYMENT_TARGET'))) + os.environ['MACOSX_DEPLOYMENT_TARGET'] = mac_ver extensions = [ Extension(name="optimum_reparamN2",