summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMarc Abramowitz <marc@marc-abramowitz.com>2015-01-18 00:46:08 -0800
committerMarc Abramowitz <marc@marc-abramowitz.com>2015-01-18 00:48:51 -0800
commitdd0c2827920493bb709c4842150844827d9d08ab (patch)
treed8fc4bf9f98cdf07900f681196f645305314b4fd /setup.py
parentd348d1581e80573eb997a0fd59c81dbdb88e62f2 (diff)
Set MACOSX_DEPLOYMENT_TARGET env variable
to prevent errors like: - `targeted OS version does not support use of thread local variables` - `$MACOSX_DEPLOYMENT_TARGET mismatch: now "10.5" but "10.6" during configure` Refs: #4
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 3402dcc..1d165a6 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
import os
+import platform
+import sysconfig
import subprocess
import tarfile
import shutil
@@ -54,6 +56,10 @@ class jq_build_ext(build_ext):
except subprocess.CalledProcessError:
print("No Homebrew yacc found")
+ macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
+ if macosx_deployment_target:
+ os.environ['MACOSX_DEPLOYMENT_TARGET'] = macosx_deployment_target
+
command(["autoreconf", "-i"])
command(["./configure"] + configure_args)
command(["make"])