diff --git a/configure.ac b/configure.ac index 83b7de8b..b8ca184e 100644 --- a/configure.ac +++ b/configure.ac @@ -250,6 +250,7 @@ if test "x$want_python" = "xyes"; then pythondir=`echo ${pythondir} | sed -e 's,[$][{]prefix[}],${pyprefix},g'` pyexecdir=`echo ${pyexecdir} | sed -e 's,[$][{]exec_prefix[}],${pyprefix},g'` fi + PYTHON_EXEC_PREFIX=$($PYTHON -c 'import sys; print sys.exec_prefix') else # Namespace support requires Python support want_linux_netns=no diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 6a435a3f..2818d88b 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -7,6 +7,8 @@ # Makefile for building netns components. # +PYSBINDIR = ${PYTHON_EXEC_PREFIX}/sbin + if WANT_NETNS SUBDIRS = src ns3 endif @@ -22,10 +24,11 @@ install-exec-hook: # Python package uninstall uninstall-hook: - rm -f ${SBINDIR}/core-daemon - rm -f ${SBINDIR}/coresendmsg - rm -f ${SBINDIR}/core-cleanup - rm -f ${SBINDIR}/core-xen-cleanup + rm -f ${PYSBINDIR}/core-daemon + rm -f ${PYSBINDIR}/coresendmsg + rm -f ${PYSBINDIR}/core-cleanup + rm -f ${PYSBINDIR}/core-xen-cleanup + rm -f ${PYSBINDIR}/core-manage rm -f ${pythondir}/core_python-${COREDPY_VERSION}-py${PYTHON_VERSION}.egg-info rm -f ${pythondir}/core_python_netns-1.0-py${PYTHON_VERSION}.egg-info rm -rf ${pythondir}/core