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

[PATCH] Correct references to /usr/bin/python which may not exist on certain systems

From
R. Tyler Ballance <tyler@monkeypox.org>
Date
Mar 20, 2010, 23:51 UTC
Message-ID
<20100320235105.GA30457@kiwi.sharlinx.com>
FreeBSD for example does not ship with a /usr/bin/python such that Python
installed from ports will be located by default in /usr/local/bin
---
 Makefile                           |    2 +-
 contrib/fast-import/import-zips.py |    2 +-
 contrib/hg-to-git/hg-to-git.py     |    2 +-
 contrib/p4import/git-p4import.py   |    2 +-
 git_remote_helpers/Makefile        |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 3a6c6ea..2b248b4 100644
--- a/Makefile
+++ b/Makefile
@@ -444,7 +444,7 @@ ifndef PERL_PATH
 	PERL_PATH = /usr/bin/perl
 endif
 ifndef PYTHON_PATH
-	PYTHON_PATH = /usr/bin/python
+	PYTHON_PATH = /usr/bin/env python
 endif
 
 export PERL_PATH
diff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py
index 7051a83..82f5ed3 100755
--- a/contrib/fast-import/import-zips.py
+++ b/contrib/fast-import/import-zips.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 ## zip archive frontend for git-fast-import
 ##
diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py
index 854cd94..046cb2b 100755
--- a/contrib/hg-to-git/hg-to-git.py
+++ b/contrib/hg-to-git/hg-to-git.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#!/usr/bin/env python
 
 """ hg-to-git.py - A Mercurial to GIT converter
 
diff --git a/contrib/p4import/git-p4import.py b/contrib/p4import/git-p4import.py
index 0f3d97b..b6e534b 100644
--- a/contrib/p4import/git-p4import.py
+++ b/contrib/p4import/git-p4import.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # This tool is copyright (c) 2006, Sean Estabrooks.
 # It is released under the Gnu Public License, version 2.
diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile
index c62dfd0..af3cc28 100644
--- a/git_remote_helpers/Makefile
+++ b/git_remote_helpers/Makefile
@@ -7,7 +7,7 @@ pysetupfile:=setup.py
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
 
 ifndef PYTHON_PATH
-	PYTHON_PATH = /usr/bin/python
+	PYTHON_PATH = /usr/bin/env python
 endif
 ifndef prefix
 	prefix = $(HOME)
-- 
1.6.4.3
Next: Junio C Hamano
Message 1 of 2 in “Correct references to /usr/bin/python which may not exist on certain systems”
  1. Correct references to /usr/bin/python which may not exist on certain systemsR. Tyler Ballance, Mar 20, 2010
  2. Junio C HamanoMar 21, 2010

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.