From 8cb839a3e6e230ea184e6126ab877ef8dd04848c Mon Sep 17 00:00:00 2001 From: Jing Wang Date: Tue, 6 Mar 2018 17:25:22 -0800 Subject: [PATCH] Be explicit about which python we're using Homebrew recently updated their python package to install Python 3 as /usr/local/bin/python, which breaks this code. I'm using python2.7 instead of python2 because python2 doesn't exist on Mac. --- scripts/export-generated | 4 +--- stone.gradle | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/export-generated b/scripts/export-generated index 3b6088e42..7aa52eeca 100755 --- a/scripts/export-generated +++ b/scripts/export-generated @@ -1,11 +1,9 @@ -#! /usr/bin/env python +#!/usr/bin/env python2.7 from __future__ import absolute_import, division, print_function, unicode_literals import argparse import errno -import glob import os -import shutil import subprocess import sys diff --git a/stone.gradle b/stone.gradle index 24e3d59c3..f1758a9ef 100644 --- a/stone.gradle +++ b/stone.gradle @@ -44,7 +44,7 @@ def runStoneGenerator(StoneConfig config, if (config.dataTypesOnly) { project.exec { standardOutput = new FileOutputStream(logFile) - commandLine "python", "-m", "stone.cli" + commandLine "python2.7", "-m", "stone.cli" environment PYTHONPATH: stoneDir.absolutePath args "--clean-build" @@ -71,7 +71,7 @@ def runStoneGenerator(StoneConfig config, project.exec { standardOutput = new FileOutputStream(logFile, append) - commandLine "python", "-m", "stone.cli" + commandLine "python2.7", "-m", "stone.cli" environment PYTHONPATH: stoneDir.absolutePath if (isFirst) {