git_remote_helpers: allow building with Python 3
authorJohn Keeping <john@keeping.me.uk>
Sun, 20 Jan 2013 13:15:31 +0000 (13:15 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Jan 2013 00:34:32 +0000 (16:34 -0800)
Change inline Python to call "print" as a function not a statement.

This is harmless because Python 2 will see the parentheses as redundant
grouping but they are necessary to run this code with Python 3.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git_remote_helpers/Makefile

index 74b05dc91e42414147d5f3dc7b4fc66fb86c0eca..f65f0645ee995a3be98ba3e48b2e3ba86c9b9213 100644 (file)
@@ -23,7 +23,7 @@ endif
 
 PYLIBDIR=$(shell $(PYTHON_PATH) -c \
         "import sys; \
 
 PYLIBDIR=$(shell $(PYTHON_PATH) -c \
         "import sys; \
-        print 'lib/python%i.%i/site-packages' % sys.version_info[:2]")
+        print('lib/python%i.%i/site-packages' % sys.version_info[:2])")
 
 all: $(pysetupfile)
        $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build
 
 all: $(pysetupfile)
        $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build