+4698. [port] Add --with-python-install-dir configure option to allow
+ specifying a nonstandard installation directory for
+ Python modules. [RT #45407]
+
4697. [bug] Restore workaround for Microsoft Windows TSIG hash
computation bug. [RT #45854]
${INSTALL_DATA} ${srcdir}/dnssec-keymgr.8 ${DESTDIR}${mandir}/man8
if test -n "${PYTHON}" ; then \
if test -n "${DESTDIR}" ; then \
- ${PYTHON} ${srcdir}/setup.py install --root=${DESTDIR} --prefix=${prefix} ; \
+ ${PYTHON} ${srcdir}/setup.py install --root=${DESTDIR} --prefix=${prefix} @PYTHON_INSTALL_LIB@ ; \
else \
- ${PYTHON} ${srcdir}/setup.py install --prefix=${prefix} ; \
+ ${PYTHON} ${srcdir}/setup.py install --prefix=${prefix} @PYTHON_INSTALL_LIB@ ; \
fi ; \
rm -rf build ; \
fi
sys.path.insert(0, os.path.dirname(sys.argv[0]))
if os.name != 'nt':
- sys.path.insert(1, os.path.join('@prefix@', 'lib',
- 'python' + sys.version[:3], 'site-packages'))
+ if '@PYTHON_INSTALL_DIR@': # value of --with-python-install-dir
+ sys.path.insert(1, '@PYTHON_INSTALL_DIR@')
+ else:
+ sys.path.insert(1, os.path.join('@prefix@', 'lib',
+ 'python' + sys.version[:3], 'site-packages'))
import isc.checkds
sys.path.insert(0, os.path.dirname(sys.argv[0]))
if os.name != 'nt':
- sys.path.insert(1, os.path.join('@prefix@', 'lib',
- 'python' + sys.version[:3], 'site-packages'))
+ if '@PYTHON_INSTALL_DIR@': # value of --with-python-install-dir
+ sys.path.insert(1, '@PYTHON_INSTALL_DIR@')
+ else:
+ sys.path.insert(1, os.path.join('@prefix@', 'lib',
+ 'python' + sys.version[:3], 'site-packages'))
import isc.coverage
sys.path.insert(0, os.path.dirname(sys.argv[0]))
if os.name != 'nt':
- sys.path.insert(1, os.path.join('@prefix@', 'lib',
- 'python' + sys.version[:3], 'site-packages'))
+ if '@PYTHON_INSTALL_DIR@': # value of --with-python-install-dir
+ sys.path.insert(1, '@PYTHON_INSTALL_DIR@')
+ else:
+ sys.path.insert(1, os.path.join('@prefix@', 'lib',
+ 'python' + sys.version[:3], 'site-packages'))
import isc.keymgr
AC_ARG_WITH(python,
[ --with-python=PATH specify path to python interpreter],
use_python="$withval", use_python="unspec")
+AC_ARG_WITH(python-install-dir,
+ AC_HELP_STRING([--with-python-install-dir=PATH],
+ [installation directory for Python modules]),
+ use_python_install_dir="$withval", use_python_install_dir="unspec")
python="python python3 python3.5 python3.4 python3.3 python3.2 python2 python2.7"
unset PYTHON
fi
done
- if test "X$PYTHON" = "X"
+ if test "X$PYTHON" != "X"
then
+ case "$use_python_install_dir" in
+ unspec)
+ PYTHON_INSTALL_DIR=""
+ PYTHON_INSTALL_LIB=""
+ ;;
+ *)
+ PYTHON_INSTALL_DIR="$use_python_install_dir"
+ PYTHON_INSTALL_LIB="--install-lib=$use_python_install_dir"
+ ;;
+ esac
+ else
AC_MSG_CHECKING([for python support])
case "$use_python" in
unspec)
AC_SUBST(COVERAGE)
AC_SUBST(KEYMGR)
AC_SUBST(PYTHON_TOOLS)
+AC_SUBST(PYTHON_INSTALL_DIR)
+AC_SUBST(PYTHON_INSTALL_LIB)
#
# Special processing of paths depending on whether --prefix,