Skip to contentSkip to conversation

python: change scripts to use system python instead of env

scripts Don Zickus 4 participants 4 messages Jan 26, 2010 – Jan 29, 2010

lore
Share & tools
lore

Don Zickus

author
#0 lore raw

Doh. Typo in the To: field

----- Forwarded message from Don Zickus <[email protected]> -----

Date: Fri, 22 Jan 2010 16:32:10 -0500
From: Don Zickus <[email protected]>
To: [email protected]
Cc: [email protected], [email protected], [email protected],
[email protected], Don Zickus <[email protected]>
Subject: [scripts] python: change scripts to use system python instead of env
Message-Id: <[email protected]>

Just a small change to a couple of scripts to go from

#!/usr/bin/env python

to

#!/usr/bin/python

This shouldn't effect anyone, unless they don't install python there.

In preparation for python3, Fedora is doing a big push to change the scripts to use the system python. This allows developers to put the python3 in their path without fear of breaking existing scripts.

Now I am pretty sure anyone using python3 for testing purposes will probably not run any of the scripts I changed, but Fedora has this automated tool that checks for this stuff so I thought I would try to push it upstream.

--
I don't do enough python to defend this change to much other than it seems to make sense.

---
 arch/ia64/scripts/unwcheck.py  |    2 +-
 scripts/rt-tester/rt-tester.py |    2 +-
 scripts/show_delta             |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/ia64/scripts/unwcheck.py +1 -1
index c278498..2bfd941 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
 #
 # Usage: unwcheck.py FILE
 #
scripts/rt-tester/rt-tester.py +1 -1
index 4c79660..44423b4 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
 #
 # rt-mutex tester
 #
scripts/show_delta +1 -1
index 48a706a..17df305 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
 #
 # show_deltas: Read list of printk messages instrumented with
 # time data, and format with time deltas.
Signature · 4 lines
1.6.6.83.gc9a2


----- End forwarded message -----
Acked-by
#1 lore raw
Quoted 22 lines · Don Zickus

Doh. Typo in the To: field

----- Forwarded message from Don Zickus <[email protected]> -----

Date: Fri, 22 Jan 2010 16:32:10 -0500
From: Don Zickus <[email protected]>
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], Don Zickus <[email protected]>
Subject: [scripts] python: change scripts to use system python instead of env
Message-Id: <[email protected]>

Just a small change to a couple of scripts to go from

 #!/usr/bin/env python

to

 #!/usr/bin/python

This shouldn't effect anyone, unless they don't install python there.

Quoted 7 lines

In preparation for python3, Fedora is doing a big push to change the scripts to use the system python.  This allows developers to put the python3 in their path without fear of breaking existing scripts.

Now I am pretty sure anyone using python3 for testing purposes will probably not run any of the scripts I changed, but Fedora has this automated tool that checks for this stuff so I thought I would try to push it upstream.

Hmm, so python3 will be installed in /usr/local/bin?

Quoted 3 lines
Quoted 50 lines

--
I don't do enough python to defend this change to much other than it seems to make sense.
---
 arch/ia64/scripts/unwcheck.py  |    2 +- scripts/rt-tester/rt-tester.py |    2 +-
 scripts/show_delta             |    2 +-

 3 files changed, 3 insertions(+), 3 deletions(-)
arch/ia64/scripts/unwcheck.py +1 -1
index c278498..2bfd941 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
  #
  # Usage: unwcheck.py FILE
  #
scripts/rt-tester/rt-tester.py +1 -1
index 4c79660..44423b4 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
  #
  # rt-mutex tester
  #
scripts/show_delta +1 -2
index 48a706a..17df305 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
  #
  # show_deltas: Read list of printk messages instrumented with
  # time data, and format with time deltas.
--

1.6.6.83.gc9a2

----- End forwarded message -----
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Acked-by
#2 lore raw
Quoted 27 lines · Américo Wang
Quoted 26 lines · Don Zickus

Doh. Typo in the To: field

----- Forwarded message from Don Zickus <[email protected]> -----

Date: Fri, 22 Jan 2010 16:32:10 -0500
From: Don Zickus <[email protected]>
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], Don Zickus <[email protected]>
Subject: [scripts] python: change scripts to use system python instead of env
Message-Id: <[email protected]>

Just a small change to a couple of scripts to go from

 #!/usr/bin/env python

to

 #!/usr/bin/python

This shouldn't effect anyone, unless they don't install python there.

In preparation for python3, Fedora is doing a big push to change the scripts to use the system python.  This allows developers to put the python3 in their path without fear of breaking existing scripts.

Quoted 6 lines
Quoted 3 lines

Now I am pretty sure anyone using python3 for testing purposes will probably not run any of the scripts I changed, but Fedora has this automated tool that checks for this stuff so I thought I would try to push it upstream.

Hmm, so python3 will be installed in /usr/local/bin?

No, it will be /usr/bin/python3, but its possible a user would configure their environment to have their default python interpreter be python3, in which case env python would be using /usr/bin/python3 rather than /usr/bin/python, which can lead to things mysteriously running differently or not running at all.

Signature · 2 lines
Jarod Wilson
[email protected]
#3 lore raw

Jarod Wilson napsal(a):

Quoted 9 lines · Américo Wang
Quoted 8 lines · Don Zickus
Quoted 7 lines

Just a small change to a couple of scripts to go from

#!/usr/bin/env python

to

#!/usr/bin/python

...

Quoted 10 lines
Quoted 2 lines

Hmm, so python3 will be installed in /usr/local/bin?

No, it will be /usr/bin/python3, but its possible a user would configure their environment to have their default python interpreter be python3, in which case env python would be using /usr/bin/python3 rather than /usr/bin/python, which can lead to things mysteriously running differently or not running at all.

OK, and we have other python scripts that already use #!/usr/bin/python, so this patch makes sense regardless of python3. I added it to the kbuild tree.

Michal