Skip to content

Commit

Permalink
change setup.py to handle multiple mac os x versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtuck committed Mar 25, 2021
1 parent b93b78b commit 95992e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 95992e8

Please sign in to comment.