Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Kenneth Graunke
On Friday, June 20, 2014 12:04:01 AM Dylan Baker wrote:
 This reverts commit 40b5d5288991fec2cc76ea4af7050555be467126.
 
 The patch to be reverted breaks users of *BSD, solaris, and OSX which
 don't provide a python2 symlink, making it a regression.
 
 The patch however, fixes python for arch users whos python executable
 incorrectly is python3. This is a bug that Arch is not willing to fix.
 
 bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80261

I for one was happy to see the change to /usr/bin/python2, as it makes things 
easier for Arch Linux users.  There are a lot of Piglit users running Arch 
Linux, and AFAICT only a couple using BSD/Solaris/OSX.

Recently, a bunch of my coworkers who are Debian/Fedora/Gentoo users have 
tried to use my Arch Linux box, and didn't realize they needed to work around 
this issue.  They were horribly confused until I explained how to fix it.

Let's look at the two failure modes:

1. Arch Linux with #! /usr/bin/env python

$ ./piglit-run.py tests/gpu results
Traceback (most recent call last):
  File ./piglit-run.py, line 30, in module
from framework.programs.run import run
  File /home/kwg/Projects/piglit/framework/programs/run.py, line 30, in 
module
import framework.core as core
  File /home/kwg/Projects/piglit/framework/core.py, line 32, in module
import ConfigParser
ImportError: No module named 'ConfigParser'

This failure mode is incredibly cryptic.  The workaround is easy:
run python2 piglit-run.py tests/gpu results.  But it's not obvious.

2. BSD/OSX/Solaris with #! /usr/bin/env python2

$ ./piglit-run.py tests/gpu results
/usr/bin/env: python2: No such file or directory

This is incredibly clear, at least.  The workaround is both easy and obvious: 
put a python2 - python symlink anywhere in your path.  It doesn't even have 
to be installed system-wide - you can put it in ~/bin if you like.

For the record, I dislike that Arch has installed Python 3 as /usr/bin/python.  
It's incompatible and has caused no end of headaches for upstreams.  But, 
there's not a lot we can do about that.  Most systems have started installing 
python 2.x as both /usr/bin/python and /usr/bin/python2, which seems 
reasonable enough.

This is obviously a frustrating issue, but I hope the patch can stay.  Not 
particularly for my benefit (I know the workaround), but for other Arch users 
or for non-Arch people haplessly stuck using someone else's machine.

--Ken

signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Ilia Mirkin
On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke kenn...@whitecape.org wrote:
 On Friday, June 20, 2014 12:04:01 AM Dylan Baker wrote:
 This reverts commit 40b5d5288991fec2cc76ea4af7050555be467126.

 The patch to be reverted breaks users of *BSD, solaris, and OSX which
 don't provide a python2 symlink, making it a regression.

 The patch however, fixes python for arch users whos python executable
 incorrectly is python3. This is a bug that Arch is not willing to fix.

 bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80261

 I for one was happy to see the change to /usr/bin/python2, as it makes things
 easier for Arch Linux users.  There are a lot of Piglit users running Arch
 Linux, and AFAICT only a couple using BSD/Solaris/OSX.

 Recently, a bunch of my coworkers who are Debian/Fedora/Gentoo users have
 tried to use my Arch Linux box, and didn't realize they needed to work around
 this issue.  They were horribly confused until I explained how to fix it.

 Let's look at the two failure modes:

 1. Arch Linux with #! /usr/bin/env python

 $ ./piglit-run.py tests/gpu results
 Traceback (most recent call last):
   File ./piglit-run.py, line 30, in module
 from framework.programs.run import run
   File /home/kwg/Projects/piglit/framework/programs/run.py, line 30, in
 module
 import framework.core as core
   File /home/kwg/Projects/piglit/framework/core.py, line 32, in module
 import ConfigParser
 ImportError: No module named 'ConfigParser'

 This failure mode is incredibly cryptic.  The workaround is easy:
 run python2 piglit-run.py tests/gpu results.  But it's not obvious.

Easy enough to throw in a test into __init__.py checking the python
version... if it's != 2, abort, telling them that their system is
broken.


 2. BSD/OSX/Solaris with #! /usr/bin/env python2

 $ ./piglit-run.py tests/gpu results
 /usr/bin/env: python2: No such file or directory

 This is incredibly clear, at least.  The workaround is both easy and obvious:
 put a python2 - python symlink anywhere in your path.  It doesn't even have
 to be installed system-wide - you can put it in ~/bin if you like.

 For the record, I dislike that Arch has installed Python 3 as /usr/bin/python.
 It's incompatible and has caused no end of headaches for upstreams.  But,
 there's not a lot we can do about that.

