From cb97e287cd4232139f98d88a96cb96f65481f2c7 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Fri, 28 Nov 2003 18:23:14 +0000 Subject: [PATCH] Possibly more portable Python version extraction. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5431 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 22a9f3c73..d381a8521 100644 --- a/configure.in +++ b/configure.in @@ -565,7 +565,7 @@ if test -n "$PYTHON"; then # Need to do this hack since autoconf replaces __file__ with the name of the configure file filehack="file__" - PYVERSION=`($PYTHON -c "import string,operator; print operator.getitem(string.split(string.__$filehack,'/'),-2)")` + PYVERSION=`($PYTHON -c "import string,operator,os.path; print operator.getitem(os.path.split(operator.getitem(os.path.split(string.__$filehack),0)),1)")` AC_MSG_RESULT($PYVERSION) # Set the include directory