Re: [libvirt] [PATCH glib] Delete the manually written python binding

2016-08-02 Thread Christophe Fergeau

Acked-by: Christophe Fergeau 

On Tue, Aug 02, 2016 at 02:34:33PM +0100, Daniel P. Berrange wrote:
> The python binding only supports python2, only supports
> 1 single API in libvirt-glib and has not even been enabled
> in RPM builds since Fedora 15. Any distro these days should
> have gobject introspection and pygobject available, so
> there's no compelling reason to continue to have the python
> binding exist.
> 
> Signed-off-by: Daniel P. Berrange 
> ---
>  Makefile.am|  2 +-
>  autobuild.sh   |  6 ++--
>  cfg.mk |  3 --
>  configure.ac   | 87 
> --
>  libvirt-glib.spec.in   | 35 +--
>  mingw-libvirt-glib.spec.in |  3 +-
>  python/Makefile.am | 34 --
>  python/libvirt-glib.c  | 59 ---
>  python/libvirtglib.py  | 10 --
>  9 files changed, 5 insertions(+), 234 deletions(-)
>  delete mode 100644 python/Makefile.am
>  delete mode 100644 python/libvirt-glib.c
>  delete mode 100644 python/libvirtglib.py
> 
> diff --git a/Makefile.am b/Makefile.am
> index ae8b06d..459d544 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,5 +1,5 @@
>  
> -SUBDIRS = libvirt-glib libvirt-gconfig libvirt-gobject python vapi examples 
> docs po tests
> +SUBDIRS = libvirt-glib libvirt-gconfig libvirt-gobject vapi examples docs po 
> tests
>  
>  ACLOCAL_AMFLAGS = -I m4
>  
> diff --git a/autobuild.sh b/autobuild.sh
> index 053dc1f..9935de1 100755
> --- a/autobuild.sh
> +++ b/autobuild.sh
> @@ -56,8 +56,7 @@ if test -x /usr/bin/i686-w64-mingw32-gcc ; then
>  --host=i686-w64-mingw32 \
>  --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
>  --enable-werror \
> ---enable-introspection=no \
> ---without-python
> +--enable-introspection=no
>  
>make
>make install
> @@ -75,8 +74,7 @@ if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
>  --host=x86_64-w64-mingw32 \
>  --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
>  --enable-werror \
> ---enable-introspection=no \
> ---without-python
> +--enable-introspection=no
>  
>make
>make install
> diff --git a/cfg.mk b/cfg.mk
> index b322393..6dd34cf 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -115,9 +115,6 @@ exclude_file_name_regexp--sc_preprocessor_indentation = 
> ^*/*.[ch]
>  
>  exclude_file_name_regexp--sc_prohibit_strcmp = ^*/*.[ch]
>  
> -exclude_file_name_regexp--sc_require_config_h = python/libvirt-glib.c
> -exclude_file_name_regexp--sc_require_config_h_first = python/libvirt-glib.c
> -
>  # XXX we shouldn't really ignore this, but the horrible enum rules...
>  exclude_file_name_regexp--sc_makefile_at_at_check = 
> libvirt-gobject/Makefile.am
>  
> diff --git a/configure.ac b/configure.ac
> index 8edde74..cc9b2aa 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -135,15 +135,11 @@ dnl Copied from libxml2 configure.in, but I removed 
> mingw changes
>  dnl for now since I'm not supporting mingw at present.  - RWMJ
>  CYGWIN_EXTRA_LDFLAGS=
>  CYGWIN_EXTRA_LIBADD=
> -CYGWIN_EXTRA_PYTHON_LIBADD=
>  MINGW_EXTRA_LDFLAGS=
>  case "$host" in
>*-*-cygwin*)
>  CYGWIN_EXTRA_LDFLAGS="-no-undefined"
>  CYGWIN_EXTRA_LIBADD="${INTLLIBS}"
> -if test "x$PYTHON_VERSION" != "x"; then
> -  CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config 
> -lpython${PYTHON_VERSION}"
> -fi
>  ;;
>*-*-mingw*)
>  MINGW_EXTRA_LDFLAGS="-no-undefined"
> @@ -151,7 +147,6 @@ case "$host" in
>  esac
>  AC_SUBST([CYGWIN_EXTRA_LDFLAGS])
>  AC_SUBST([CYGWIN_EXTRA_LIBADD])
> -AC_SUBST([CYGWIN_EXTRA_PYTHON_LIBADD])
>  AC_SUBST([MINGW_EXTRA_LDFLAGS])
>  
>  
> @@ -172,87 +167,6 @@ if test "${enable_coverage}" = yes; then
>COV_FLAGS=
>  fi
>  
> -dnl
> -dnl check for python
> -dnl
> -AC_ARG_WITH([python],
> -  AC_HELP_STRING([--with-python], [Build python bindings 
> @<:@default=yes@:>@]),[],[with_python=yes])
> -
> -PYTHON_VERSION=
> -PYTHON_INCLUDES=
> -PYTHON_SITE_PACKAGES=
> -PYTHON_TESTS=
> -pythondir=
> -if test "$with_python" != "no" ; then
> -if test "$with_python" = "yes" ; then
> -   with_python=""
> -fi
> -if test -x "$with_python/bin/python"
> -then
> -echo Found python in $with_python/bin/python
> -PYTHON="$with_python/bin/python"
> -else
> - if test -x "$with_python"
> - then
> - echo Found python in $with_python
> - PYTHON="$with_python"
> - else
> - if test -x "$PYTHON"
> - then
> - echo Found python in environment PYTHON=$PYTHON
> - with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
> - else
> - AC_PATH_PROG([PYTHON], [python python2.6 python2.5 python2.4 
> python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
> - fi
> - fi
> -fi
> -if test "$PYTHON" != ""
> -

[libvirt] [PATCH glib] Delete the manually written python binding

2016-08-02 Thread Daniel P. Berrange
The python binding only supports python2, only supports
1 single API in libvirt-glib and has not even been enabled
in RPM builds since Fedora 15. Any distro these days should
have gobject introspection and pygobject available, so
there's no compelling reason to continue to have the python
binding exist.

Signed-off-by: Daniel P. Berrange 
---
 Makefile.am|  2 +-
 autobuild.sh   |  6 ++--
 cfg.mk |  3 --
 configure.ac   | 87 --
 libvirt-glib.spec.in   | 35 +--
 mingw-libvirt-glib.spec.in |  3 +-
 python/Makefile.am | 34 --
 python/libvirt-glib.c  | 59 ---
 python/libvirtglib.py  | 10 --
 9 files changed, 5 insertions(+), 234 deletions(-)
 delete mode 100644 python/Makefile.am
 delete mode 100644 python/libvirt-glib.c
 delete mode 100644 python/libvirtglib.py

diff --git a/Makefile.am b/Makefile.am
index ae8b06d..459d544 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 
-SUBDIRS = libvirt-glib libvirt-gconfig libvirt-gobject python vapi examples 
docs po tests
+SUBDIRS = libvirt-glib libvirt-gconfig libvirt-gobject vapi examples docs po 
tests
 
 ACLOCAL_AMFLAGS = -I m4
 
diff --git a/autobuild.sh b/autobuild.sh
index 053dc1f..9935de1 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -56,8 +56,7 @@ if test -x /usr/bin/i686-w64-mingw32-gcc ; then
 --host=i686-w64-mingw32 \
 --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
 --enable-werror \
---enable-introspection=no \
---without-python
+--enable-introspection=no
 
   make
   make install
@@ -75,8 +74,7 @@ if test -x /usr/bin/x86_64-w64-mingw32-gcc ; then
 --host=x86_64-w64-mingw32 \
 --prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
 --enable-werror \
---enable-introspection=no \
---without-python
+--enable-introspection=no
 
   make
   make install
diff --git a/cfg.mk b/cfg.mk
index b322393..6dd34cf 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -115,9 +115,6 @@ exclude_file_name_regexp--sc_preprocessor_indentation = 
^*/*.[ch]
 
 exclude_file_name_regexp--sc_prohibit_strcmp = ^*/*.[ch]
 
-exclude_file_name_regexp--sc_require_config_h = python/libvirt-glib.c
-exclude_file_name_regexp--sc_require_config_h_first = python/libvirt-glib.c
-
 # XXX we shouldn't really ignore this, but the horrible enum rules...
 exclude_file_name_regexp--sc_makefile_at_at_check = libvirt-gobject/Makefile.am
 
diff --git a/configure.ac b/configure.ac
index 8edde74..cc9b2aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,15 +135,11 @@ dnl Copied from libxml2 configure.in, but I removed mingw 
changes
 dnl for now since I'm not supporting mingw at present.  - RWMJ
 CYGWIN_EXTRA_LDFLAGS=
 CYGWIN_EXTRA_LIBADD=
-CYGWIN_EXTRA_PYTHON_LIBADD=
 MINGW_EXTRA_LDFLAGS=
 case "$host" in
   *-*-cygwin*)
 CYGWIN_EXTRA_LDFLAGS="-no-undefined"
 CYGWIN_EXTRA_LIBADD="${INTLLIBS}"
-if test "x$PYTHON_VERSION" != "x"; then
-  CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config 
-lpython${PYTHON_VERSION}"
-fi
 ;;
   *-*-mingw*)
 MINGW_EXTRA_LDFLAGS="-no-undefined"
