diff --git a/bin/buckd b/bin/buckd index 14a6c2e..0f4441f 100755 --- a/bin/buckd +++ b/bin/buckd @@ -9,4 +9,5 @@ while [ -h "$BUCK_PATH" ]; do done BUCK_DIR=$(dirname "$BUCK_PATH") -PYTHONPATH="$BUCK_DIR"/../third-party/nailgun exec python "$BUCK_DIR"/../programs/buckd.py "$@" +PYTHON=$(command -v python2 python | head -1) +PYTHONPATH="$BUCK_DIR"/../third-party/nailgun exec $PYTHON "$BUCK_DIR"/../programs/buckd.py "$@" diff --git a/build.xml b/build.xml index 247747a..657b54f 100644 --- a/build.xml +++ b/build.xml @@ -207,7 +207,7 @@ - + @@ -679,7 +679,7 @@ - + @@ -690,21 +690,21 @@ - + - + - + @@ -712,7 +712,7 @@ - + @@ -720,14 +720,14 @@ - + - + @@ -853,7 +853,7 @@ - + diff --git a/docs/presentations/droidcon-nyc-2014/images/create_images.py b/docs/presentations/droidcon-nyc-2014/images/create_images.py index cd6f6b9..27e02c5 100755 --- a/docs/presentations/droidcon-nyc-2014/images/create_images.py +++ b/docs/presentations/droidcon-nyc-2014/images/create_images.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ This exports a bunch of images from the base-dependency-diagram.graffle file using py-appscript: diff --git a/docs/soy2html.py b/docs/soy2html.py index ea55ed3..9bc7d31 100644 --- a/docs/soy2html.py +++ b/docs/soy2html.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # This script is designed to be invoked by soy2html.sh. # Usage: diff --git a/programs/buck.py b/programs/buck.py index 33be17b..d1b8cea 100755 --- a/programs/buck.py +++ b/programs/buck.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 from __future__ import print_function import os import signal diff --git a/programs/buckd.py b/programs/buckd.py index 8ef3d06..3458bbe 100755 --- a/programs/buckd.py +++ b/programs/buckd.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 from __future__ import print_function import os import sys diff --git a/programs/timing.py b/programs/timing.py index 60c1044..5def8ac 100644 --- a/programs/timing.py +++ b/programs/timing.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import ctypes import platform diff --git a/programs/tracing.py b/programs/tracing.py index 6027013..02adbda 100644 --- a/programs/tracing.py +++ b/programs/tracing.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import errno import glob diff --git a/scripts/assert_code_coverage.py b/scripts/assert_code_coverage.py index 8f6a772..3d68ab7 100644 --- a/scripts/assert_code_coverage.py +++ b/scripts/assert_code_coverage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import xml.etree.ElementTree as ElementTree import os diff --git a/scripts/autofix_lint.py b/scripts/autofix_lint.py index e7d5a62..ea127e3 100755 --- a/scripts/autofix_lint.py +++ b/scripts/autofix_lint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import argparse import re diff --git a/scripts/intellij/generate_grammar_kit.py b/scripts/intellij/generate_grammar_kit.py index afb908a..b49607b 100644 --- a/scripts/intellij/generate_grammar_kit.py +++ b/scripts/intellij/generate_grammar_kit.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import subprocess import os diff --git a/scripts/perf_test_hg.py b/scripts/perf_test_hg.py index e7c8427..9c1502f 100755 --- a/scripts/perf_test_hg.py +++ b/scripts/perf_test_hg.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """Performance test to make sure rule keys are unaffected by absolute paths. The general algorithm is: diff --git a/scripts/verify-javadoc.py b/scripts/verify-javadoc.py index 60cbbc2..ff74c3b 100755 --- a/scripts/verify-javadoc.py +++ b/scripts/verify-javadoc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Examines the output from running Javadoc via Ant and checks to see if any # warnings were emitted. If so, fail the build unless the warning is in the diff --git a/src/com/facebook/buck/apple/project_generator/build-with-buck.st b/src/com/facebook/buck/apple/project_generator/build-with-buck.st index f596c6d..2ba6c7c 100644 --- a/src/com/facebook/buck/apple/project_generator/build-with-buck.st +++ b/src/com/facebook/buck/apple/project_generator/build-with-buck.st @@ -1,7 +1,7 @@ set -e cd -BUILD_WITH_BUCK_COMMAND=`python -- "" ` +BUILD_WITH_BUCK_COMMAND=`python2 -- "" ` echo $BUILD_WITH_BUCK_COMMAND BUCK_BUNDLE_OUTPUT_PATH=`eval $BUILD_WITH_BUCK_COMMAND | awk 'NR>1 {print $2}'` @@ -22,9 +22,9 @@ if [ "$DEBUG_INFORMATION_FORMAT" = "dwarf-with-dsym" ] || [ "" == "t export LC_ALL=C sed -i '' 's|||g' /Contents/Resources/DWARF/ - python --verbose + python2 --verbose else echo "DWARF MODE" echo "Absolutifying object file paths in binary: $BUCK_BUNDLE_OUTPUT_PATH/" machoutils absolutify_object_paths --binary $BUCK_BUNDLE_OUTPUT_PATH/ --output / --old_compdir "" --new_compdir "" -fi \ No newline at end of file +fi diff --git a/src/com/facebook/buck/python/make_pex.py b/src/com/facebook/buck/python/make_pex.py index 0359eef..ff54c34 100755 --- a/src/com/facebook/buck/python/make_pex.py +++ b/src/com/facebook/buck/python/make_pex.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 from __future__ import print_function import contextlib diff --git a/test/com/facebook/buck/android/testdata/android_project/java/com/preprocess/convert.py b/test/com/facebook/buck/android/testdata/android_project/java/com/preprocess/convert.py index 84276d4..15239c6 100755 --- a/test/com/facebook/buck/android/testdata/android_project/java/com/preprocess/convert.py +++ b/test/com/facebook/buck/android/testdata/android_project/java/com/preprocess/convert.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys import os import zipfile diff --git a/test/com/facebook/buck/rage/testdata/interactive_report/extra.py b/test/com/facebook/buck/rage/testdata/interactive_report/extra.py index f899a7e..69e4bc8 100755 --- a/test/com/facebook/buck/rage/testdata/interactive_report/extra.py +++ b/test/com/facebook/buck/rage/testdata/interactive_report/extra.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 from __future__ import print_function import argparse diff --git a/third-party/nailgun/pynailgun/ng.py b/third-party/nailgun/pynailgun/ng.py index 577e868..49a0521 100755 --- a/third-party/nailgun/pynailgun/ng.py +++ b/third-party/nailgun/pynailgun/ng.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # # Copyright 2004-2015, Martian Software, Inc. # diff --git a/third-party/py/pywatchman/setup.py b/third-party/py/pywatchman/setup.py index 243e83f..4c4d277 100755 --- a/third-party/py/pywatchman/setup.py +++ b/third-party/py/pywatchman/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # vim:ts=4:sw=4:et: try: diff --git a/third-party/py/pywatchman/tests/tests.py b/third-party/py/pywatchman/tests/tests.py index 02d9a0b..92492e9 100755 --- a/third-party/py/pywatchman/tests/tests.py +++ b/third-party/py/pywatchman/tests/tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # vim:ts=4:sw=4:et: from __future__ import absolute_import from __future__ import division