diff options
author | Peter O'Gorman <peter@pogma.com> | 2009-05-23 22:13:14 +0200 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2009-05-24 14:36:26 +0200 |
commit | 6d44a667bd1307162187efe7514e6d4abd122dd6 (patch) | |
tree | 0566ad5a4d4d6e84e900689bfe5ac53a4ba39cf7 | |
parent | 32e88686a445c06126ef473460d9762d19d5ae8d (diff) | |
download | automake-6d44a667bd1307162187efe7514e6d4abd122dd6.tar.gz |
python: do not install in system directories on Darwin 9.
On Darwin 9, get_python_lib returns a path below `/Library/Python'
regardless of the `prefix' argument it was passed, causing `make
install' to target the system directories regardless of `--prefix'
argument used. Work around this Darwin bug by ignoring the result
of get_python_lib if it points outside of the passed prefix, and
the prefix was not a system directory.
* m4/python.m4 (AM_PATH_PYTHON): If the prefix does not match the
initial portion of the pythondir returned by get_python_lib, then
ignore it unless the configured prefix is `/usr' or starts with
`/System'. Fixes instmany-python.test failure on Mac OS X 10.5.7.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | NEWS | 13 | ||||
-rw-r--r-- | m4/python.m4 | 16 |
3 files changed, 44 insertions, 0 deletions
@@ -1,3 +1,18 @@ +2009-05-23 Peter O'Gorman <peter@pogma.com> + + python: do not install in system directories on Darwin 9. + On Darwin 9, get_python_lib returns a path below `/Library/Python' + regardless of the `prefix' argument it was passed, causing `make + install' to target the system directories regardless of `--prefix' + argument used. Work around this Darwin bug by ignoring the result + of get_python_lib if it points outside of the passed prefix, and + the prefix was not a system directory. + * m4/python.m4 (AM_PATH_PYTHON): If the prefix does not match the + initial portion of the pythondir returned by get_python_lib, then + ignore it unless the configured prefix is `/usr' or starts with + `/System'. Fixes instmany-python.test failure on Mac OS X 10.5.7. + * NEWS: Update. + 2009-05-23 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Clarify how to enable `silent-rules' and other global options. @@ -1,3 +1,16 @@ +New in 1.11.0a: + +Bugs fixed in 1.11.0a: + +* Long standing bugs: + + - On Darwin 9, `pythondir' and `pyexecdir' pointed below `/Library/Python' + even if the `--prefix' argument pointed outside of a system directory. + AM_PATH_PYTHON has been fixed to ignore the value returned from python's + `get_python_lib' function if it points outside the configured prefix, + unless the `--prefix' argument was either `/usr' or below `/System'. + + New in 1.11: * Version requirements: diff --git a/m4/python.m4 b/m4/python.m4 index 239285fe6..16de9c37c 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -128,6 +128,14 @@ python2.1 python2.0]) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) @@ -158,6 +166,14 @@ python2.1 python2.0]) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) |