@@ -151,7 +147,6 @@ case "$host" in
 esac
 AC_SUBST([CYGWIN_EXTRA_LDFLAGS])
 AC_SUBST([CYGWIN_EXTRA_LIBADD])
-AC_SUBST([CYGWIN_EXTRA_PYTHON_LIBADD])
 AC_SUBST([MINGW_EXTRA_LDFLAGS])
 
 
@@ -172,87 +167,6 @@ if test "${enable_coverage}" = yes; then
   COV_FLAGS=
 fi
 
-dnl
-dnl check for python
-dnl
-AC_ARG_WITH([python],
-  AC_HELP_STRING([--with-python], [Build python bindings 
@<:@default=yes@:>@]),[],[with_python=yes])
-
-PYTHON_VERSION=
-PYTHON_INCLUDES=
-PYTHON_SITE_PACKAGES=
-PYTHON_TESTS=
-pythondir=
-if test "$with_python" != "no" ; then
-if test "$with_python" = "yes" ; then
-   with_python=""
-fi
-if test -x "$with_python/bin/python"
-then
-echo Found python in $with_python/bin/python
-PYTHON="$with_python/bin/python"
-else
-   if test -x "$with_python"
-   then
-   echo Found python in $with_python
-   PYTHON="$with_python"
-   else
-   if test -x "$PYTHON"
-   then
-   echo Found python in environment PYTHON=$PYTHON
-   with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
-   else
-   AC_PATH_PROG([PYTHON], [python python2.6 python2.5 python2.4 
python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
-   fi
-   fi
-fi
-if test "$PYTHON" != ""
-then
-PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
-   echo Found Python version $PYTHON_VERSION
-fi
-if test "$PYTHON_VERSION" != ""
-then
-   if test -r $with_python/include/python$PYTHON_VERSION/Python.h && \
-  test -d $with_python/lib/python$PYTHON_VERSION/site-packages
-   then
-