Update troubleshouting instruction for Python bindings
For issue #512 * README: Update instructions. * configure.ac: Add some code to warn if Python files will be installed in a place that is not searched up by default. Add --with-pythondir support. * NEWS: Mention --with-pythondir.
This commit is contained in:
parent
4ab51e1c88
commit
e867242cf6
3 changed files with 57 additions and 13 deletions
25
configure.ac
25
configure.ac
|
|
@ -189,9 +189,14 @@ if test "x${enable_python:-yes}" = xyes; then
|
|||
AC_MSG_NOTICE([You may configure with --disable-python ]dnl
|
||||
[if you do not need Python bindings.])
|
||||
adl_CHECK_PYTHON
|
||||
|
||||
AC_ARG_WITH([pythondir],
|
||||
[AS_HELP_STRING([--with-pythondir], [override the computed pythondir])],
|
||||
[pythondir=$withval], [])
|
||||
fi
|
||||
|
||||
|
||||
|
||||
adl_ENABLE_DEBUG
|
||||
ad_GCC_OPTIM
|
||||
adl_NDEBUG
|
||||
|
|
@ -290,3 +295,23 @@ case $VERSION:$enable_devel in
|
|||
echo '==================================================================='
|
||||
;;
|
||||
esac
|
||||
|
||||
case $enable_python in
|
||||
yes)
|
||||
pd=$pythondir
|
||||
eval pd=$pd
|
||||
eval pd=$pd
|
||||
$PYTHON -c "
|
||||
import sys
|
||||
if '$pd' in sys.path:
|
||||
exit()
|
||||
else:
|
||||
print('\nWARNING: Python bindings will be installed in $pd')
|
||||
print(' however this path is not searched by default by $PYTHON.')
|
||||
print('\n$PYTHON\'s sys.path contains the following paths:\n',
|
||||
'\n'.join(sys.path))
|
||||
print('\nUse --with-pythondir=... if you wish '
|
||||
'to change this installation path.')
|
||||
"
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue