[Spice-devel] [spice-gtk 1/2] build-sys: Delete pygtk2-related files
Marc-André Lureau
mlureau at redhat.com
Tue May 3 09:34:11 UTC 2016
ack
----- Original Message -----
> They are no longer needed since 0917002c which dropped pygtk2 support
> ---
> m4/check_python.m4 | 46 ------------
> src/Makefile.am | 2 -
> src/spice-client-gtk-module.c | 45 -----------
> src/spice-client-gtk.override | 171
> ------------------------------------------
> 4 files changed, 264 deletions(-)
> delete mode 100644 m4/check_python.m4
> delete mode 100644 src/spice-client-gtk-module.c
> delete mode 100644 src/spice-client-gtk.override
>
> diff --git a/m4/check_python.m4 b/m4/check_python.m4
> deleted file mode 100644
> index 16fb49c..0000000
> --- a/m4/check_python.m4
> +++ /dev/null
> @@ -1,46 +0,0 @@
> -# serial 3
> -# Find valid warning flags for the C Compiler. -*-Autoconf-*-
> -#
> -# Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
> -#
> -# This program is free software; you can redistribute it and/or modify
> -# it under the terms of the GNU General Public License as published by
> -# the Free Software Foundation; either version 2 of the License, or
> -# (at your option) any later version.
> -#
> -# This program is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> -# GNU General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with this program; if not, write to the Free Software
> -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> -# 02110-1301 USA
> -
> -# Written by Jesse Thilo.
> -
> -dnl a macro to check for ability to create python extensions
> -dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
> -dnl function also defines PYTHON_INCLUDES
> -AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
> - [AC_REQUIRE([AM_PATH_PYTHON])
> - AC_MSG_CHECKING(for headers required to compile python extensions)
> - dnl deduce PYTHON_INCLUDES
> - py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
> - py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
> - PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
> - if test "$py_prefix" != "$py_exec_prefix"; then
> - PYTHON_INCLUDES="$PYTHON_INCLUDES
> -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
> - fi
> - AC_SUBST(PYTHON_INCLUDES)
> - dnl check if the headers exist:
> - save_CPPFLAGS="$CPPFLAGS"
> - CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
> - AC_TRY_CPP([#include <Python.h>],dnl
> - [AC_MSG_RESULT(found)
> - $1],dnl
> - [AC_MSG_RESULT(not found)
> - $2])
> - CPPFLAGS="$save_CPPFLAGS"
> -])
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 0ef3bea..f0d2c68 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -37,8 +37,6 @@ EXTRA_DIST = \
> map-file \
> spice-glib-sym-file \
> spice-gtk-sym-file \
> - spice-client-gtk-manual.defs \
> - spice-client-gtk.override \
> spice-marshal.txt \
> spice-version.h.in \
> $(NULL)
> diff --git a/src/spice-client-gtk-module.c b/src/spice-client-gtk-module.c
> deleted file mode 100644
> index b82f1e3..0000000
> --- a/src/spice-client-gtk-module.c
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
> -/*
> - Copyright (C) 2010 Red Hat, Inc.
> -
> - This library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Lesser General Public
> - License as published by the Free Software Foundation; either
> - version 2.1 of the License, or (at your option) any later version.
> -
> - This library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Lesser General Public License for more details.
> -
> - You should have received a copy of the GNU Lesser General Public
> - License along with this library; if not, see
> <http://www.gnu.org/licenses/>.
> -*/
> -#include "config.h"
> -#include <pygobject.h>
> -
> -void spice_register_classes (PyObject *d);
> -void spice_add_constants(PyObject *module, const gchar *strip_prefix);
> -extern PyMethodDef spice_functions[];
> -
> -DL_EXPORT(void) initSpiceClientGtk(void)
> -{
> - PyObject *m, *d;
> -
> - init_pygobject();
> -
> - m = Py_InitModule("SpiceClientGtk", spice_functions);
> - if (PyErr_Occurred())
> - Py_FatalError("can't init module");
> -
> - d = PyModule_GetDict(m);
> - if (PyErr_Occurred())
> - Py_FatalError("can't get dict");
> -
> - spice_register_classes(d);
> - spice_add_constants(m, "SPICE_");
> -
> - if (PyErr_Occurred()) {
> - Py_FatalError("can't initialise module SpiceClientGtk");
> - }
> -}
> diff --git a/src/spice-client-gtk.override b/src/spice-client-gtk.override
> deleted file mode 100644
> index 41aeee3..0000000
> --- a/src/spice-client-gtk.override
> +++ /dev/null
> @@ -1,171 +0,0 @@
> -%%
> -headers
> -#include <Python.h>
> -#include "pygobject.h"
> -#include "spice-common.h"
> -#include "spice-widget.h"
> -#include "spice-gtk-session.h"
> -#include "spice-audio.h"
> -#include "usb-device-widget.h"
> -%%
> -modulename spice_client_gtk
> -%%
> -import gobject.GObject as PyGObject_Type
> -import gtk.DrawingArea as PyGtkDrawingArea_Type
> -import gtk.Widget as PyGtkWidget_Type
> -import gtk.VBox as PyGtkVBox_Type
> -%%
> -ignore-glob
> - *_get_type
> -%%
> -%%
> -override spice_display_send_keys kwargs
> -static PyObject*
> -_wrap_spice_display_send_keys(PyGObject *self,
> - PyObject *args, PyObject *kwargs)
> -{
> - static char *kwlist[] = {"keys", "kind", NULL};
> - PyObject *keyList;
> - int kind = SPICE_DISPLAY_KEY_EVENT_CLICK;
> - int i, len;
> - guint *keys;
> -
> - if (!PyArg_ParseTupleAndKeywords(args, kwargs,
> - "O|I:SpiceDisplay.send_keys", kwlist,
> - &keyList, &kind))
> - return NULL;
> -
> - if (!PyList_Check(keyList))
> - return NULL;
> -
> - len = PyList_Size(keyList);
> - keys = g_malloc0(sizeof(guint)*len);
> -
> - for (i = 0 ; i < len ; i++) {
> - PyObject *val;
> - char *sym;
> - val = PyList_GetItem(keyList, i);
> - sym = PyString_AsString(val);
> - if (!sym) {
> - g_free(keys);
> - return NULL;
> - }
> - keys[i] = gdk_keyval_from_name(sym);
> - }
> -
> - spice_display_send_keys(SPICE_DISPLAY(self->obj), keys, len, kind);
> - g_free(keys);
> -
> - Py_INCREF(Py_None);
> - return Py_None;
> -}
> -%%
> -override spice_display_get_grab_keys kwargs
> -static PyObject*
> -_wrap_spice_display_get_grab_keys(PyGObject *self,
> - PyObject *args, PyObject *kwargs)
> -{
> - SpiceGrabSequence *seq;
> - PyObject *keyList;
> - int i;
> -
> - seq = spice_display_get_grab_keys(SPICE_DISPLAY(self->obj));
> -
> - keyList = PyList_New(0);
> - for (i = 0 ; i < seq->nkeysyms ; i++)
> - PyList_Append(keyList, PyInt_FromLong(seq->keysyms[i]));
> -
> - return keyList;
> -}
> -%%
> -override spice_display_set_grab_keys kwargs
> -static PyObject*
> -_wrap_spice_display_set_grab_keys(PyGObject *self,
> - PyObject *args, PyObject *kwargs)
> -{
> - static char *kwlist[] = {"keys", NULL};
> - PyObject *keyList;
> - int i;
> - guint nkeysyms;
> - guint *keysyms;
> - SpiceGrabSequence *seq;
> -
> - if (!PyArg_ParseTupleAndKeywords(args, kwargs,
> - "O|I:SpiceDisplay.set_grab_keys",
> kwlist,
> - &keyList))
> - return NULL;
> -
> - if (!PyList_Check(keyList))
> - return NULL;
> -
> - nkeysyms = PyList_Size(keyList);
> - keysyms = g_new0(guint, nkeysyms);
> -
> - for (i = 0 ; i < nkeysyms ; i++) {
> - PyObject *val = PyList_GetItem(keyList, i);
> - keysyms[i] = (guint)PyInt_AsLong(val);
> - }
> -
> - seq = spice_grab_sequence_new(nkeysyms, keysyms);
> - g_free(keysyms);
> -
> - spice_display_set_grab_keys(SPICE_DISPLAY(self->obj), seq);
> -
> - spice_grab_sequence_free(seq);
> -
> - Py_INCREF(Py_None);
> - return Py_None;
> -}
> -%%
> -override spice_session_get_channels
> -static PyObject*
> -_wrap_spice_session_get_channels(PyGObject *self,
> - PyObject *args, PyObject *kwargs)
> -{
> - PyObject *py_list;
> - GList *list, *tmp;
> - PyObject *chann;
> -
> - list = spice_session_get_channels(SPICE_SESSION(self->obj));
> -
> - if ((py_list = PyList_New(0)) == NULL) {
> - return NULL;
> - }
> - for (tmp = list; tmp != NULL; tmp = tmp->next) {
> - chann = pygobject_new(G_OBJECT(tmp->data));
> - if (chann == NULL) {
> - Py_DECREF(py_list);
> - return NULL;
> - }
> - PyList_Append(py_list, chann);
> - Py_DECREF(chann);
> - }
> - return py_list;
> -}
> -%%
> -override spice_audio_new
> -static int
> -_wrap_spice_audio_new(PyGObject *self,
> - PyObject *args, PyObject *kwargs)
> -{
> - static char *kwlist[] = {"session", "context", "name", NULL};
> - PyGObject *session = NULL;
> - PyObject *py_context = NULL;
> - char *name = NULL;
> -
> - if (!PyArg_ParseTupleAndKeywords(args, kwargs,
> - "O!|Os:SpiceAudio", kwlist,
> - &PySpiceSession_Type, &session,
> - &py_context, &name))
> - return -1;
> -
> - self->obj = (GObject *)spice_audio_new(SPICE_SESSION(session->obj),
> NULL, NULL);
> -
> - if (!self->obj) {
> - PyErr_SetString(PyExc_RuntimeError, "could not create SpiceAudio
> object");
> - return -1;
> - }
> - pygobject_register_wrapper((PyObject *)self);
> - return 0;
> -
> -}
> --
> 2.7.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list