git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mingw: enable NO_PYTHON
@ 2010-01-07 21:52 Erik Faye-Lund
  2010-01-07 22:00 ` Erik Faye-Lund
  0 siblings, 1 reply; 9+ messages in thread
From: Erik Faye-Lund @ 2010-01-07 21:52 UTC (permalink / raw)
  To: msysgit; +Cc: git, Erik Faye-Lund

Python is not commonly installed on Windows machines, so
we should disable it there by default.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---

This patch is against Junio's current master, and enables
msysgit to compile upstream git again after Sverre's addition
of the python remote-helpers (2fe40b6).

 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 1c7668a..a2780a2 100644
--- a/Makefile
+++ b/Makefile
@@ -1028,6 +1028,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
 	BLK_SHA1 = YesPlease
 	NO_INET_PTON = YesPlease
 	NO_INET_NTOP = YesPlease
+	NO_PYTHON = YesPlease
 	COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch
 	COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
 	COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o
-- 
1.6.6.95.g82b1b.dirty

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

* Re: [PATCH] mingw: enable NO_PYTHON
  2010-01-07 21:52 [PATCH] mingw: enable NO_PYTHON Erik Faye-Lund
@ 2010-01-07 22:00 ` Erik Faye-Lund
  2010-01-07 22:07   ` [PATCH] mingw: disable Python Erik Faye-Lund
  0 siblings, 1 reply; 9+ messages in thread
From: Erik Faye-Lund @ 2010-01-07 22:00 UTC (permalink / raw)
  To: msysgit; +Cc: git, Erik Faye-Lund

Uhm, I just realized that I sent out a patch that wasn't clean against
Junio's master after all. I'll send out a fixed one ASAP.

Sorry about the noise.

On Thu, Jan 7, 2010 at 10:52 PM, Erik Faye-Lund
<kusmabite@googlemail.com> wrote:
> Python is not commonly installed on Windows machines, so
> we should disable it there by default.
>
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
> ---
>
> This patch is against Junio's current master, and enables
> msysgit to compile upstream git again after Sverre's addition
> of the python remote-helpers (2fe40b6).
>
>  Makefile |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 1c7668a..a2780a2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1028,6 +1028,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>        BLK_SHA1 = YesPlease
>        NO_INET_PTON = YesPlease
>        NO_INET_NTOP = YesPlease
> +       NO_PYTHON = YesPlease
>        COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch
>        COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
>        COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o
> --
> 1.6.6.95.g82b1b.dirty
>
>



-- 
Erik "kusma" Faye-Lund

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

* [PATCH] mingw: disable Python
  2010-01-07 22:00 ` Erik Faye-Lund
@ 2010-01-07 22:07   ` Erik Faye-Lund
  2010-01-08  8:07     ` Johannes Sixt
  0 siblings, 1 reply; 9+ messages in thread
From: Erik Faye-Lund @ 2010-01-07 22:07 UTC (permalink / raw)
  To: msysgit; +Cc: git, Erik Faye-Lund

Python is not commonly installed on Windows machines, so
we should disable it there by default.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---

This patch is against Junio's current master, and enables
msysgit to compile upstream git again after Sverre's addition
of the python remote-helpers (2fe40b6).

 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 015bfab..0004c52 100644
--- a/Makefile
+++ b/Makefile
@@ -1027,6 +1027,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
 	OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
 	NO_REGEX = YesPlease
 	BLK_SHA1 = YesPlease
+	NO_PYTHON = YesPlease
 	COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch
 	COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
 	COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o
-- 
1.6.6.90.g50bc9.dirty

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

