* [PATCH] Correct references to /usr/bin/python which may not exist on certain systems
@ 2010-03-20 23:51 R. Tyler Ballance
2010-03-21 1:37 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: R. Tyler Ballance @ 2010-03-20 23:51 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 2125 bytes --]
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
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Correct references to /usr/bin/python which may not exist on certain systems
2010-03-20 23:51 [PATCH] Correct references to /usr/bin/python which may not exist on certain systems R. Tyler Ballance
@ 2010-03-21 1:37 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2010-03-21 1:37 UTC (permalink / raw)
To: R. Tyler Ballance; +Cc: git
"R. Tyler Ballance" <tyler@monkeypox.org> writes:
> 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
> ---
> 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
This wouldn't work very well, as XYZ_PATH is expected to point at full
path to the executable. You should be able to say:
test -f '$(XYZ_PATH_SQ)'
Yes, TCL_PATH and TCLTK_PATH may already be broken the same way, but I
don't think we want to make things worse.
I think setting PYTHON_PATH to /usr/local/bin/python inside
ifeq ($(uname_S),FreeBSD)
...
endif
block would be more in-line with the current design of the Makefile.
> 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
These changes to contrib/ are correct and necessary, as we don't replace
them with Makefile targets like we do for the scripted Porcelains, if
people want to run them directly (or copy them out literally) out of
contrib/ area. .
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-21 1:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20 23:51 [PATCH] Correct references to /usr/bin/python which may not exist on certain systems R. Tyler Ballance
2010-03-21 1:37 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).