From: Dennis Stosberg <dennis@stosberg.net>
To: git@vger.kernel.org
Subject: [PATCH 2/3] configure: Add test for Python
Date: Thu, 6 Jul 2006 14:40:38 +0200 [thread overview]
Message-ID: <20060706124038.G20591f4b@leonov.stosberg.net> (raw)
The test tries to find the path to a suitable Python binary.
It also adds a --python=/path parameter to override the autodetection.
Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
---
config-lib.sh | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/config-lib.sh b/config-lib.sh
index 69999a8..50ad6e9 100755
--- a/config-lib.sh
+++ b/config-lib.sh
@@ -263,6 +263,7 @@ Installation directories:
Miscellaneous options:
--cc=COMPILER use this C compiler to build MPlayer [gcc]
--perl=PATH path to perl binary [autodetect]
+ --python=PATH path to python binary [autodetect]
--target=PLATFORM target platform (i386-linux, arm-linux, etc)
--with-install=PATH use a custom install program (useful if your OS uses
a GNU-incompatible install utility by default and
@@ -299,6 +300,8 @@ EOF
_cc=`echo $ac_option | cut -d '=' -f 2` ;;
--perl=*)
_perl=`echo $ac_option | cut -d '=' -f 2` ;;
+ --python=*)
+ _python=`echo $ac_option | cut -d '=' -f 2` ;;
--target=*)
_target=`echo $ac_option | cut -d '=' -f 2` ;;
--with-install=*)
@@ -426,6 +429,24 @@ EOF
die "your perl version is too old"
fi
echores "$_perl_version"
+
+ echocheck "for python"
+ for __py_bin in python python2.4 python2.3; do
+ test "$_python" && continue
+
+ __candidate=`which $__py_bin`
+ test "$__candidate" || continue
+
+ $__candidate - <<EOF || continue
+import sys
+v = sys.version_info
+if v < (2, 3):
+ sys.exit(1)
+EOF
+ _python=$__candidate
+ done
+ test "$_python" || die "cannot find path to python"
+ echores "$_python"
}
write_config() {
@@ -437,6 +458,7 @@ # -------- Generated by configure ------
CC = $_cc
PERL_PATH = $_perl
+PYTHON_PATH = $_python
INSTALL = $_install
EOF
--
1.4.1
reply other threads:[~2006-07-06 12:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060706124038.G20591f4b@leonov.stosberg.net \
--to=dennis@stosberg.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).