path: root/git_remote_helpers/Makefile
diff options
authorSverre Rabbelier <>2009-11-18 01:42:32 (GMT)
committerJunio C Hamano <>2009-11-24 23:50:20 (GMT)
commit2fe40b63001844f9a884ac9cb49cabd5e183b62f (patch)
tree6667747ef0e2b659339fa867cf960d64fe643ee5 /git_remote_helpers/Makefile
parentd4e1b47a922576e6af98cd84913471a6d3096ac0 (diff)
Add Python support library for remote helpers
This patch introduces parts of a Python package called "git_remote_helpers" containing the building blocks for remote helpers written in Python. No actual remote helpers are part of this patch, this patch only includes the common basics needed to start writing such helpers. The patch includes the necessary Makefile additions to build and install the git_remote_helpers Python package along with the rest of Git. This patch is based on Johan Herland's git_remote_cvs patch and has been improved by the following contributions: - David Aguilar: Lots of Python coding style fixes - David Aguilar: DESTDIR support in Makefile Cc: David Aguilar <> Cc: Johan Herland <> Signed-off-by: Sverre Rabbelier <> Signed-off-by: Johan Herland <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'git_remote_helpers/Makefile')
1 files changed, 35 insertions, 0 deletions
diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile
new file mode 100644
index 0000000..c62dfd0
--- /dev/null
+++ b/git_remote_helpers/Makefile
@@ -0,0 +1,35 @@
+# Makefile for the git_remote_helpers python support modules
+# Shell quote (do not use $(call) to accommodate ancient setups);
+DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
+ PYTHON_PATH = /usr/bin/python
+ifndef prefix
+ prefix = $(HOME)
+ifndef V
+ QUIET = @
+ QUIETSETUP = --quiet
+PYLIBDIR=$(shell $(PYTHON_PATH) -c \
+ "import sys; \
+ print 'lib/python%i.%i/site-packages' % sys.version_info[:2]")
+all: $(pysetupfile)
+ $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build
+install: $(pysetupfile)
+ $(PYTHON_PATH) $(pysetupfile) install --prefix $(DESTDIR_SQ)$(prefix)
+instlibdir: $(pysetupfile)
+ @echo "$(DESTDIR_SQ)$(prefix)/$(PYLIBDIR)"
+ $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) clean -a
+ $(RM) *.pyo *.pyc