diff --git a/configure.ac b/configure.ac index 869a4f3069aa046bd387921f2b5f34932e4e0fa4..ff604401d3f2c4640c3ccfff18463b25a44758fc 100644 --- a/configure.ac +++ b/configure.ac @@ -16,21 +16,27 @@ AM_PROG_AR dnl Check for Doxygen AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc], [Disable documentation generation (doxygen)])]) AS_IF([test "x$enable_doc" != "xno"], [ - AC_CHECK_PROGS([DOXYGEN], [doxygen]) - AS_IF([test -z "$DOXYGEN"],[AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])]) -]) + AC_CHECK_PROGS([DOXYGEN], [doxygen]) + AS_IF([test -z "$DOXYGEN"],[AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])]) + ]) AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) dnl Check for Python AC_ARG_ENABLE([python], [AS_HELP_STRING([--disable-python], [Disble python binding])]) AS_IF([test "x$enable_python" != "xno"], [ - AM_PATH_PYTHON([3.3],, [:]) - AS_IF([test -n "$PYTHON"],[ - AC_CHECK_PROGS([CYTHON], [cython]) - AS_IF([test -z "$CYTHON"],[AC_MSG_WARN([Cython not found - continuing without python support])]) - ]) -]) + AM_PATH_PYTHON([3.3],, [:]) + AS_IF([test -n "$PYTHON"],[ + AC_CHECK_PROGS([CYTHON], [cython]) + AS_IF([test -z "$CYTHON"],[AC_MSG_WARN([Cython not found - continuing without python support])]) + ]) + ]) AM_CONDITIONAL([USE_CYTHON], [test -n "$CYTHON"]) +dnl Check for pip support (uninstall) +AS_IF([test -n "$PYTHON"],[ + AC_CHECK_PROGS([PIP], [pip3]) + AS_IF([test -z "$PIP"],[AC_MSG_WARN([pip not found - continuing without python uninstall support])]) + AM_CONDITIONAL([HAVE_PIP], [test -n "$PIP"]) + ]) case "${host_os}" in "") diff --git a/python/Makefile.am b/python/Makefile.am index 3c6100be7a7dd79dffb9fa1b039d93491a9364b3..0949da89d49e51f587372ed45b4af5354d0bfee3 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -10,8 +10,13 @@ all-local: pybuild.stamp clean-local: rm -rf $(builddir)/build $(builddir)/*.so -install: +install-exec-local: $(PYTHON) setup.py install rm -rf $(builddir)/build -endif \ No newline at end of file +if HAVE_PIP +uninstall-local: + /usr/bin/yes | $(PIP) uninstall $(PACKAGE) +endif + +endif