diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | force-python2.patch | 289 | ||||
-rw-r--r-- | python-test-output.patch | 8 |
4 files changed, 308 insertions, 13 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Mon Oct 3 09:14:13 UTC 2016 +# Fri Nov 18 01:19:19 UTC 2016 pkgbase = buck pkgdesc = A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages. - pkgver = 2016.09.26.01 + pkgver = 2016.11.11.01 pkgrel = 1 url = https://buckbuild.com arch = i686 @@ -13,10 +13,12 @@ pkgbase = buck depends = java-runtime-headless>=7 depends = python2 optdepends = watchman: prevent Buck from parsing all of your build files every time - source = https://github.com/facebook/buck/archive/v2016.09.26.01.tar.gz + source = https://github.com/facebook/buck/archive/v2016.11.11.01.tar.gz source = python-test-output.patch - sha256sums = e76204f580d89431c948ce5ba8c02f4a6aa84ab3d76760db77004adac091dce8 - sha256sums = 45f128aeb4912aa417a774fac6d27805b92193231b418dc0a1f12afc923d5402 + source = force-python2.patch + sha256sums = 9e0d7f08003780dae91638c5cc4b945d27221788ed2426b71eee3f084880457b + sha256sums = dd5edf5b6e9be0ac218e1f0f7c5129d871748a6efd119491c8ec69b74ff6bfcf + sha256sums = b231260484ef61eeb35d74c908f2d0a900c1dd64a13e899d152095c320d23605 pkgname = buck @@ -1,7 +1,7 @@ # Maintainer: Joel Goguen <contact+aur@jgoguen.ca> pkgname=buck -pkgver="2016.09.26.01" +pkgver="2016.11.11.01" pkgrel=1 pkgdesc="A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages." arch=('i686' 'x86_64') @@ -13,16 +13,18 @@ license=('Apache') source=( "https://github.com/facebook/${pkgname}/archive/v${pkgver}.tar.gz" 'python-test-output.patch' + 'force-python2.patch' ) sha256sums=( - 'e76204f580d89431c948ce5ba8c02f4a6aa84ab3d76760db77004adac091dce8' - '45f128aeb4912aa417a774fac6d27805b92193231b418dc0a1f12afc923d5402' + '9e0d7f08003780dae91638c5cc4b945d27221788ed2426b71eee3f084880457b' + 'dd5edf5b6e9be0ac218e1f0f7c5129d871748a6efd119491c8ec69b74ff6bfcf' + 'b231260484ef61eeb35d74c908f2d0a900c1dd64a13e899d152095c320d23605' ) prepare() { cd "${srcdir}/${pkgname}-${pkgver}" - - patch -p1 <"${srcdir}/../python-test-output.patch" + patch -p1 <"${srcdir}/python-test-output.patch" + patch -p1 <"${srcdir}/force-python2.patch" } build() { diff --git a/force-python2.patch b/force-python2.patch new file mode 100644 index 000000000000..94c0f21bede7 --- /dev/null +++ b/force-python2.patch @@ -0,0 +1,289 @@ +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 @@ + </target> + + <target name="python-get-prefix"> +- <exec executable="python" failonerror="true" outputproperty="python.prefix" logError="true"> ++ <exec executable="python2" failonerror="true" outputproperty="python.prefix" logError="true"> + <arg value="-c" /> + <arg value="import distutils.sysconfig; print(distutils.sysconfig.PREFIX)" /> + </exec> +@@ -679,7 +679,7 @@ + <target name="py-test" description="runs the Python tests" depends="buck-py-test, class-loader-py-test, log-rotation-py-test, pathlib-py-test, zip-munger-py-test, buck-tool-py-test, scandir-py-test" /> + + <target name="buck-py-test" description="tests the BUCK parser"> +- <exec executable="python" failonerror="true" dir="${basedir}/src/com/facebook/buck/json"> ++ <exec executable="python2" failonerror="true" dir="${basedir}/src/com/facebook/buck/json"> + <!-- The py folder is actually a python package, so use module import style here. --> + <env key="PYTHONPATH" path="${buck.pythonpath}" /> + <arg value="-m" /> +@@ -690,21 +690,21 @@ + </target> + + <target name="class-loader-py-test" description="tests BUCK's class loader setup"> +- <exec executable="python" failonerror="true"> ++ <exec executable="python2" failonerror="true"> + <env key="PYTHONPATH" path="${buck.pythonpath}" /> + <arg value="test/com/facebook/buck/cli/bootstrapper/class_loader_test.py" /> + </exec> + </target> + + <target name="log-rotation-py-test" description="tests BUCK's logger setup"> +- <exec executable="python" failonerror="true"> ++ <exec executable="python2" failonerror="true"> + <env key="PYTHONPATH" path="${buck.pythonpath}" /> + <arg value="test/com/facebook/buck/log/test_log_rotation.py" /> + </exec> + </target> + + <target name="pathlib-py-test" description="tests pathlib.py"> +- <exec executable="python" failonerror="true" dir="${pathlib.dir}"> ++ <exec executable="python2" failonerror="true" dir="${pathlib.dir}"> + <!-- Needed on Python 2.6. --> + <env key="PYTHONPATH" path="${unittest2.dir}" /> + <arg value="test_pathlib.py" /> +@@ -712,7 +712,7 @@ + </target> + + <target name="scandir-py-test" description="tests scandir.py"> +- <exec executable="python" failonerror="true" dir="${scandir.dir}/test"> ++ <exec executable="python2" failonerror="true" dir="${scandir.dir}/test"> + <!-- Needed on Python 2.6. --> + <env key="PYTHONPATH" path="${unittest2.dir}" /> + <arg value="run_tests.py" /> +@@ -720,14 +720,14 @@ + </target> + + <target name="zip-munger-py-test" description="tests munger.py"> +- <exec executable="python" failonerror="true"> ++ <exec executable="python2" failonerror="true"> + <env key="PYTHONPATH" path="${basedir}" /> + <arg value="py/buck/zip/test_munger.py" /> + </exec> + </target> + + <target name="buck-tool-py-test" description="tests buck_tool.py"> +- <exec executable="python" failonerror="true"> ++ <exec executable="python2" failonerror="true"> + <env key="PYTHONPATH" path="${buck.pythonpath}" /> + <arg value="programs/test_buck_tool.py" /> + </exec> +@@ -853,7 +853,7 @@ + </target> + + <target name="missing-test-files-check"> +- <exec dir="${user.dir}/scripts" executable="python" failonerror="true"> ++ <exec dir="${user.dir}/scripts" executable="python2" failonerror="true"> + <arg line="verify-test-files.py" /> + </exec> + </target> +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 <repo_root> + +-BUILD_WITH_BUCK_COMMAND=`python <path_to_build_with_buck_py> <repo_root> <path_to_buck> -- "<build_flags>" <escaped_build_target> <buck_dwarf_flavor> <buck_dsym_flavor>` ++BUILD_WITH_BUCK_COMMAND=`python2 <path_to_build_with_buck_py> <repo_root> <path_to_buck> -- "<build_flags>" <escaped_build_target> <buck_dwarf_flavor> <buck_dsym_flavor>` + 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" ] || [ "<force_dsym>" == "t + export LC_ALL=C + sed -i '' 's|<comp_dir>|<padded_source_dir>|g' <resolved_dsym_destination>/Contents/Resources/DWARF/<binary_name> + +- python <path_to_fix_uuid_script> --verbose <resolved_bundle_destination> <resolved_dsym_destination> <binary_name> ++ python2 <path_to_fix_uuid_script> --verbose <resolved_bundle_destination> <resolved_dsym_destination> <binary_name> + else + echo "DWARF MODE" + echo "Absolutifying object file paths in binary: $BUCK_BUNDLE_OUTPUT_PATH/<binary_name>" + <path_to_buck> machoutils absolutify_object_paths --binary $BUCK_BUNDLE_OUTPUT_PATH/<binary_name> --output <resolved_bundle_destination>/<binary_name> --old_compdir "<comp_dir>" --new_compdir "<new_comp_dir>" +-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 diff --git a/python-test-output.patch b/python-test-output.patch index 4b1224c00c6b..1bab975bf7fa 100644 --- a/python-test-output.patch +++ b/python-test-output.patch @@ -1,6 +1,8 @@ ---- ./test/com/facebook/buck/cli/ExternalTestRunnerIntegrationTest.java.orig 2016-04-22 15:23:01.347436678 -0700 -+++ ./test/com/facebook/buck/cli/ExternalTestRunnerIntegrationTest.java 2016-04-22 15:23:24.214103542 -0700 -@@ -72,9 +72,9 @@ +diff --git a/test/com/facebook/buck/cli/ExternalTestRunnerIntegrationTest.java b/test/com/facebook/buck/cli/ExternalTestRunnerIntegrationTest.java +index 62ab929..6f055b2 100644 +--- a/test/com/facebook/buck/cli/ExternalTestRunnerIntegrationTest.java ++++ b/test/com/facebook/buck/cli/ExternalTestRunnerIntegrationTest.java +@@ -72,9 +72,9 @@ public class ExternalTestRunnerIntegrationTest { result.assertSuccess(); assertThat( result.getStdout(), |