* Re: [PATCH] mingw: disable Python
  2010-01-07 22:07   ` [PATCH] mingw: disable Python Erik Faye-Lund
@ 2010-01-08  8:07     ` Johannes Sixt
  2010-01-08 10:35       ` Johannes Schindelin
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Sixt @ 2010-01-08  8:07 UTC (permalink / raw)
  To: Erik Faye-Lund; +Cc: msysgit, git, Erik Faye-Lund

Erik Faye-Lund schrieb:
> Python is not commonly installed on Windows machines, so
> we should disable it there by default.
> 
> --- a/Makefile
> +++ b/Makefile
> @@ -1027,6 +1027,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
> +	NO_PYTHON = YesPlease

I'm worried that with this solution it is impossible to re-enable Python
in config.mak (how do you undefine a Makefile variable?); it would be
necessary to hack Makefile.

Wouldn't it be superior to set

	PYTHON_PATH =

in the MinGW section[*]. It works because there is this heuristic later:

ifeq ($(PYTHON_PATH),)
NO_PYTHON=NoThanks
endif

To enable Python, the user would have to set PYTHON_PATH in config.mak.

[I have only Python 1.6 to test (doh!), so I can only tell that it gets
used during 'make', but this fails due to missing modules, so I cannot
tell whether there would be a usable result if Python were sufficiently
recent.]

[*] You should probably set the MSVC section as well, even if you cannot
test it. The effect of the change is predictable enough, I think.

-- Hannes

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

* Re: [PATCH] mingw: disable Python
  2010-01-08  8:07     ` Johannes Sixt
@ 2010-01-08 10:35       ` Johannes Schindelin
  2010-01-08 10:49         ` Erik Faye-Lund
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2010-01-08 10:35 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Erik Faye-Lund, msysgit, git, Erik Faye-Lund

Hi,

On Fri, 8 Jan 2010, Johannes Sixt wrote:

> Erik Faye-Lund schrieb:
> > Python is not commonly installed on Windows machines, so
> > we should disable it there by default.
> > 
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1027,6 +1027,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
> > +	NO_PYTHON = YesPlease
> 
> I'm worried that with this solution it is impossible to re-enable Python
> in config.mak (how do you undefine a Makefile variable?);

How about

	NO_PYTHON=

in config.mak?

Ciao,
Dscho

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

* Re: [PATCH] mingw: disable Python
  2010-01-08 10:35       ` Johannes Schindelin
@ 2010-01-08 10:49         ` Erik Faye-Lund
  2010-01-08 13:35           ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Erik Faye-Lund @ 2010-01-08 10:49 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Johannes Sixt, msysgit, git

On Fri, Jan 8, 2010 at 9:07 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Wouldn't it be superior to set
>
>        PYTHON_PATH =

Yes, I think it would. I've tested it (I've got Python 2.6 installed
in c:\Python26\, so with your fix I can re-enable it by setting
"PYTHON_PATH=/c/Python26/python.exe" in config.mak.

On Fri, Jan 8, 2010 at 11:35 AM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Fri, 8 Jan 2010, Johannes Sixt wrote:
>
>> Erik Faye-Lund schrieb:
>> > Python is not commonly installed on Windows machines, so
>> > we should disable it there by default.
>> >
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -1027,6 +1027,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>> > +   NO_PYTHON = YesPlease
>>
>> I'm worried that with this solution it is impossible to re-enable Python
>> in config.mak (how do you undefine a Makefile variable?);

> How about
>
>        NO_PYTHON=
>
> in config.mak?
>

That doesn't work for me, at least not out of the box. NO_PYTHON is
still defined, it's just defined to an empty string. I guess we could
change to Makefile to accept empty NO_PYTHON as enabled, but since
Hannes' suggestion works fine, I think I'll stick with it, even if
it's a little inconsistent with the other stuff in the MinGW-section
of Makefile.

I'll resend a bit later.

-- 
Erik "kusma" Faye-Lund

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

* Re: [PATCH] mingw: disable Python
  2010-01-08 10:49         ` Erik Faye-Lund
@ 2010-01-08 13:35           ` Junio C Hamano
  2010-01-08 13:52             ` Johannes Sixt
  2010-01-08 13:55             ` Erik Faye-Lund
  0 siblings, 2 replies; 9+ messages in thread
From: Junio C Hamano @ 2010-01-08 13:35 UTC (permalink / raw)
  To: kusmabite; +Cc: Johannes Schindelin, Johannes Sixt, msysgit, git

Erik Faye-Lund <kusmabite@googlemail.com> writes:

>> On Fri, 8 Jan 2010, Johannes Sixt wrote:
>>
>>> Erik Faye-Lund schrieb:
>>> > Python is not commonly installed on Windows machines, so
>>> > we should disable it there by default.
>>> >
>>> > --- a/Makefile
>>> > +++ b/Makefile
>>> > @@ -1027,6 +1027,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>>> > +   NO_PYTHON = YesPlease
>>>
>>> I'm worried that with this solution it is impossible to re-enable Python
>>> in config.mak (how do you undefine a Makefile variable?);
>
>> How about
>>
>>        NO_PYTHON=
>>
>> in config.mak?
>
> That doesn't work for me, at least not out of the box. NO_PYTHON is
> still defined, it's just defined to an empty string.

