{"thread":{"id":"23126","subject":"[PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD","startedAt":"2010-03-21T19:01:50Z","lastAt":"2010-03-21T23:00:06Z","messageCount":5,"participants":["R. Tyler Ballance","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"137469","messageId":"20100321190145.GA32578@kiwi.sharlinx.com","threadId":"23126","inReplyTo":null,"subject":"[PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD","fromName":"R. Tyler Ballance","fromEmail":"tyler@monkeypox.org","sentAt":"2010-03-21T19:01:50Z","receivedAt":"2010-03-21T19:01:50Z","isPatch":true,"sender":{"key":"tyler@monkeypox.org","avatar":"https://gravatar.com/avatar/f523ae06c1aa78f1b4c13bd5dd6fe4c716ec72c0857fcb187f1c7f0e2d2b0ba1?d=mp&s=160"},"body":"On FreeBSD, Python does not ship as part of the base system but is available\nvia the ports system, which install the binary in /usr/local/bin.\n---\n Makefile                           |    6 +++++-\n contrib/fast-import/import-zips.py |    2 +-\n contrib/hg-to-git/hg-to-git.py     |    2 +-\n contrib/p4import/git-p4import.py   |    2 +-\n git_remote_helpers/Makefile        |    6 +++++-\n 5 files changed, 13 insertions(+), 5 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 3a6c6ea..4f8fbf0 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -444,7 +444,11 @@ ifndef PERL_PATH\n \tPERL_PATH = /usr/bin/perl\n endif\n ifndef PYTHON_PATH\n-\tPYTHON_PATH = /usr/bin/python\n+\tifeq ($(uname_S),FreeBSD)\n+\t\tPYTHON_PATH = /usr/local/bin/python\n+\telse\n+\t\tPYTHON_PATH = /usr/bin/python\n+\tendif\n endif\n \n export PERL_PATH\ndiff --git a/contrib/fast-import/import-zips.py b/contrib/fast-import/import-zips.py\nindex 7051a83..82f5ed3 100755\n--- a/contrib/fast-import/import-zips.py\n+++ b/contrib/fast-import/import-zips.py\n@@ -1,4 +1,4 @@\n-#!/usr/bin/python\n+#!/usr/bin/env python\n \n ## zip archive frontend for git-fast-import\n ##\ndiff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py\nindex 854cd94..046cb2b 100755\n--- a/contrib/hg-to-git/hg-to-git.py\n+++ b/contrib/hg-to-git/hg-to-git.py\n@@ -1,4 +1,4 @@\n-#! /usr/bin/python\n+#!/usr/bin/env python\n \n \"\"\" hg-to-git.py - A Mercurial to GIT converter\n \ndiff --git a/contrib/p4import/git-p4import.py b/contrib/p4import/git-p4import.py\nindex 0f3d97b..b6e534b 100644\n--- a/contrib/p4import/git-p4import.py\n+++ b/contrib/p4import/git-p4import.py\n@@ -1,4 +1,4 @@\n-#!/usr/bin/python\n+#!/usr/bin/env python\n #\n # This tool is copyright (c) 2006, Sean Estabrooks.\n # It is released under the Gnu Public License, version 2.\ndiff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile\nindex c62dfd0..74b05dc 100644\n--- a/git_remote_helpers/Makefile\n+++ b/git_remote_helpers/Makefile\n@@ -7,7 +7,11 @@ pysetupfile:=setup.py\n DESTDIR_SQ = $(subst ','\\'',$(DESTDIR))\n \n ifndef PYTHON_PATH\n-\tPYTHON_PATH = /usr/bin/python\n+\tifeq ($(uname_S),FreeBSD)\n+\t\tPYTHON_PATH = /usr/local/bin/python\n+\telse\n+\t\tPYTHON_PATH = /usr/bin/python\n+\tendif\n endif\n ifndef prefix\n \tprefix = $(HOME)\n-- \n1.6.4.3\n"},{"id":"137481","messageId":"7veijdl6kp.fsf@alter.siamese.dyndns.org","threadId":"23126","inReplyTo":"20100321190145.GA32578@kiwi.sharlinx.com","subject":"Re: [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-03-21T21:15:34Z","receivedAt":"2010-03-21T21:15:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"R. Tyler Ballance\" <tyler@monkeypox.org> writes:\n\n> On FreeBSD, Python does not ship as part of the base system but is available\n> via the ports system, which install the binary in /usr/local/bin.\n> ---\n\nSign-off?\n\n> diff --git a/Makefile b/Makefile\n> index 3a6c6ea..4f8fbf0 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -444,7 +444,11 @@ ifndef PERL_PATH\n>  \tPERL_PATH = /usr/bin/perl\n>  endif\n>  ifndef PYTHON_PATH\n> -\tPYTHON_PATH = /usr/bin/python\n> +\tifeq ($(uname_S),FreeBSD)\n> +\t\tPYTHON_PATH = /usr/local/bin/python\n> +\telse\n> +\t\tPYTHON_PATH = /usr/bin/python\n> +\tendif\n>  endif\n\nI would have expected that the patch would look more like this:\n\ndiff --git a/Makefile b/Makefile\nindex 98372eb..5bb0769 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -831,6 +831,7 @@ ifeq ($(uname_S),FreeBSD)\n \t\tNO_UINTMAX_T = YesPlease\n \t\tNO_STRTOUMAX = YesPlease\n \tendif\n+\tPYTHON_PATH = /usr/local/bin/python\n endif\n ifeq ($(uname_S),OpenBSD)\n \tNO_STRCASESTR = YesPlease\n\nWhat am I missing?\n"},{"id":"137483","messageId":"20100321212335.GB32016@kiwi.sharlinx.com","threadId":"23126","inReplyTo":"7veijdl6kp.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD","fromName":"R. Tyler Ballance","fromEmail":"tyler@monkeypox.org","sentAt":"2010-03-21T21:23:35Z","receivedAt":"2010-03-21T21:23:35Z","isPatch":true,"sender":{"key":"tyler@monkeypox.org","avatar":"https://gravatar.com/avatar/f523ae06c1aa78f1b4c13bd5dd6fe4c716ec72c0857fcb187f1c7f0e2d2b0ba1?d=mp&s=160"},"body":"\nOn Sun, 21 Mar 2010, Junio C Hamano wrote:\n\n> \"R. Tyler Ballance\" <tyler@monkeypox.org> writes:\n> \n> > On FreeBSD, Python does not ship as part of the base system but is available\n> > via the ports system, which install the binary in /usr/local/bin.\n> > ---\n> \n> Sign-off?\n\nSorry, I was under the impression somebody who knew what the hell they were\ndoing would be the one adding a Sign-off By to the commit :)\n\n\n> \n> > diff --git a/Makefile b/Makefile\n> > index 3a6c6ea..4f8fbf0 100644\n> > --- a/Makefile\n> > +++ b/Makefile\n> > @@ -444,7 +444,11 @@ ifndef PERL_PATH\n> >  \tPERL_PATH = /usr/bin/perl\n> >  endif\n> >  ifndef PYTHON_PATH\n> > -\tPYTHON_PATH = /usr/bin/python\n> > +\tifeq ($(uname_S),FreeBSD)\n> > +\t\tPYTHON_PATH = /usr/local/bin/python\n> > +\telse\n> > +\t\tPYTHON_PATH = /usr/bin/python\n> > +\tendif\n> >  endif\n> \n> I would have expected that the patch would look more like this:\n> \n> diff --git a/Makefile b/Makefile\n> index 98372eb..5bb0769 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -831,6 +831,7 @@ ifeq ($(uname_S),FreeBSD)\n>  \t\tNO_UINTMAX_T = YesPlease\n>  \t\tNO_STRTOUMAX = YesPlease\n>  \tendif\n> +\tPYTHON_PATH = /usr/local/bin/python\n>  endif\n>  ifeq ($(uname_S),OpenBSD)\n>  \tNO_STRCASESTR = YesPlease\n> \n> What am I missing?\n\nNo, that looks right, I didn't notice the specialized section towards the\nbottom for FreeBSD or the others for that matter.\n\nThird time's the charm\n\nCheers,\n-R. Tyler Ballance\n--------------------------------------\n Jabber: rtyler@jabber.org\n GitHub: http://github.com/rtyler\nTwitter: http://twitter.com/agentdero\n   Blog: http://unethicalblogger.com\n\n"},{"id":"137486","messageId":"7veijdfhmm.fsf@alter.siamese.dyndns.org","threadId":"23126","inReplyTo":"20100321212335.GB32016@kiwi.sharlinx.com","subject":"Re: [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-03-21T22:13:21Z","receivedAt":"2010-03-21T22:13:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"R. Tyler Ballance\" <tyler@monkeypox.org> writes:\n\n>> I would have expected that the patch would look more like this:\n>> ...\n>> What am I missing?\n>\n> No, that looks right, I didn't notice the specialized section towards the\n> bottom for FreeBSD or the others for that matter.\n\nThanks.  I usually use a \"make\" wrapper to handle platform particulars\nlike setting PYTHON_PATH automatically outside of the build system we\nship, and never noticed this.\n\nI'll just commit my version with a forged sign-off from you ;-)\n"},{"id":"137489","messageId":"20100321230006.GC32016@kiwi.sharlinx.com","threadId":"23126","inReplyTo":"7veijdfhmm.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2] Correct references to /usr/bin/python which does not exist on FreeBSD","fromName":"R. Tyler Ballance","fromEmail":"tyler@monkeypox.org","sentAt":"2010-03-21T23:00:06Z","receivedAt":"2010-03-21T23:00:06Z","isPatch":true,"sender":{"key":"tyler@monkeypox.org","avatar":"https://gravatar.com/avatar/f523ae06c1aa78f1b4c13bd5dd6fe4c716ec72c0857fcb187f1c7f0e2d2b0ba1?d=mp&s=160"},"body":"\nOn Sun, 21 Mar 2010, Junio C Hamano wrote:\n\n> \"R. Tyler Ballance\" <tyler@monkeypox.org> writes:\n> \n> >> I would have expected that the patch would look more like this:\n> >> ...\n> >> What am I missing?\n> >\n> > No, that looks right, I didn't notice the specialized section towards the\n> > bottom for FreeBSD or the others for that matter.\n> \n> Thanks.  I usually use a \"make\" wrapper to handle platform particulars\n> like setting PYTHON_PATH automatically outside of the build system we\n> ship, and never noticed this.\n> \n> I'll just commit my version with a forged sign-off from you ;-)\n\nI find these terms acceptable :)\n\n\nCheers,\n-R. Tyler Ballance\n--------------------------------------\n Jabber: rtyler@jabber.org\n GitHub: http://github.com/rtyler\nTwitter: http://twitter.com/agentdero\n   Blog: http://unethicalblogger.com\n\n"}]}