You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by jc...@apache.org on 2016/12/09 02:31:53 UTC

aurora git commit: Clean up the python prepare_binary script:

Repository: aurora
Updated Branches:
  refs/heads/master f5749ceb2 -> dd86d2f62


Clean up the python prepare_binary script:

- Specify python2.7 when extracting options from pants.ini during thrift bootstrap.
- We must run pants from the repo root.

Reviewed at https://reviews.apache.org/r/54550/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/dd86d2f6
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/dd86d2f6
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/dd86d2f6

Branch: refs/heads/master
Commit: dd86d2f62d52cccfc60f4fef3d585ec5e8f75f74
Parents: f5749ce
Author: Joshua Cohen <jc...@apache.org>
Authored: Thu Dec 8 20:31:31 2016 -0600
Committer: Joshua Cohen <jc...@apache.org>
Committed: Thu Dec 8 20:31:31 2016 -0600

----------------------------------------------------------------------
 build-support/thrift/prepare_binary.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/dd86d2f6/build-support/thrift/prepare_binary.sh
----------------------------------------------------------------------
diff --git a/build-support/thrift/prepare_binary.sh b/build-support/thrift/prepare_binary.sh
index a96b33e..e3b46aa 100755
--- a/build-support/thrift/prepare_binary.sh
+++ b/build-support/thrift/prepare_binary.sh
@@ -1,5 +1,6 @@
 #!/usr/bin/env bash
 
+set -o xtrace
 set -o errexit
 set -o nounset
 
@@ -23,7 +24,9 @@ readonly KNOWN_OS_IDS=(
 
 # Runs pants safely as an indirect pants subprocess.
 function run_pants() {
-  ${HERE}/../../pants --no-colors --no-lock "$@"
+  pushd "${HERE}/../.."
+  ./pants --no-colors --no-lock "$@"
+  popd
 }
 
 # Returns the pants option value for the given scope and name.
@@ -32,7 +35,7 @@ function get_pants_option() {
   readonly name=$2
 
   run_pants options --scope=${scope} --name=${name} --output-format=json 2>/dev/null | \
-    python -c "import json, sys; print(json.load(sys.stdin)['${scope}.${name}']['value'])"
+    python2.7 -c "import json, sys; print(json.load(sys.stdin)['${scope}.${name}']['value'])"
 }
 
 # Ensures the thrift binary of the given version is built for the current machine and returns its