Possibly more portable Python version extraction.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5431 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ea3ae10a55
commit
cb97e287cd
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue