[gtk-vnc] Delete old manual python binding
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Delete old manual python binding
- Date: Mon, 16 Jul 2018 17:18:30 +0000 (UTC)
commit 04046ce62425da7b0163282ef124843831558616
Author: Daniel P. Berrangé <berrange redhat com>
Date: Mon Mar 26 11:11:55 2018 +0100
Delete old manual python binding
All applications should use the GObject Introspection dynamic binding
Signed-off-by: Daniel P. Berrangé <berrange redhat com>
configure.ac | 54 +-----
examples/Makefile.am | 3 +-
examples/gvncviewer-bindings.py | 213 ---------------------
.../{gvncviewer-introspection.py => gvncviewer.py} | 0
gtk-vnc.spec.in | 47 +----
src/Makefile.am | 29 ---
src/vnc.override | 111 -----------
src/vncmodule.c | 58 ------
8 files changed, 6 insertions(+), 509 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 15ff188..20bfdcf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,6 @@ AC_SUBST(GNUTLS_REQUIRED)
PYGTK_REQUIRED=2.0.0
VIEW_REQUIRED=0.6.0
GTHREAD_REQUIRED=2.0.0
-PYTHON_REQUIRED=2.4
CAIRO_REQUIRED=1.2.0
dnl *******************************************************************************
@@ -118,20 +117,6 @@ AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3.0"])
AC_CHECK_HEADERS([pwd.h termios.h])
-AC_ARG_WITH(python,
-[ --with-python build python bindings],
-[case "${withval}" in
- yes|no) ;;
- *) AC_MSG_ERROR([bad value ${withval} for python option]) ;;
- esac],[withval=yes])
-
-if test "$with_gtk" = "3.0"
-then
- WITH_PYTHON=no
-else
- WITH_PYTHON=$withval
-fi
-
GTK_VNC_COMPILE_WARNINGS
AC_ARG_WITH(examples,
@@ -365,33 +350,7 @@ AC_DEFINE_UNQUOTED([WITH_UCONTEXT],[$WITH_UCONTEXT], [Whether to use ucontext co
AM_CONDITIONAL(WITH_UCONTEXT, [test "$WITH_UCONTEXT" != "0"])
# Needed for keycodemap generator
-AM_PATH_PYTHON
-
-if test "$WITH_PYTHON" = "yes"; then
- PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQUIRED)
- AC_SUBST(PYGTK_CFLAGS)
- AC_SUBST(PYGTK_LIBS)
-
- AC_MSG_CHECKING([whether $PYTHON version >= $PYTHON_REQUIRED])
- HAVE_PYTHON_REQUIRED=no
- AM_PYTHON_CHECK_VERSION([$PYTHON], [$PYTHON_REQUIRED],
- [HAVE_PYTHON_REQUIRED="yes"],
- [HAVE_PYTHON_REQUIRED="no"])
-
- AC_MSG_RESULT($HAVE_PYTHON_REQUIRED)
-
- if test "x$HAVE_PYTHON_REQUIRED" != "xyes"
- then
- AC_MSG_ERROR("No suitable python found")
- fi
-
- AM_CHECK_PYTHON_HEADERS(have_python_headers=yes,have_python_headers=no)
-
- if test "x$have_python_headers" != "xyes"
- then
- AC_MSG_ERROR("No python development headers found")
- fi
-fi
+AM_PATH_PYTHON([3])
dnl define a MAINT-like variable REBUILD which is set
dnl if Perl, so autogenerated sources can be rebuilt
@@ -406,8 +365,6 @@ fi
AC_SUBST(REBUILD)
-AM_CONDITIONAL(WITH_PYTHON, [test "$WITH_PYTHON" = "yes"])
-
AM_CONDITIONAL(WITH_EXAMPLES, [test "$WITH_EXAMPLES" = "yes"])
GOBJECT_INTROSPECTION_CHECK([0.9.4])
@@ -461,18 +418,9 @@ Configure summary:
Extra Link Flags ...........: ${VERSION_SCRIPT_FLAGS} ${NO_UNDEFINED_FLAGS}
Prefix......................: ${prefix}
- Python binding .............: ${WITH_PYTHON}
Install example programs ...: ${WITH_EXAMPLES}
SASL support................: ${enable_sasl}
PulseAudio support..........: ${HAVE_PULSEAUDIO}
GTK+ version................: ${GTK_API_VERSION}
TLS priority................: ${with_tls_priority}
"
-
-if test ${WITH_PYTHON} = "yes" ; then
- echo "WARNING:"
- echo "WARNING: The python2 binding will be deleted in the next release."
- echo "WARNING: Please use the GObject Introspection dynamic bindings."
- echo "WARNING:"
- echo
-fi
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 61459ce..91f5aaa 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -19,7 +19,6 @@ gvncviewer_CFLAGS = $(GTK_CFLAGS) \
$(WARN_CFLAGS) \
$(VIEW_CFLAGS) -I$(top_srcdir)/src/
-EXTRA_DIST = gvncviewer-bindings.py gvncviewer-introspection.py \
- gvncviewer.js gvncviewer.pl
+EXTRA_DIST = gvncviewer.py gvncviewer.js gvncviewer.pl
-include $(top_srcdir)/git.mk
diff --git a/examples/gvncviewer-introspection.py b/examples/gvncviewer.py
similarity index 100%
rename from examples/gvncviewer-introspection.py
rename to examples/gvncviewer.py
diff --git a/gtk-vnc.spec.in b/gtk-vnc.spec.in
index 6f336b6..25635dc 100644
--- a/gtk-vnc.spec.in
+++ b/gtk-vnc.spec.in
@@ -18,11 +18,6 @@
%global with_vala 1
%endif
-%global with_python 1
-%if 0%{?fedora} || 0%{?rhel} >= 8
-%global with_python 0
-%endif
-
%if 0%{?fedora} || 0%{?rhel} >= 8
%global tls_priority "@LIBVIRT,SYSTEM"
%else
@@ -38,9 +33,7 @@ Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.5/%{name}-%{version}.ta
URL: https://wiki.gnome.org/Projects/gtk-vnc
Requires: gvnc = %{version}-%{release}
BuildRequires: gtk2-devel >= 2.14
-%if %{with_python}
-BuildRequires: pygtk2-devel python2-devel
-%endif
+BuildRequires: python3
BuildRequires: gnutls-devel libgcrypt-devel cyrus-sasl-devel zlib-devel intltool
%if %{with_gir}
BuildRequires: gobject-introspection-devel
@@ -70,23 +63,6 @@ allowing it to be completely asynchronous while remaining single threaded.
Libraries, includes, etc. to compile with the gtk-vnc library
-%if %{with_python}
-%package -n python2-gtk-vnc
-%{?python_provide:%python_provide python2-gtk-vnc}
-# Remove before F30
-Provides: %{name}-python = %{version}-%{release}
-Provides: %{name}-python%{?_isa} = %{version}-%{release}
-Obsoletes: %{name}-python < %{version}-%{release}
-Summary: Python bindings for the gtk-vnc library
-Requires: %{name} = %{version}-%{release}
-
-%description -n python2-gtk-vnc
-gtk-vnc is a VNC viewer widget for GTK2. It is built using coroutines
-allowing it to be completely asynchronous while remaining single threaded.
-
-A module allowing use of the GTK-VNC widget from python
-%endif
-
%package -n gvnc
Summary: A GObject for VNC connections
@@ -172,14 +148,8 @@ cp -a gtk-vnc-%{version} gtk-vnc2-%{version}
%define gir_arg --enable-introspection=no
%endif
-%if %{with_python}
-%define py_arg --with-python
-%else
-%define py_arg --without-python
-%endif
-
cd gtk-vnc-%{version}
-%configure --with-gtk=2.0 %{gir_arg} %{py_arg} \
+%configure --with-gtk=2.0 %{gir_arg} \
--with-tls-priority=%{tls_priority}
%__make %{?_smp_mflags} V=1
chmod -x examples/*.pl examples/*.js examples/*.py
@@ -188,7 +158,7 @@ cd ..
%if %{with_gtk3}
cd gtk-vnc2-%{version}
-%configure --with-gtk=3.0 %{gir_arg} %{py_arg} \
+%configure --with-gtk=3.0 %{gir_arg} \
--with-tls-priority=%{tls_priority}
%__make %{?_smp_mflags} V=1
chmod -x examples/*.pl examples/*.js examples/*.py
@@ -209,8 +179,6 @@ cd ..
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la
-rm -f %{buildroot}%{_libdir}/python*/site-packages/*.a
-rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la
%find_lang %{name}
@@ -250,13 +218,6 @@ rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la
%{_datadir}/gir-1.0/GtkVnc-1.0.gir
%endif
-%if %{with_python}
-%files -n python2-gtk-vnc
-%defattr(-, root, root)
-%doc gtk-vnc-%{version}/examples/gvncviewer-bindings.py
-%{_libdir}/python*/site-packages/gtkvnc.so
-%endif
-
%files -n gvnc -f %{name}.lang
%defattr(-, root, root)
%{_libdir}/libgvnc-1.0.so.*
@@ -328,7 +289,7 @@ rm -f %{buildroot}%{_libdir}/python*/site-packages/*.la
%if %{with_gir}
%doc gtk-vnc2-%{version}/examples/gvncviewer.js
%doc gtk-vnc2-%{version}/examples/gvncviewer.pl
-%doc gtk-vnc2-%{version}/examples/gvncviewer-introspection.py
+%doc gtk-vnc2-%{version}/examples/gvncviewer.py
%endif
%{_libdir}/libgtk-vnc-2.0.so
%dir %{_includedir}/%{name}-2.0/
diff --git a/src/Makefile.am b/src/Makefile.am
index ef2295e..d49e6d1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -318,35 +318,6 @@ vncconnectiontest_SOURCES = vncconnectiontest.c
vncconnectiontest_CFLAGS = $(GOBJECT_CFLAGS) $(GIO_CFLAGS)
vncconnectiontest_LDADD = libgvnc-1.0.la $(GOBJECT_LIBS) $(GIO_LIBS)
-if WITH_PYTHON
-pyexec_LTLIBRARIES = gtkvnc.la
-
-gtkvnc_la_LIBADD = libgtk-vnc-$(GTK_VNC_API_VERSION).la $(PYGTK_LIBS)
-gtkvnc_la_CFLAGS = $(GTK_CFLAGS) $(PYTHON_INCLUDES) \
- $(PYGTK_CFLAGS) $(WARN_PYTHON_CFLAGS)
-gtkvnc_la_LDFLAGS = -module -avoid-version -fPIC
-gtkvnc_la_SOURCES = vncmodule.c
-nodist_gtkvnc_la_SOURCES = vncmodule.defs.c
-BUILT_SOURCES += vncmodule.defs.c
-
-CODEGENDIR = $(shell pkg-config --variable=codegendir pygobject-2.0)
-DEFSDIR = $(shell pkg-config --variable=defsdir pygtk-2.0)
-
-vnc.defs: vncdisplay.h vncdisplayenums.h
- $(AM_V_GEN)$(PYTHON) $(CODEGENDIR)/h2def.py $< > $@
-
-vncmodule.defs.c: vnc.override vnc.defs
- $(AM_V_GEN)pygtk-codegen-2.0 --prefix gtkvnc \
- --register $(DEFSDIR)/gdk-types.defs \
- --register $(DEFSDIR)/gtk-types.defs \
- --override $(srcdir)/vnc.override vnc.defs > $@
-
-CLEANFILES += vnc.defs vncmodule.defs.c
-EXTRA_DIST += vnc.override
-
-else
-EXTRA_DIST += vnc.override vncmodule.c
-endif
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]