git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Standardize python shebangs

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 7, 2014, 10:03 UTC
Message-ID
<1399456987-24156-1-git-send-email-felipe.contreras@gmail.com>
It's better if all our scripts use the same '/usr/bin/env python'.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/hooks/multimail/README                  | 6 +++---
 contrib/hooks/multimail/git_multimail.py        | 2 +-
 contrib/hooks/multimail/migrate-mailhook-config | 2 +-
 contrib/hooks/multimail/post-receive            | 2 +-
 contrib/svn-fe/svnrdump_sim.py                  | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/contrib/hooks/multimail/README b/contrib/hooks/multimail/README
index 477d65f..cf0bcb8 100644
--- a/contrib/hooks/multimail/README
+++ b/contrib/hooks/multimail/README
@@ -76,10 +76,10 @@ Requirements
   The example scripts invoke Python using the following shebang line
   (following PEP 394 [1]):
 
-      #! /usr/bin/env python2
+      #! /usr/bin/env python
 
-  If your system's Python2 interpreter is not in your PATH or is not
-  called "python2", you can change the lines accordingly.  Or you can
+  If your system's Python interpreter is not in your PATH or is not
+  called "python", you can change the lines accordingly.  Or you can
   invoke the Python interpreter explicitly, for example via a tiny
   shell script like
 
diff --git a/contrib/hooks/multimail/git_multimail.py b/contrib/hooks/multimail/git_multimail.py
index 8b58ed6..f6dcdc6 100755
--- a/contrib/hooks/multimail/git_multimail.py
+++ b/contrib/hooks/multimail/git_multimail.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python2
+#! /usr/bin/env python
 
 # Copyright (c) 2012-2014 Michael Haggerty and others
 # Derived from contrib/hooks/post-receive-email, which is
diff --git a/contrib/hooks/multimail/migrate-mailhook-config b/contrib/hooks/multimail/migrate-mailhook-config
index 04eeaac..fba0b90 100755
--- a/contrib/hooks/multimail/migrate-mailhook-config
+++ b/contrib/hooks/multimail/migrate-mailhook-config
@@ -1,4 +1,4 @@
-#! /usr/bin/env python2
+#! /usr/bin/env python
 
 """Migrate a post-receive-email configuration to be usable with git_multimail.py.
 
diff --git a/contrib/hooks/multimail/post-receive b/contrib/hooks/multimail/post-receive
index 4d46828..4f2cf9d 100755
--- a/contrib/hooks/multimail/post-receive
+++ b/contrib/hooks/multimail/post-receive
@@ -1,4 +1,4 @@
-#! /usr/bin/env python2
+#! /usr/bin/env python
 
 """Example post-receive hook based on git-multimail.
 
diff --git a/contrib/svn-fe/svnrdump_sim.py b/contrib/svn-fe/svnrdump_sim.py
index 4e78a1c..bf20819 100755
--- a/contrib/svn-fe/svnrdump_sim.py
+++ b/contrib/svn-fe/svnrdump_sim.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 """
 Simulates svnrdump by replaying an existing dump from a file, taking care
 of the specified revision range.
-- 
1.9.2+fc1.25.g15bd061
Next: Johan Herland
Message 1 of 13 in “Standardize python shebangs”
  1. Standardize python shebangsFelipe Contreras, May 7, 2014
  2. Johan HerlandMay 7, 2014
  3. Felipe ContrerasMay 7, 2014
  4. James DenholmMay 7, 2014
  5. Johan HerlandMay 7, 2014
  6. Matthieu MoyMay 7, 2014
  7. Felipe ContrerasMay 7, 2014
  8. Matthieu MoyMay 7, 2014
  9. Felipe ContrerasMay 7, 2014
  10. Matthieu MoyMay 7, 2014
  11. James DenholmMay 7, 2014
  12. Matthieu MoyMay 8, 2014
  13. Johan HerlandMay 8, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.