diff options
Diffstat (limited to 'config/gr_python.m4')
-rw-r--r-- | config/gr_python.m4 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/config/gr_python.m4 b/config/gr_python.m4 index 7aef1662e..d89f4c504 100644 --- a/config/gr_python.m4 +++ b/config/gr_python.m4 @@ -49,6 +49,22 @@ AC_DEFUN([PYTHON_DEVEL],[ if (echo $pyexecdir | grep -q lib64); then pythondir="$pyexecdir" fi + else + # Let Python tell us where the install directory is; + # i.e., don't trust AM_PATH_PYTHON + python_cmd=' +import distutils.sysconfig +import os +path = distutils.sysconfig.get_python_lib() +pypath = distutils.sysconfig.get_config_var("exec_prefix") +path = path.split(pypath)[[1]] +if os.sep == "\\": + path = path.replace("\\", "/") +print path +' + pyexecdir=$prefix`$PYTHON -c "$python_cmd"` + pythondir=$pyexecdir + fi # Check for Python include path |