Isn't there? Refuse to go along with the idiocy until Arch fixes it or
people stop using it...

  -ilia

  Most systems have started installing
 python 2.x as both /usr/bin/python and /usr/bin/python2, which seems
 reasonable enough.


 This is obviously a frustrating issue, but I hope the patch can stay.  Not
 particularly for my benefit (I know the workaround), but for other Arch users
 or for non-Arch people haplessly stuck using someone else's machine.

 --Ken
 ___
 Piglit mailing list
 Piglit@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/piglit

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Ilia Mirkin
On Tue, Jun 24, 2014 at 11:53 AM, Kenneth Graunke kenn...@whitecape.org wrote:
 On Tuesday, June 24, 2014 11:27:13 AM Ilia Mirkin wrote:
 On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke kenn...@whitecape.org
 wrote:
  On Friday, June 20, 2014 12:04:01 AM Dylan Baker wrote:
  This reverts commit 40b5d5288991fec2cc76ea4af7050555be467126.
 
  The patch to be reverted breaks users of *BSD, solaris, and OSX which
  don't provide a python2 symlink, making it a regression.
 
  The patch however, fixes python for arch users whos python executable
  incorrectly is python3. This is a bug that Arch is not willing to fix.
 
  bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80261
 
  I for one was happy to see the change to /usr/bin/python2, as it makes
 things
  easier for Arch Linux users.  There are a lot of Piglit users running Arch
  Linux, and AFAICT only a couple using BSD/Solaris/OSX.
 
  Recently, a bunch of my coworkers who are Debian/Fedora/Gentoo users have
  tried to use my Arch Linux box, and didn't realize they needed to work
 around
  this issue.  They were horribly confused until I explained how to fix it.
 
  Let's look at the two failure modes:
 
  1. Arch Linux with #! /usr/bin/env python
 
  $ ./piglit-run.py tests/gpu results
  Traceback (most recent call last):
File ./piglit-run.py, line 30, in module
  from framework.programs.run import run
File /home/kwg/Projects/piglit/framework/programs/run.py, line 30, in
  module
  import framework.core as core
File /home/kwg/Projects/piglit/framework/core.py, line 32, in module
  import ConfigParser
  ImportError: No module named 'ConfigParser'
 
  This failure mode is incredibly cryptic.  The workaround is easy:
  run python2 piglit-run.py tests/gpu results.  But it's not obvious.

 Easy enough to throw in a test into __init__.py checking the python
 version... if it's != 2, abort, telling them that their system is
 broken.

 Yeah, that would be nice.  Maybe that's the solution.

  2. BSD/OSX/Solaris with #! /usr/bin/env python2
 
  $ ./piglit-run.py tests/gpu results
  /usr/bin/env: python2: No such file or directory
 
  This is incredibly clear, at least.  The workaround is both easy and
 obvious:
  put a python2 - python symlink anywhere in your path.  It doesn't even
 have
  to be installed system-wide - you can put it in ~/bin if you like.
 
  For the record, I dislike that Arch has installed Python 3 as
 /usr/bin/python.
  It's incompatible and has caused no end of headaches for upstreams.  But,
  there's not a lot we can do about that.

 Isn't there? Refuse to go along with the idiocy until Arch fixes it or
 people stop using it...

   -ilia

 The idiocy has been going on for 4 years now - if they had any intention of
 changing back, they would've done it by now.

Perhaps it's because people have been too accommodating?

 People aren't likely to change
 their whole Linux distribution over a single symlink, either.  Boycotting
 isn't a solution.

It's definitely *a* solution. Certainly my preferred one, but perhaps not yours.


 I still think that this patch makes Piglit more convenient for a wider cross-
 section of our users, even if it is a stupid problem.

 --Ken
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Ian Romanick
On 06/24/2014 10:08 AM, Ilia Mirkin wrote:
 On Tue, Jun 24, 2014 at 1:04 PM, Ian Romanick i...@freedesktop.org wrote:
 On 06/24/2014 08:27 AM, Ilia Mirkin wrote:
 On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke kenn...@whitecape.org 
 wrote:
 For the record, I dislike that Arch has installed Python 3 as 
 /usr/bin/python.
 It's incompatible and has caused no end of headaches for upstreams.  But,
 there's not a lot we can do about that.

 Isn't there? Refuse to go along with the idiocy until Arch fixes it or
 people stop using it...

 What you're suggesting is called pissing in the wind.  Not generally
 producitve.  At some point you just have to get work done.
 
 So that strategy works for Arch but not for us?

Ask the question: Who is hurt by the stubborness of an Arch boycott?

It certainly won't hurt Arch, and it has approximately epsilon
probability of making them change.

It certainly will hurt some piglit developers that encounter Arch systems.

We're only hurting our own community... hence my original analogy.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Chad Versace
On Mon, Jun 23, 2014 at 05:36:13PM -0700, Dylan Baker wrote:
 Chad, you mentioned you had comments on this patch?

