diff options
| author | Marc Abramowitz <marc@marc-abramowitz.com> | 2015-01-18 00:46:08 -0800 |
|---|---|---|
| committer | Marc Abramowitz <marc@marc-abramowitz.com> | 2015-01-18 00:48:51 -0800 |
| commit | dd0c2827920493bb709c4842150844827d9d08ab (patch) | |
| tree | d8fc4bf9f98cdf07900f681196f645305314b4fd | |
| parent | d348d1581e80573eb997a0fd59c81dbdb88e62f2 (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
| -rw-r--r-- | setup.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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"]) |
