From d4e1b47a922576e6af98cd84913471a6d3096ac0 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Wed, 18 Nov 2009 02:42:31 +0100 Subject: Basic build infrastructure for Python scripts This patch adds basic boilerplate support (based on corresponding Perl sections) for enabling the building and installation Python scripts. There are currently no Python scripts being built, and when Python scripts are added in future patches, their building and installation can be disabled by defining NO_PYTHON. Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- t/test-lib.sh | 1 + 1 file changed, 1 insertion(+) (limited to 't') diff --git a/t/test-lib.sh b/t/test-lib.sh index f2ca53647..0b991dbd5 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -729,6 +729,7 @@ case $(uname -s) in esac test -z "$NO_PERL" && test_set_prereq PERL +test -z "$NO_PYTHON" && test_set_prereq PYTHON # test whether the filesystem supports symbolic links ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS -- cgit v1.2.1 From 2fe40b63001844f9a884ac9cb49cabd5e183b62f Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Wed, 18 Nov 2009 02:42:32 +0100 Subject: 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 --- t/test-lib.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't') diff --git a/t/test-lib.sh b/t/test-lib.sh index 0b991dbd5..6ed5b28be 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -638,6 +638,15 @@ test -d ../templates/blt || { error "You haven't built things yet, have you?" } +if test -z "$GIT_TEST_INSTALLED" +then + GITPYTHONLIB="$(pwd)/../git_remote_helpers/build/lib" + export GITPYTHONLIB + test -d ../git_remote_helpers/build || { + error "You haven't built git_remote_helpers yet, have you?" + } +fi + if ! test -x ../test-chmtime; then echo >&2 'You need to build test-chmtime:' echo >&2 'Run "make test-chmtime" in the source (toplevel) directory' -- cgit v1.2.1 From ac10a85785baee56bb4a04ad5f847d15ffba0893 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 7 Dec 2009 00:32:50 -0500 Subject: tests: handle NO_PYTHON setting Without this, test-lib checks that the git_remote_helpers directory has been built. However, if we are building without python, we will not have done anything at all in that directory, and test-lib's sanity check will fail. We bump the inclusion of GIT-BUILD-OPTIONS further up in test-lib; it contains configuration, and as such should be read before we do any checks (and in this particular case, we need its value to do our check properly). Signed-off-by: Jeff King Looks-fine-to-me-by: Brandon Casey Acked-by: Johan Herland Signed-off-by: Junio C Hamano --- t/test-lib.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/test-lib.sh b/t/test-lib.sh index 6ed5b28be..f89e9687a 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -632,13 +632,15 @@ GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_NOGLOBAL=1 export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL +. ../GIT-BUILD-OPTIONS + GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git export GITPERLLIB test -d ../templates/blt || { error "You haven't built things yet, have you?" } -if test -z "$GIT_TEST_INSTALLED" +if test -z "$GIT_TEST_INSTALLED" && test -z "$NO_PYTHON" then GITPYTHONLIB="$(pwd)/../git_remote_helpers/build/lib" export GITPYTHONLIB @@ -653,8 +655,6 @@ if ! test -x ../test-chmtime; then exit 1 fi -. ../GIT-BUILD-OPTIONS - # Test repository test="trash directory.$(basename "$0" .sh)" test -n "$root" && test="$root/$test" -- cgit v1.2.1