Right, I commented on the Bugzilla ticket.
https://bugs.freedesktop.org/show_bug.cgi?id=80261
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-23 Thread Vinson Lee
On Fri, Jun 20, 2014 at 12:04 AM, Dylan Baker baker.dyla...@gmail.com wrote:
 This reverts commit 40b5d5288991fec2cc76ea4af7050555be467126.

 The patch to be reverted breaks users of *BSD, solaris, and OSX which
 don't provide a python2 symlink, making it a regression.

 The patch however, fixes python for arch users whos python executable
 incorrectly is python3. This is a bug that Arch is not willing to fix.

 bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80261
 ---
  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 aafe256..df08ede 100755
 --- a/generate-glean-tests.py
 +++ b/generate-glean-tests.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python2
 +#!/usr/bin/env python
  # -*- coding: utf-8 -*-
  #
  # Copyright © 2010 Intel Corporation
 diff --git a/piglit b/piglit
 index 616e408..ea73268 100755
 --- a/piglit
 +++ b/piglit
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python2
 +#!/usr/bin/env python

  # Copyright (c) 2014 Intel Corporation

 diff --git a/piglit-merge-results.py b/piglit-merge-results.py
 index a6c0065..e78a5d0 100755
 --- a/piglit-merge-results.py
 +++ b/piglit-merge-results.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python2
 +#!/usr/bin/env python
  #
  # 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 d88ab1c..635d27c 100755
 --- a/piglit-print-commands.py
 +++ b/piglit-print-commands.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python2
 +#!/usr/bin/env python
  #
  # 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 6b78529..195a5db 100755
 --- a/piglit-resume.py
 +++ b/piglit-resume.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python2
 +#!/usr/bin/env python

  # Copyright (c) 2014 Intel Corporation

 diff --git a/piglit-run.py b/piglit-run.py
 index 4c0f878..7c2d71a 100755
 --- a/piglit-run.py
 +++ b/piglit-run.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python2
 +#!/usr/bin/env python

  # Copyright (c) 2014 Intel Corporation

 diff --git a/piglit-summary-html.py b/piglit-summary-html.py
 index 4b5278e..078c7cb 100755
 --- a/piglit-summary-html.py
 +++ b/piglit-summary-html.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python2
 +#!/usr/bin/env python

  # Copyright (c) 2014 Intel Corporation

 diff --git a/piglit-summary-junit.py b/piglit-summary-junit.py
 index 5c40a73..5aa1969 100755
 --- a/piglit-summary-junit.py
 +++ b/piglit-summary-junit.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python2
 +#!/usr/bin/env python

  # Copyright (c) 2014 Intel Corporation

 diff --git a/piglit-summary.py b/piglit-summary.py
 index d1294be..c5a3923 100755
 --- a/piglit-summary.py
 +++ b/piglit-summary.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python2
 +#!/usr/bin/env python

  # Copyright (c) 2014 Intel Corporation

 --
 2.0.0

 ___
 Piglit mailing list
 Piglit@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/piglit


Reviewed-by: Vinson Lee v...@freedesktop.org
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-20 Thread Dylan Baker
This reverts commit 40b5d5288991fec2cc76ea4af7050555be467126.

The patch to be reverted breaks users of *BSD, solaris, and OSX which
don't provide a python2 symlink, making it a regression.

The patch however, fixes python for arch users whos python executable
incorrectly is python3. This is a bug that Arch is not willing to fix.

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80261
---
 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 aafe256..df08ede 100755
--- a/generate-glean-tests.py
+++ b/generate-glean-tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 #
 # Copyright © 2010 Intel Corporation
diff --git a/piglit b/piglit
index 616e408..ea73268 100755
--- a/piglit
+++ b/piglit
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 
 # Copyright (c) 2014 Intel Corporation
 
diff --git a/piglit-merge-results.py b/piglit-merge-results.py
index a6c0065..e78a5d0 100755
--- a/piglit-merge-results.py
+++ b/piglit-merge-results.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 #
 # 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 d88ab1c..635d27c 100755
--- a/piglit-print-commands.py
+++ b/piglit-print-commands.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 #
 # 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 6b78529..195a5db 100755
--- a/piglit-resume.py
+++ b/piglit-resume.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 
 # Copyright (c) 2014 Intel Corporation
 
diff --git a/piglit-run.py b/piglit-run.py
index 4c0f878..7c2d71a 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 
 # Copyright (c) 2014 Intel Corporation
 
diff --git a/piglit-summary-html.py b/piglit-summary-html.py
index 4b5278e..078c7cb 100755
--- a/piglit-summary-html.py
+++ b/piglit-summary-html.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 
 # Copyright (c) 2014 Intel Corporation
 
diff --git a/piglit-summary-junit.py b/piglit-summary-junit.py
index 5c40a73..5aa1969 100755
--- a/piglit-summary-junit.py
+++ b/piglit-summary-junit.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 
 # Copyright (c) 2014 Intel Corporation
 
diff --git a/piglit-summary.py b/piglit-summary.py
index d1294be..c5a3923 100755
--- a/piglit-summary.py
+++ b/piglit-summary.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 
 # Copyright (c) 2014 Intel Corporation
 
-- 
2.0.0

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit