git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD
@ 2010-03-21 19:01 R. Tyler Ballance
  2010-03-21 21:15 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: R. Tyler Ballance @ 2010-03-21 19:01 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 2305 bytes --]

On FreeBSD, Python does not ship as part of the base system but is available
via the ports system, which install the binary in /usr/local/bin.
---
 Makefile                           |    6 +++++-
 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        |    6 +++++-
 5 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 3a6c6ea..4f8fbf0 100644
--- a/Makefile
+++ b/Makefile
@@ -444,7 +444,11 @@ ifndef PERL_PATH
 	PERL_PATH = /usr/bin/perl
 endif
 ifndef PYTHON_PATH
-	PYTHON_PATH = /usr/bin/python
+	ifeq ($(uname_S),FreeBSD)
+		PYTHON_PATH = /usr/local/bin/python
+	else
+		PYTHON_PATH = /usr/bin/python
+	endif
 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..74b05dc 100644
--- a/git_remote_helpers/Makefile
+++ b/git_remote_helpers/Makefile
@@ -7,7 +7,11 @@ pysetupfile:=setup.py
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
 
 ifndef PYTHON_PATH
-	PYTHON_PATH = /usr/bin/python
+	ifeq ($(uname_S),FreeBSD)
+		PYTHON_PATH = /usr/local/bin/python
+	else
+		PYTHON_PATH = /usr/bin/python
+	endif
 endif
 ifndef prefix
 	prefix = $(HOME)
-- 
1.6.4.3

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD
  2010-03-21 19:01 [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD R. Tyler Ballance
@ 2010-03-21 21:15 ` Junio C Hamano
  2010-03-21 21:23   ` R. Tyler Ballance
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2010-03-21 21:15 UTC (permalink / raw)
  To: R. Tyler Ballance; +Cc: git

"R. Tyler Ballance" <tyler@monkeypox.org> writes:

> On FreeBSD, Python does not ship as part of the base system but is available
> via the ports system, which install the binary in /usr/local/bin.
> ---

Sign-off?

> diff --git a/Makefile b/Makefile
> index 3a6c6ea..4f8fbf0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -444,7 +444,11 @@ ifndef PERL_PATH
>  	PERL_PATH = /usr/bin/perl
>  endif
>  ifndef PYTHON_PATH
> -	PYTHON_PATH = /usr/bin/python
> +	ifeq ($(uname_S),FreeBSD)
> +		PYTHON_PATH = /usr/local/bin/python
> +	else
> +		PYTHON_PATH = /usr/bin/python
> +	endif
>  endif

I would have expected that the patch would look more like this:

diff --git a/Makefile b/Makefile
index 98372eb..5bb0769 100644
--- a/Makefile
+++ b/Makefile
@@ -831,6 +831,7 @@ ifeq ($(uname_S),FreeBSD)
 		NO_UINTMAX_T = YesPlease
 		NO_STRTOUMAX = YesPlease
 	endif
+	PYTHON_PATH = /usr/local/bin/python
 endif
 ifeq ($(uname_S),OpenBSD)
 	NO_STRCASESTR = YesPlease

What am I missing?

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD
  2010-03-21 21:15 ` Junio C Hamano
@ 2010-03-21 21:23   ` R. Tyler Ballance
  2010-03-21 22:13     ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: R. Tyler Ballance @ 2010-03-21 21:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1655 bytes --]


On Sun, 21 Mar 2010, Junio C Hamano wrote:

> "R. Tyler Ballance" <tyler@monkeypox.org> writes:
> 
> > On FreeBSD, Python does not ship as part of the base system but is available
> > via the ports system, which install the binary in /usr/local/bin.
> > ---
> 
> Sign-off?

Sorry, I was under the impression somebody who knew what the hell they were
doing would be the one adding a Sign-off By to the commit :)


> 
> > diff --git a/Makefile b/Makefile
> > index 3a6c6ea..4f8fbf0 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -444,7 +444,11 @@ ifndef PERL_PATH
> >  	PERL_PATH = /usr/bin/perl
> >  endif
> >  ifndef PYTHON_PATH
> > -	PYTHON_PATH = /usr/bin/python
> > +	ifeq ($(uname_S),FreeBSD)
> > +		PYTHON_PATH = /usr/local/bin/python
> > +	else
> > +		PYTHON_PATH = /usr/bin/python
> > +	endif
> >  endif
> 
> I would have expected that the patch would look more like this:
> 
> diff --git a/Makefile b/Makefile
> index 98372eb..5bb0769 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -831,6 +831,7 @@ ifeq ($(uname_S),FreeBSD)
>  		NO_UINTMAX_T = YesPlease
>  		NO_STRTOUMAX = YesPlease
>  	endif
> +	PYTHON_PATH = /usr/local/bin/python
>  endif
>  ifeq ($(uname_S),OpenBSD)
>  	NO_STRCASESTR = YesPlease
> 
> What am I missing?

No, that looks right, I didn't notice the specialized section towards the
bottom for FreeBSD or the others for that matter.

Third time's the charm

Cheers,
-R. Tyler Ballance
--------------------------------------
 Jabber: rtyler@jabber.org
 GitHub: http://github.com/rtyler
Twitter: http://twitter.com/agentdero
   Blog: http://unethicalblogger.com


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD
  2010-03-21 21:23   ` R. Tyler Ballance
@ 2010-03-21 22:13     ` Junio C Hamano
  2010-03-21 23:00       ` R. Tyler Ballance
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2010-03-21 22:13 UTC (permalink / raw)
  To: R. Tyler Ballance; +Cc: git

"R. Tyler Ballance" <tyler@monkeypox.org> writes:

>> I would have expected that the patch would look more like this:
>> ...
>> What am I missing?
>
> No, that looks right, I didn't notice the specialized section towards the
> bottom for FreeBSD or the others for that matter.

Thanks.  I usually use a "make" wrapper to handle platform particulars
like setting PYTHON_PATH automatically outside of the build system we
ship, and never noticed this.

I'll just commit my version with a forged sign-off from you ;-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD
  2010-03-21 22:13     ` Junio C Hamano
@ 2010-03-21 23:00       ` R. Tyler Ballance
  0 siblings, 0 replies; 5+ messages in thread
From: R. Tyler Ballance @ 2010-03-21 23:00 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]


On Sun, 21 Mar 2010, Junio C Hamano wrote:

> "R. Tyler Ballance" <tyler@monkeypox.org> writes:
> 
> >> I would have expected that the patch would look more like this:
> >> ...
> >> What am I missing?
> >
> > No, that looks right, I didn't notice the specialized section towards the
> > bottom for FreeBSD or the others for that matter.
> 
> Thanks.  I usually use a "make" wrapper to handle platform particulars
> like setting PYTHON_PATH automatically outside of the build system we
> ship, and never noticed this.
> 
> I'll just commit my version with a forged sign-off from you ;-)

I find these terms acceptable :)


Cheers,
-R. Tyler Ballance
--------------------------------------
 Jabber: rtyler@jabber.org
 GitHub: http://github.com/rtyler
Twitter: http://twitter.com/agentdero
   Blog: http://unethicalblogger.com


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-21 23:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-21 19:01 [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD R. Tyler Ballance
2010-03-21 21:15 ` Junio C Hamano
2010-03-21 21:23   ` R. Tyler Ballance
2010-03-21 22:13     ` Junio C Hamano
2010-03-21 23:00       ` R. Tyler Ballance

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).