Blob Blame History Raw

 configure        | 6 ++++++
 configure.in     | 3 +++
 liblvm/lvm2app.h | 2 ++
 python/liblvm.c  | 2 ++
 4 files changed, 13 insertions(+)

diff --git a/configure b/configure
index 2afbe6e..78c738d 100755
--- a/configure
+++ b/configure
@@ -12791,6 +12791,10 @@ $as_echo "$APPLIB" >&6; }
 test "$APPLIB" = yes \
   && LVM2APP_LIB=-llvm2app \
   || LVM2APP_LIB=
+if test "$APPLIB"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Python bindings are deprecated. Use D-Bus API" >&5
+$as_echo "$as_me: WARNING: Python bindings are deprecated. Use D-Bus API" >&2;}
+fi
 
 ################################################################################
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile liblvm2cmd.so" >&5
@@ -13868,6 +13872,8 @@ $as_echo "no" >&6; }
 fi
 
 if test "$PYTHON_BINDINGS" = yes -o "$PYTHON2_BINDINGS" = yes -o "$PYTHON3_BINDINGS" = yes; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Python bindings are deprecated. Use D-Bus API" >&5
+$as_echo "$as_me: WARNING: Python bindings are deprecated. Use D-Bus API" >&2;}
 	test "$APPLIB" != yes && as_fn_error $? "Python_bindings require --enable-applib" "$LINENO" 5
 fi
 
diff --git a/configure.in b/configure.in
index 43e8652..e2f448e 100644
--- a/configure.in
+++ b/configure.in
@@ -1464,6 +1464,8 @@ AC_SUBST([LVM2APP_LIB])
 test "$APPLIB" = yes \
   && LVM2APP_LIB=-llvm2app \
   || LVM2APP_LIB=
+AS_IF([test "$APPLIB"],
+      [AC_MSG_WARN([Python bindings are deprecated. Use D-Bus API])])
 
 ################################################################################
 dnl -- Enable cmdlib
@@ -1546,6 +1548,7 @@ if test "$BUILD_LVMDBUSD" = yes; then
 fi
 
 if test "$PYTHON_BINDINGS" = yes -o "$PYTHON2_BINDINGS" = yes -o "$PYTHON3_BINDINGS" = yes; then
+	AC_MSG_WARN([Python bindings are deprecated. Use D-Bus API])
 	test "$APPLIB" != yes && AC_MSG_ERROR([Python_bindings require --enable-applib])
 fi
 
diff --git a/liblvm/lvm2app.h b/liblvm/lvm2app.h
index be53b2d..f64262d 100644
--- a/liblvm/lvm2app.h
+++ b/liblvm/lvm2app.h
@@ -18,6 +18,8 @@
 
 #include <stdint.h>
 
+#warning "liblvm2app is deprecated, use D-Bus API instead."
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/python/liblvm.c b/python/liblvm.c
index 1b3534e..6d67b8b 100644
--- a/python/liblvm.c
+++ b/python/liblvm.c
@@ -2085,6 +2085,8 @@ PyMODINIT_FUNC initlvm(void)
 		PyModule_AddObject(m, "LibLVMError", _LibLVMError);
 	}
 
+	PyErr_Warn(PyExc_DeprecationWarning, "Python API is deprecated, use D-Bus API instead.");
+
 	Py_AtExit(_liblvm_cleanup);
 #ifdef IS_PY3K
 	return m;