[Piglit] [Patch v2] python: change chbang to python2

Ilia Mirkin imirkin at alum.mit.edu
Mon Jun 16 15:01:51 PDT 2014


On Mon, Jun 16, 2014 at 5:54 PM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> This replaces #!/usr/bin/env python with #!/usr/bin/env python2, which
> fixes the build on archlinux. This has been proposed before, but at that
> time debian didn't provide a python2 executable, so it would break
> debian. Debian sid as of today provides python2.
>
> v2: - fix piglit as well

Can I interest you in

git grep 'env python'

This also picks up some stuff in generated_tests, framework, and
tests/. Those are potentially unnecessary to have in the first place,
but IMHO having a mix is less-than-ideal.

There's even one that has a space between # and !, so clearly
untested... perhaps worth removing the shebang if it's not run
directly?

generated_tests/generate-cl-int-builtins.py:# !/usr/bin/env python

>
> Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

> ---
>  generate-glean-tests.py  | 2 +-
>  piglit                   | 2 +-
>  piglit-merge-results.py  | 2 +-
>  piglit-print-commands.py | 2 +-
>  piglit-resume.py         | 2 +-
>  piglit-run.py            | 2 +-
>  piglit-summary-html.py   | 2 +-
>  piglit-summary-junit.py  | 2 +-
>  piglit-summary.py        | 2 +-
>  9 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/generate-glean-tests.py b/generate-glean-tests.py
> index df08ede..aafe256 100755
> --- a/generate-glean-tests.py
> +++ b/generate-glean-tests.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python2
>  # -*- coding: utf-8 -*-
>  #
>  # Copyright © 2010 Intel Corporation
> diff --git a/piglit b/piglit
> index bf53876..70a02d5 100755
> --- a/piglit
> +++ b/piglit
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python2
>
>  # Copyright (c) 2014 Intel Corporation
>
> diff --git a/piglit-merge-results.py b/piglit-merge-results.py
> index e78a5d0..a6c0065 100755
> --- a/piglit-merge-results.py
> +++ b/piglit-merge-results.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python2
>  #
>  # Permission is hereby granted, free of charge, to any person
>  # obtaining a copy of this software and associated documentation
> diff --git a/piglit-print-commands.py b/piglit-print-commands.py
> index 635d27c..d88ab1c 100755
> --- a/piglit-print-commands.py
> +++ b/piglit-print-commands.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python2
>  #
>  # Permission is hereby granted, free of charge, to any person
>  # obtaining a copy of this software and associated documentation
> diff --git a/piglit-resume.py b/piglit-resume.py
> index 195a5db..6b78529 100755
> --- a/piglit-resume.py
> +++ b/piglit-resume.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python2
>
>  # Copyright (c) 2014 Intel Corporation
>
> diff --git a/piglit-run.py b/piglit-run.py
> index 7c2d71a..4c0f878 100755
> --- a/piglit-run.py
> +++ b/piglit-run.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python2
>
>  # Copyright (c) 2014 Intel Corporation
>
> diff --git a/piglit-summary-html.py b/piglit-summary-html.py
> index 078c7cb..4b5278e 100755
> --- a/piglit-summary-html.py
> +++ b/piglit-summary-html.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python2
>
>  # Copyright (c) 2014 Intel Corporation
>
> diff --git a/piglit-summary-junit.py b/piglit-summary-junit.py
> index 5aa1969..5c40a73 100755
> --- a/piglit-summary-junit.py
> +++ b/piglit-summary-junit.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python2
>
>  # Copyright (c) 2014 Intel Corporation
>
> diff --git a/piglit-summary.py b/piglit-summary.py
> index c5a3923..d1294be 100755
> --- a/piglit-summary.py
> +++ b/piglit-summary.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python2
>
>  # Copyright (c) 2014 Intel Corporation
>
> --
> 2.0.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list