I think Dscho is right.  "ifdef FOO" yields (and should yield) false if
FOO is set to empty.

-- >8 -- cut here and try it for yourself -- >8 --
#!/bin/sh

rm -f config.mk

cat >Makefile <<\EOF
# The default is...
all::
FROTZ = NITFOL
-include config.mk
ifdef FROTZ
all::
	echo FROTZ is $(FROTZ)
else
all::
	echo FROTZ is not defined
endif
EOF

make
# says "NITFOL"

echo "FROTZ =" >config.mk
make
# says "not defined"

exit
-- 8< --

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

* Re: [PATCH] mingw: disable Python
  2010-01-08 13:35           ` Junio C Hamano
@ 2010-01-08 13:52             ` Johannes Sixt
  2010-01-08 13:55             ` Erik Faye-Lund
  1 sibling, 0 replies; 9+ messages in thread
From: Johannes Sixt @ 2010-01-08 13:52 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: kusmabite, Johannes Schindelin, msysgit, git

Junio C Hamano schrieb:
> Erik Faye-Lund <kusmabite@googlemail.com> writes:
>>> On Fri, 8 Jan 2010, Johannes Sixt wrote:
>>>> (how do you undefine a Makefile variable?);
>>> How about
>>>
>>>        NO_PYTHON=
>>>
>>> in config.mak?
>> That doesn't work for me, at least not out of the box. NO_PYTHON is
>> still defined, it's just defined to an empty string.
> 
> I think Dscho is right.  "ifdef FOO" yields (and should yield) false if
> FOO is set to empty.

Indeed. Strange. It didn't work when I tested it a few hours ago, but no
it works as you say. According to the docs, 'ifdef' actually does not test
defined-ness, but emptyness. So, Erik's original version is fine:

Acked-by: Johannes Sixt <j6t@kdbg.org>

-- Hannes

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

* Re: [PATCH] mingw: disable Python
  2010-01-08 13:35           ` Junio C Hamano
  2010-01-08 13:52             ` Johannes Sixt
@ 2010-01-08 13:55             ` Erik Faye-Lund
  1 sibling, 0 replies; 9+ messages in thread
From: Erik Faye-Lund @ 2010-01-08 13:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin, Johannes Sixt, msysgit, git

On Fri, Jan 8, 2010 at 2:35 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Erik Faye-Lund <kusmabite@googlemail.com> writes:
>
>>> On Fri, 8 Jan 2010, Johannes Sixt wrote:
>>>
>>>> Erik Faye-Lund schrieb:
>>>> > Python is not commonly installed on Windows machines, so
>>>> > we should disable it there by default.
>>>> >
>>>> > --- a/Makefile
>>>> > +++ b/Makefile
>>>> > @@ -1027,6 +1027,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
>>>> > +   NO_PYTHON = YesPlease
>>>>
>>>> I'm worried that with this solution it is impossible to re-enable Python
>>>> in config.mak (how do you undefine a Makefile variable?);
>>
>>> How about
>>>
>>>        NO_PYTHON=
>>>
>>> in config.mak?
>>
>> That doesn't work for me, at least not out of the box. NO_PYTHON is
>> still defined, it's just defined to an empty string.
>
> I think Dscho is right.  "ifdef FOO" yields (and should yield) false if
> FOO is set to empty.
>

In that case I guess I messed up my test. I'll retest.

Yes, I messed up. "NO_PYTHON=" works like a charm.

So, no repost :)

-- 
Erik "kusma" Faye-Lund

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

end of thread, other threads:[~2010-01-08 13:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07 21:52 [PATCH] mingw: enable NO_PYTHON Erik Faye-Lund
2010-01-07 22:00 ` Erik Faye-Lund
2010-01-07 22:07   ` [PATCH] mingw: disable Python Erik Faye-Lund
2010-01-08  8:07     ` Johannes Sixt
2010-01-08 10:35       ` Johannes Schindelin
2010-01-08 10:49         ` Erik Faye-Lund
2010-01-08 13:35           ` Junio C Hamano
2010-01-08 13:52             ` Johannes Sixt
2010-01-08 13:55             ` Erik Faye-Lund

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