From 1c51b4166f80147b179670ae015f445e9ef5103a Mon Sep 17 00:00:00 2001 From: Tom Rondeau <trondeau@vt.edu> Date: Mon, 24 Oct 2011 20:00:04 -0400 Subject: build: fix autotools to install python scripts into the right path based on what Python says. --- config/gr_python.m4 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'config/gr_python.m4') diff --git a/config/gr_python.m4 b/config/gr_python.m4 index 7aef1662e0..d89f4c504a 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 -- cgit v1.2.3