summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-09-08 23:32:59 +0100
committerMichael Williamson <mike@zwobble.org>2015-09-09 00:08:45 +0100
commit75e786256c2bd1d3acdbccb7bf769443679f590d (patch)
tree0e615e0b931ffbda8e8944762554c2b622d47571 /setup.py
parent67294953a9ef2c72584bc6801457f3de2dec5c7f (diff)
Update jq to 1.5
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py24
1 files changed, 4 insertions, 20 deletions
diff --git a/setup.py b/setup.py
index e142b04..a5b22be 100644
--- a/setup.py
+++ b/setup.py
@@ -28,14 +28,14 @@ def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
-tarball_path = path_in_dir("_jq-lib-1.4.tar.gz")
-jq_lib_dir = path_in_dir("jq-jq-1.4")
+tarball_path = path_in_dir("_jq-lib-1.5.tar.gz")
+jq_lib_dir = path_in_dir("jq-jq-1.5")
class jq_build_ext(build_ext):
def run(self):
if os.path.exists(tarball_path):
os.unlink(tarball_path)
- urlretrieve("https://github.com/stedolan/jq/archive/jq-1.4.tar.gz", tarball_path)
+ urlretrieve("https://github.com/stedolan/jq/archive/jq-1.5.tar.gz", tarball_path)
if os.path.exists(jq_lib_dir):
shutil.rmtree(jq_lib_dir)
@@ -45,28 +45,12 @@ class jq_build_ext(build_ext):
print("Executing: %s" % ' '.join(args))
subprocess.check_call(args, cwd=jq_lib_dir)
- configure_args = ["CFLAGS=-fPIC"]
-
- if os.path.exists('/usr/local/bin/brew') and os.path.exists('/usr/local/Cellar'):
- print("Found Homebrew installation")
- # Mac OS X with Homebrew
- # Mac OS X usually ships with an old bison (yacc)
- # E.g.: OS X 10.9 has bison 2.3, but jq requires bison >= 2.5
- # Try to use Homebrew version of bison (3.0.3 as of this writing)
- try:
- yacc = subprocess.check_output("/usr/local/bin/brew ls bison | grep bin/yacc", shell=True).rstrip()
- print("Found Homebrew yacc at %s" % yacc)
- if yacc:
- configure_args.append('YACC=' + yacc)
- 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(["./configure", "CFLAGS=-fPIC", "--disable-maintainer-mode"])
command(["make"])
build_ext.run(self)