Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ff088ad3ed | ||
|
4f84db6ac5 | ||
|
ebfddf2c7d | ||
|
112281f73e | ||
|
01135f89b9 | ||
|
33f57c65e0 | ||
|
14e44ae561 | ||
|
6617c26f33 | ||
|
d6dc320bb7 | ||
|
986308e848 | ||
|
4037de6069 | ||
|
fb17c9a813 |
102
fix-rhythmbox.patch
Normal file
102
fix-rhythmbox.patch
Normal file
@ -0,0 +1,102 @@
|
||||
From 69c671ec984e7592afbd86b33e38fb8095b7f4f1 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 19 Dec 2012 13:04:32 -0500
|
||||
Subject: [PATCH] pyg_value_from_pyobject: support GArray
|
||||
|
||||
This commit adds support for marshalling
|
||||
a python list (or other sequence) returned
|
||||
from signal handlers to GArray, if necessary.
|
||||
|
||||
This parallels the implementation written
|
||||
to marshal to (the now deprecated) GValueArray.
|
||||
|
||||
This fixes a crash in rhythmbox as seen downstream here:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=872851
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=690514
|
||||
---
|
||||
gi/_gobject/pygtype.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 60 insertions(+)
|
||||
|
||||
diff --git a/gi/_gobject/pygtype.c b/gi/_gobject/pygtype.c
|
||||
index c803db3..b57d829 100644
|
||||
--- a/gi/_gobject/pygtype.c
|
||||
+++ b/gi/_gobject/pygtype.c
|
||||
@@ -727,6 +727,63 @@ pyg_value_array_from_pyobject(GValue *value,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int
|
||||
+pyg_array_from_pyobject(GValue *value,
|
||||
+ PyObject *obj)
|
||||
+{
|
||||
+ int len;
|
||||
+ GArray *array;
|
||||
+ int i;
|
||||
+
|
||||
+ len = PySequence_Length(obj);
|
||||
+ if (len == -1) {
|
||||
+ PyErr_Clear();
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ array = g_array_new(FALSE, TRUE, sizeof(GValue));
|
||||
+
|
||||
+ for (i = 0; i < len; ++i) {
|
||||
+ PyObject *item = PySequence_GetItem(obj, i);
|
||||
+ GType type;
|
||||
+ GValue item_value = { 0, };
|
||||
+ int status;
|
||||
+
|
||||
+ if (! item) {
|
||||
+ PyErr_Clear();
|
||||
+ g_array_free(array, FALSE);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (item == Py_None)
|
||||
+ type = G_TYPE_POINTER; /* store None as NULL */
|
||||
+ else {
|
||||
+ type = pyg_type_from_object((PyObject*)Py_TYPE(item));
|
||||
+ if (! type) {
|
||||
+ PyErr_Clear();
|
||||
+ g_array_free(array, FALSE);
|
||||
+ Py_DECREF(item);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ g_value_init(&item_value, type);
|
||||
+ status = pyg_value_from_pyobject(&item_value, item);
|
||||
+ Py_DECREF(item);
|
||||
+
|
||||
+ if (status == -1) {
|
||||
+ g_array_free(array, FALSE);
|
||||
+ g_value_unset(&item_value);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ g_array_append_val(array, item_value);
|
||||
+ }
|
||||
+
|
||||
+ g_value_take_boxed(value, array);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static
|
||||
PyObject *
|
||||
pyg_get_gvariant_type()
|
||||
@@ -979,6 +1036,9 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
|
||||
else if (PySequence_Check(obj) &&
|
||||
G_VALUE_HOLDS(value, G_TYPE_VALUE_ARRAY))
|
||||
return pyg_value_array_from_pyobject(value, obj, NULL);
|
||||
+ else if (PySequence_Check(obj) &&
|
||||
+ G_VALUE_HOLDS(value, G_TYPE_ARRAY))
|
||||
+ return pyg_array_from_pyobject(value, obj);
|
||||
else if (PYGLIB_PyUnicode_Check(obj) &&
|
||||
G_VALUE_HOLDS(value, G_TYPE_GSTRING)) {
|
||||
GString *string;
|
||||
--
|
||||
1.8.0.2
|
||||
|
74
gdk-atom-1.patch
Normal file
74
gdk-atom-1.patch
Normal file
@ -0,0 +1,74 @@
|
||||
From c69fca1cd401bb6c9cf360076dc3027979a18cd9 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Pitt <martinpitt@gnome.org>
|
||||
Date: Tue, 13 Nov 2012 12:56:11 +0100
|
||||
Subject: [PATCH 1/3] Fix Gdk.Atom to have a proper str() and repr()
|
||||
|
||||
Gdk.Atom is not proper GType'd class, so we cannot override the whole class.
|
||||
Just override its __str__() and __repr__() methods so that printing atoms shows
|
||||
something sensible. For nameless/invalid atoms, fall back to the old
|
||||
<void at 0xdeadbeef> output to help with debugging.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=678620
|
||||
---
|
||||
gi/overrides/Gdk.py | 21 +++++++++++++++++++++
|
||||
tests/test_atoms.py | 12 ++++++++++++
|
||||
2 files changed, 33 insertions(+)
|
||||
|
||||
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
|
||||
index 20ef910..0571c40 100644
|
||||
--- a/gi/overrides/Gdk.py
|
||||
+++ b/gi/overrides/Gdk.py
|
||||
@@ -345,6 +345,27 @@ def color_parse(color):
|
||||
return None
|
||||
return color
|
||||
|
||||
+
|
||||
+# Note, we cannot override the entire class as Gdk.Atom has no gtype, so just
|
||||
+# hack some individual methods
|
||||
+def _gdk_atom_str(atom):
|
||||
+ n = atom.name()
|
||||
+ if n:
|
||||
+ return n
|
||||
+ return Gdk.Atom.__str__(n)
|
||||
+
|
||||
+
|
||||
+def _gdk_atom_repr(atom):
|
||||
+ n = atom.name()
|
||||
+ if n:
|
||||
+ return 'Gdk.Atom<%s>' % n
|
||||
+ return Gdk.Atom.__str__(n)
|
||||
+
|
||||
+
|
||||
+Gdk.Atom.__str__ = _gdk_atom_str
|
||||
+Gdk.Atom.__repr__ = _gdk_atom_repr
|
||||
+
|
||||
+
|
||||
# constants
|
||||
if Gdk._version >= '3.0':
|
||||
SELECTION_PRIMARY = Gdk.atom_intern('PRIMARY', True)
|
||||
diff --git a/tests/test_atoms.py b/tests/test_atoms.py
|
||||
index a59d15a..449fcda 100644
|
||||
--- a/tests/test_atoms.py
|
||||
+++ b/tests/test_atoms.py
|
||||
@@ -13,6 +13,18 @@ class TestGdkAtom(unittest.TestCase):
|
||||
atom = Gdk.Atom.intern('my_string', False)
|
||||
self.assertEqual(atom.name(), 'my_string')
|
||||
|
||||
+ def test_str(self):
|
||||
+ atom = Gdk.Atom.intern('my_string', False)
|
||||
+ self.assertEqual(str(atom), 'my_string')
|
||||
+
|
||||
+ self.assertEqual(str(Gdk.SELECTION_CLIPBOARD), 'CLIPBOARD')
|
||||
+
|
||||
+ def test_repr(self):
|
||||
+ atom = Gdk.Atom.intern('my_string', False)
|
||||
+ self.assertEqual(repr(atom), 'Gdk.Atom<my_string>')
|
||||
+
|
||||
+ self.assertEqual(repr(Gdk.SELECTION_CLIPBOARD), 'Gdk.Atom<CLIPBOARD>')
|
||||
+
|
||||
def test_in_single(self):
|
||||
a_selection = Gdk.Atom.intern('test_clipboard', False)
|
||||
clipboard = Gtk.Clipboard.get(a_selection)
|
||||
--
|
||||
1.7.11.7
|
||||
|
38
gdk-atom-2.patch
Normal file
38
gdk-atom-2.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 0e7aec1bc5555b05b67da63176312eb51460b9ee Mon Sep 17 00:00:00 2001
|
||||
From: Martin Pitt <martinpitt@gnome.org>
|
||||
Date: Tue, 13 Nov 2012 16:38:36 +0100
|
||||
Subject: [PATCH 2/3] Fix Gdk.Atom str()/repr() fallback
|
||||
|
||||
Fix regression in commit 6713618: If an atom does not have a name, do not
|
||||
recursively call our own str()/repr() methods, but just print
|
||||
"Gdk.Atom<atom_id>".
|
||||
---
|
||||
gi/overrides/Gdk.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
|
||||
index 0571c40..63f1467 100644
|
||||
--- a/gi/overrides/Gdk.py
|
||||
+++ b/gi/overrides/Gdk.py
|
||||
@@ -352,14 +352,16 @@ def _gdk_atom_str(atom):
|
||||
n = atom.name()
|
||||
if n:
|
||||
return n
|
||||
- return Gdk.Atom.__str__(n)
|
||||
+ # fall back to atom index
|
||||
+ return 'Gdk.Atom<%i>' % hash(atom)
|
||||
|
||||
|
||||
def _gdk_atom_repr(atom):
|
||||
n = atom.name()
|
||||
if n:
|
||||
return 'Gdk.Atom<%s>' % n
|
||||
- return Gdk.Atom.__str__(n)
|
||||
+ # fall back to atom index
|
||||
+ return 'Gdk.Atom<%i>' % hash(atom)
|
||||
|
||||
|
||||
Gdk.Atom.__str__ = _gdk_atom_str
|
||||
--
|
||||
1.7.11.7
|
||||
|
22
ignore-more-pep8-errors.patch
Normal file
22
ignore-more-pep8-errors.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- pygobject-3.4.1/tests/Makefile.in.ignore-more-pep8-errors 2012-10-15 07:54:06.000000000 +0200
|
||||
+++ pygobject-3.4.1/tests/Makefile.in 2012-10-17 18:20:43.199988314 +0200
|
||||
@@ -745,7 +745,7 @@
|
||||
@echo " CHECK Pyflakes"
|
||||
@if type pyflakes >/dev/null 2>&1; then pyflakes $(top_srcdir); else echo "skipped, pyflakes not installed"; fi
|
||||
@echo " CHECK PEP8"
|
||||
- @if type pep8 >/dev/null 2>&1; then pep8 --ignore=E501,E123,E124 --repeat --show-source $(top_srcdir); else echo "skipped, pep8 not installed"; fi
|
||||
+ @if type pep8 >/dev/null 2>&1; then pep8 --ignore=E501,E123,E124,E127 --repeat --show-source $(top_srcdir); else echo "skipped, pep8 not installed"; fi
|
||||
export `$(DBUS_LAUNCH)` && \
|
||||
$(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning $(srcdir)/runtests.py; rc=$$?; \
|
||||
kill $$DBUS_SESSION_BUS_PID; \
|
||||
--- pygobject-3.4.1/tests/Makefile.am.ignore-more-pep8-errors 2012-10-15 07:39:55.000000000 +0200
|
||||
+++ pygobject-3.4.1/tests/Makefile.am 2012-10-17 18:20:43.199988314 +0200
|
||||
@@ -127,7 +127,7 @@
|
||||
@echo " CHECK Pyflakes"
|
||||
@if type pyflakes >/dev/null 2>&1; then pyflakes $(top_srcdir); else echo "skipped, pyflakes not installed"; fi
|
||||
@echo " CHECK PEP8"
|
||||
- @if type pep8 >/dev/null 2>&1; then pep8 --ignore=E501,E123,E124 --repeat --show-source $(top_srcdir); else echo "skipped, pep8 not installed"; fi
|
||||
+ @if type pep8 >/dev/null 2>&1; then pep8 --ignore=E501,E123,E124,E127 --repeat --show-source $(top_srcdir); else echo "skipped, pep8 not installed"; fi
|
||||
export `$(DBUS_LAUNCH)` && \
|
||||
$(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning $(srcdir)/runtests.py; rc=$$?; \
|
||||
kill $$DBUS_SESSION_BUS_PID; \
|
497
property-lookup.patch
Normal file
497
property-lookup.patch
Normal file
@ -0,0 +1,497 @@
|
||||
From 901c1b6e3722a9cd999e4948297e2c460f101d20 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Drake <dsd@laptop.org>
|
||||
Date: Thu, 01 Nov 2012 14:46:22 +0000
|
||||
Subject: Fix property lookup in class hierarchy
|
||||
|
||||
Commit 4bfe7972546413f46f5c36737ff03bb5612c1921 introduced a bug where
|
||||
a Python subclass of a gi-provided base class overrides a property from the
|
||||
base class.
|
||||
|
||||
The new behaviour in the above commit causes pygobject to seek the property
|
||||
in the base class and try to read it from there (resulting in confusion)
|
||||
rather than noticing that the property is overridden and present in the
|
||||
Python object instance.
|
||||
|
||||
To provide a nicer solution here, we can exploit the fact that
|
||||
g_object_class_find_property() will traverse the hierarchy in order to
|
||||
find the right GParamSpec, and the returned GParamSpec can tell us exactly
|
||||
which GType introduces the property. The strategy is:
|
||||
|
||||
1. Find pspec with g_object_class_find_property()
|
||||
2. Find the class that owns that property (pspec->owner_type)
|
||||
3. See if girepository owns that class.
|
||||
3a. If yes, get property from there.
|
||||
3b. If not, get property "directly"
|
||||
|
||||
And the same for property setting.
|
||||
|
||||
Now that _pygi_lookup_property_from_g_type is always passed the type that
|
||||
implements the property, it no longer has to go recursing through parent
|
||||
classes, which was the original cause of confusion.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=686942
|
||||
---
|
||||
diff --git a/gi/_gobject/pygobject.c b/gi/_gobject/pygobject.c
|
||||
index 6dfffef..23a4284 100644
|
||||
--- a/gi/_gobject/pygobject.c
|
||||
+++ b/gi/_gobject/pygobject.c
|
||||
@@ -51,6 +51,25 @@ GQuark pygobject_wrapper_key;
|
||||
GQuark pygobject_has_updated_constructor_key;
|
||||
GQuark pygobject_instance_data_key;
|
||||
|
||||
+/* Copied from glib. gobject uses hyphens in property names, but in Python
|
||||
+ * we can only represent hyphens as underscores. Convert underscores to
|
||||
+ * hyphens for glib compatibility. */
|
||||
+static void
|
||||
+canonicalize_key (gchar *key)
|
||||
+{
|
||||
+ gchar *p;
|
||||
+
|
||||
+ for (p = key; *p != 0; p++)
|
||||
+ {
|
||||
+ gchar c = *p;
|
||||
+
|
||||
+ if (c != '-' &&
|
||||
+ (c < '0' || c > '9') &&
|
||||
+ (c < 'A' || c > 'Z') &&
|
||||
+ (c < 'a' || c > 'z'))
|
||||
+ *p = '-';
|
||||
+ }
|
||||
+}
|
||||
|
||||
/* -------------- class <-> wrapper manipulation --------------- */
|
||||
|
||||
@@ -237,7 +256,7 @@ build_parameter_list(GObjectClass *class)
|
||||
static PyObject*
|
||||
PyGProps_getattro(PyGProps *self, PyObject *attr)
|
||||
{
|
||||
- char *attr_name;
|
||||
+ char *attr_name, *property_name;
|
||||
GObjectClass *class;
|
||||
GParamSpec *pspec;
|
||||
GValue value = { 0, };
|
||||
@@ -257,15 +276,13 @@ PyGProps_getattro(PyGProps *self, PyObject *attr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
- if (self->pygobject != NULL) {
|
||||
- ret = pygi_get_property_value (self->pygobject, attr_name);
|
||||
- if (ret != NULL) {
|
||||
- g_type_class_unref(class);
|
||||
- return ret;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- pspec = g_object_class_find_property(class, attr_name);
|
||||
+ /* g_object_class_find_property recurses through the class hierarchy,
|
||||
+ * so the resulting pspec tells us the owner_type that owns the property
|
||||
+ * we're dealing with. */
|
||||
+ property_name = g_strdup(attr_name);
|
||||
+ canonicalize_key(property_name);
|
||||
+ pspec = g_object_class_find_property(class, property_name);
|
||||
+ g_free(property_name);
|
||||
g_type_class_unref(class);
|
||||
|
||||
if (!pspec) {
|
||||
@@ -278,14 +295,23 @@ PyGProps_getattro(PyGProps *self, PyObject *attr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- /* If we're doing it without an instance, return a GParamSpec */
|
||||
if (!self->pygobject) {
|
||||
+ /* If we're doing it without an instance, return a GParamSpec */
|
||||
return pyg_param_spec_new(pspec);
|
||||
}
|
||||
+
|
||||
+ /* See if the property's class is from the gi repository. If so,
|
||||
+ * use gi to correctly read the property value. */
|
||||
+ ret = pygi_get_property_value (self->pygobject, pspec);
|
||||
+ if (ret != NULL) {
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
+ /* If we reach here, it must be a property defined outside of gi.
|
||||
+ * Just do a straightforward read. */
|
||||
g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
|
||||
pyg_begin_allow_threads;
|
||||
- g_object_get_property(self->pygobject->obj, attr_name, &value);
|
||||
+ g_object_get_property(self->pygobject->obj, pspec->name, &value);
|
||||
pyg_end_allow_threads;
|
||||
ret = pyg_param_gvalue_as_pyobject(&value, TRUE, pspec);
|
||||
g_value_unset(&value);
|
||||
@@ -295,7 +321,6 @@ PyGProps_getattro(PyGProps *self, PyObject *attr)
|
||||
|
||||
static gboolean
|
||||
set_property_from_pspec(GObject *obj,
|
||||
- char *attr_name,
|
||||
GParamSpec *pspec,
|
||||
PyObject *pvalue)
|
||||
{
|
||||
@@ -304,13 +329,13 @@ set_property_from_pspec(GObject *obj,
|
||||
if (pspec->flags & G_PARAM_CONSTRUCT_ONLY) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"property '%s' can only be set in constructor",
|
||||
- attr_name);
|
||||
+ pspec->name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!(pspec->flags & G_PARAM_WRITABLE)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
- "property '%s' is not writable", attr_name);
|
||||
+ "property '%s' is not writable", pspec->name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -322,7 +347,7 @@ set_property_from_pspec(GObject *obj,
|
||||
}
|
||||
|
||||
pyg_begin_allow_threads;
|
||||
- g_object_set_property(obj, attr_name, &value);
|
||||
+ g_object_set_property(obj, pspec->name, &value);
|
||||
pyg_end_allow_threads;
|
||||
|
||||
g_value_unset(&value);
|
||||
@@ -336,7 +361,7 @@ static int
|
||||
PyGProps_setattro(PyGProps *self, PyObject *attr, PyObject *pvalue)
|
||||
{
|
||||
GParamSpec *pspec;
|
||||
- char *attr_name;
|
||||
+ char *attr_name, *property_name;
|
||||
GObject *obj;
|
||||
int ret = -1;
|
||||
|
||||
@@ -358,20 +383,33 @@ PyGProps_setattro(PyGProps *self, PyObject *attr, PyObject *pvalue)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- ret = pygi_set_property_value (self->pygobject, attr_name, pvalue);
|
||||
+ obj = self->pygobject->obj;
|
||||
+
|
||||
+ property_name = g_strdup(attr_name);
|
||||
+ canonicalize_key(property_name);
|
||||
+
|
||||
+ /* g_object_class_find_property recurses through the class hierarchy,
|
||||
+ * so the resulting pspec tells us the owner_type that owns the property
|
||||
+ * we're dealing with. */
|
||||
+ pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(obj),
|
||||
+ property_name);
|
||||
+ g_free(property_name);
|
||||
+ if (!pspec) {
|
||||
+ return PyObject_GenericSetAttr((PyObject *)self, attr, pvalue);
|
||||
+ }
|
||||
+
|
||||
+ /* See if the property's class is from the gi repository. If so,
|
||||
+ * use gi to correctly read the property value. */
|
||||
+ ret = pygi_set_property_value (self->pygobject, pspec, pvalue);
|
||||
if (ret == 0)
|
||||
return 0;
|
||||
else if (ret == -1)
|
||||
if (PyErr_Occurred())
|
||||
return -1;
|
||||
|
||||
- obj = self->pygobject->obj;
|
||||
- pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(obj), attr_name);
|
||||
- if (!pspec) {
|
||||
- return PyObject_GenericSetAttr((PyObject *)self, attr, pvalue);
|
||||
- }
|
||||
-
|
||||
- if (!set_property_from_pspec(obj, attr_name, pspec, pvalue))
|
||||
+ /* If we reach here, it must be a property defined outside of gi.
|
||||
+ * Just do a straightforward set. */
|
||||
+ if (!set_property_from_pspec(obj, pspec, pvalue))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
@@ -1458,7 +1496,7 @@ pygobject_set_property(PyGObject *self, PyObject *args)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if (!set_property_from_pspec(self->obj, param_name, pspec, pvalue))
|
||||
+ if (!set_property_from_pspec(self->obj, pspec, pvalue))
|
||||
return NULL;
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
@@ -1496,7 +1534,7 @@ pygobject_set_properties(PyGObject *self, PyObject *args, PyObject *kwargs)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
- if (!set_property_from_pspec(G_OBJECT(self->obj), key_str, pspec, value))
|
||||
+ if (!set_property_from_pspec(G_OBJECT(self->obj), pspec, value))
|
||||
goto exit;
|
||||
}
|
||||
|
||||
diff --git a/gi/pygi-property.c b/gi/pygi-property.c
|
||||
index 14564d0..4f09e70 100644
|
||||
--- a/gi/pygi-property.c
|
||||
+++ b/gi/pygi-property.c
|
||||
@@ -25,92 +25,95 @@
|
||||
|
||||
#include <girepository.h>
|
||||
|
||||
-/* Copied from glib */
|
||||
-static void
|
||||
-canonicalize_key (gchar *key)
|
||||
+static GIPropertyInfo *
|
||||
+lookup_property_from_object_info (GIObjectInfo *info, const gchar *attr_name)
|
||||
{
|
||||
- gchar *p;
|
||||
+ gssize n_infos;
|
||||
+ gssize i;
|
||||
|
||||
- for (p = key; *p != 0; p++)
|
||||
- {
|
||||
- gchar c = *p;
|
||||
+ n_infos = g_object_info_get_n_properties (info);
|
||||
+ for (i = 0; i < n_infos; i++) {
|
||||
+ GIPropertyInfo *property_info;
|
||||
|
||||
- if (c != '-' &&
|
||||
- (c < '0' || c > '9') &&
|
||||
- (c < 'A' || c > 'Z') &&
|
||||
- (c < 'a' || c > 'z'))
|
||||
- *p = '-';
|
||||
+ property_info = g_object_info_get_property (info, i);
|
||||
+ g_assert (info != NULL);
|
||||
+
|
||||
+ if (strcmp (attr_name, g_base_info_get_name (property_info)) == 0) {
|
||||
+ return property_info;
|
||||
+ }
|
||||
+
|
||||
+ g_base_info_unref (property_info);
|
||||
}
|
||||
+
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
static GIPropertyInfo *
|
||||
-_pygi_lookup_property_from_g_type (GType g_type, const gchar *attr_name)
|
||||
+lookup_property_from_interface_info (GIInterfaceInfo *info,
|
||||
+ const gchar *attr_name)
|
||||
{
|
||||
- GIRepository *repository;
|
||||
- GIBaseInfo *info;
|
||||
gssize n_infos;
|
||||
gssize i;
|
||||
- GType parent;
|
||||
|
||||
- repository = g_irepository_get_default();
|
||||
- info = g_irepository_find_by_gtype (repository, g_type);
|
||||
- if (info != NULL) {
|
||||
+ n_infos = g_interface_info_get_n_properties (info);
|
||||
+ for (i = 0; i < n_infos; i++) {
|
||||
+ GIPropertyInfo *property_info;
|
||||
|
||||
- n_infos = g_object_info_get_n_properties ( (GIObjectInfo *) info);
|
||||
- for (i = 0; i < n_infos; i++) {
|
||||
- GIPropertyInfo *property_info;
|
||||
+ property_info = g_interface_info_get_property (info, i);
|
||||
+ g_assert (info != NULL);
|
||||
|
||||
- property_info = g_object_info_get_property ( (GIObjectInfo *) info,
|
||||
- i);
|
||||
- g_assert (info != NULL);
|
||||
-
|
||||
- if (strcmp (attr_name, g_base_info_get_name (property_info)) == 0) {
|
||||
- g_base_info_unref (info);
|
||||
- return property_info;
|
||||
- }
|
||||
-
|
||||
- g_base_info_unref (property_info);
|
||||
+ if (strcmp (attr_name, g_base_info_get_name (property_info)) == 0) {
|
||||
+ return property_info;
|
||||
}
|
||||
|
||||
- g_base_info_unref (info);
|
||||
+ g_base_info_unref (property_info);
|
||||
}
|
||||
|
||||
- parent = g_type_parent (g_type);
|
||||
- if (parent > 0)
|
||||
- return _pygi_lookup_property_from_g_type (parent, attr_name);
|
||||
-
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+static GIPropertyInfo *
|
||||
+_pygi_lookup_property_from_g_type (GType g_type, const gchar *attr_name)
|
||||
+{
|
||||
+ GIPropertyInfo *ret = NULL;
|
||||
+ GIRepository *repository;
|
||||
+ GIBaseInfo *info;
|
||||
+
|
||||
+ repository = g_irepository_get_default();
|
||||
+ info = g_irepository_find_by_gtype (repository, g_type);
|
||||
+ if (info == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (GI_IS_OBJECT_INFO (info))
|
||||
+ ret = lookup_property_from_object_info ((GIObjectInfo *) info,
|
||||
+ attr_name);
|
||||
+ else if (GI_IS_INTERFACE_INFO (info))
|
||||
+ ret = lookup_property_from_interface_info ((GIInterfaceInfo *) info,
|
||||
+ attr_name);
|
||||
+
|
||||
+ g_base_info_unref (info);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
PyObject *
|
||||
-pygi_get_property_value_real (PyGObject *instance,
|
||||
- const gchar *attr_name)
|
||||
+pygi_get_property_value_real (PyGObject *instance, GParamSpec *pspec)
|
||||
{
|
||||
- GType g_type;
|
||||
GIPropertyInfo *property_info = NULL;
|
||||
- char *property_name = g_strdup (attr_name);
|
||||
- GParamSpec *pspec = NULL;
|
||||
GValue value = { 0, };
|
||||
GIArgument arg = { 0, };
|
||||
PyObject *py_value = NULL;
|
||||
GITypeInfo *type_info = NULL;
|
||||
GITransfer transfer;
|
||||
|
||||
- canonicalize_key (property_name);
|
||||
-
|
||||
- g_type = pyg_type_from_object ((PyObject *)instance);
|
||||
- property_info = _pygi_lookup_property_from_g_type (g_type, property_name);
|
||||
+ /* The owner_type of the pspec gives us the exact type that introduced the
|
||||
+ * property, even if it is a parent class of the instance in question. */
|
||||
+ property_info = _pygi_lookup_property_from_g_type (pspec->owner_type, pspec->name);
|
||||
|
||||
if (property_info == NULL)
|
||||
goto out;
|
||||
|
||||
- pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (instance->obj),
|
||||
- attr_name);
|
||||
- if (pspec == NULL)
|
||||
- goto out;
|
||||
-
|
||||
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||
- g_object_get_property (instance->obj, attr_name, &value);
|
||||
+ g_object_get_property (instance->obj, pspec->name, &value);
|
||||
|
||||
type_info = g_property_info_get_type (property_info);
|
||||
transfer = g_property_info_get_ownership_transfer (property_info);
|
||||
@@ -243,7 +246,6 @@ pygi_get_property_value_real (PyGObject *instance,
|
||||
py_value = _pygi_argument_to_object (&arg, type_info, transfer);
|
||||
|
||||
out:
|
||||
- g_free (property_name);
|
||||
if (property_info != NULL)
|
||||
g_base_info_unref (property_info);
|
||||
if (type_info != NULL)
|
||||
@@ -254,33 +256,24 @@ out:
|
||||
|
||||
gint
|
||||
pygi_set_property_value_real (PyGObject *instance,
|
||||
- const gchar *attr_name,
|
||||
+ GParamSpec *pspec,
|
||||
PyObject *py_value)
|
||||
{
|
||||
- GType g_type;
|
||||
GIPropertyInfo *property_info = NULL;
|
||||
- char *property_name = g_strdup (attr_name);
|
||||
GITypeInfo *type_info = NULL;
|
||||
GITypeTag type_tag;
|
||||
GITransfer transfer;
|
||||
GValue value = { 0, };
|
||||
GIArgument arg = { 0, };
|
||||
- GParamSpec *pspec = NULL;
|
||||
gint ret_value = -1;
|
||||
|
||||
- canonicalize_key (property_name);
|
||||
-
|
||||
- g_type = pyg_type_from_object ((PyObject *)instance);
|
||||
- property_info = _pygi_lookup_property_from_g_type (g_type, property_name);
|
||||
-
|
||||
+ /* The owner_type of the pspec gives us the exact type that introduced the
|
||||
+ * property, even if it is a parent class of the instance in question. */
|
||||
+ property_info = _pygi_lookup_property_from_g_type (pspec->owner_type,
|
||||
+ pspec->name);
|
||||
if (property_info == NULL)
|
||||
goto out;
|
||||
|
||||
- pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (instance->obj),
|
||||
- attr_name);
|
||||
- if (pspec == NULL)
|
||||
- goto out;
|
||||
-
|
||||
if (! (pspec->flags & G_PARAM_WRITABLE))
|
||||
goto out;
|
||||
|
||||
@@ -413,12 +406,11 @@ pygi_set_property_value_real (PyGObject *instance,
|
||||
goto out;
|
||||
}
|
||||
|
||||
- g_object_set_property (instance->obj, attr_name, &value);
|
||||
+ g_object_set_property (instance->obj, pspec->name, &value);
|
||||
|
||||
ret_value = 0;
|
||||
|
||||
out:
|
||||
- g_free (property_name);
|
||||
if (property_info != NULL)
|
||||
g_base_info_unref (property_info);
|
||||
if (type_info != NULL)
|
||||
diff --git a/gi/pygi-property.h b/gi/pygi-property.h
|
||||
index 31d0e42..875d21e 100644
|
||||
--- a/gi/pygi-property.h
|
||||
+++ b/gi/pygi-property.h
|
||||
@@ -30,10 +30,10 @@
|
||||
#include "pygi.h"
|
||||
|
||||
PyObject *pygi_get_property_value_real (PyGObject *instance,
|
||||
- const gchar *attr_name);
|
||||
+ GParamSpec *pspec);
|
||||
|
||||
gint pygi_set_property_value_real (PyGObject *instance,
|
||||
- const gchar *attr_name,
|
||||
+ GParamSpec *pspec,
|
||||
PyObject *py_value);
|
||||
|
||||
#endif /* __PYGI_PROPERTY_H__ */
|
||||
diff --git a/gi/pygi.h b/gi/pygi.h
|
||||
index 121eae5..86da07f 100644
|
||||
--- a/gi/pygi.h
|
||||
+++ b/gi/pygi.h
|
||||
@@ -77,9 +77,9 @@ typedef PyObject * (*PyGIArgOverrideReleaseFunc) (GITypeInfo *type_info,
|
||||
struct PyGI_API {
|
||||
PyObject* (*type_import_by_g_type) (GType g_type);
|
||||
PyObject* (*get_property_value) (PyGObject *instance,
|
||||
- const gchar *attr_name);
|
||||
+ GParamSpec *pspec);
|
||||
gint (*set_property_value) (PyGObject *instance,
|
||||
- const gchar *attr_name,
|
||||
+ GParamSpec *pspec,
|
||||
PyObject *value);
|
||||
GClosure * (*signal_closure_new) (PyGObject *instance,
|
||||
const gchar *sig_name,
|
||||
@@ -124,23 +124,23 @@ pygi_type_import_by_g_type (GType g_type)
|
||||
|
||||
static inline PyObject *
|
||||
pygi_get_property_value (PyGObject *instance,
|
||||
- const gchar *attr_name)
|
||||
+ GParamSpec *pspec)
|
||||
{
|
||||
if (_pygi_import() < 0) {
|
||||
return NULL;
|
||||
}
|
||||
- return PyGI_API->get_property_value(instance, attr_name);
|
||||
+ return PyGI_API->get_property_value(instance, pspec);
|
||||
}
|
||||
|
||||
static inline gint
|
||||
pygi_set_property_value (PyGObject *instance,
|
||||
- const gchar *attr_name,
|
||||
+ GParamSpec *pspec,
|
||||
PyObject *value)
|
||||
{
|
||||
if (_pygi_import() < 0) {
|
||||
return -1;
|
||||
}
|
||||
- return PyGI_API->set_property_value(instance, attr_name, value);
|
||||
+ return PyGI_API->set_property_value(instance, pspec, value);
|
||||
}
|
||||
|
||||
static inline GClosure *
|
22
pygobject-3.3.4-known-failures.patch
Normal file
22
pygobject-3.3.4-known-failures.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -up pygobject-3.3.4/tests/test_gdbus.py.known-failures pygobject-3.3.4/tests/test_gdbus.py
|
||||
--- pygobject-3.3.4/tests/test_gdbus.py.known-failures 2012-08-09 11:51:21.707712400 -0400
|
||||
+++ pygobject-3.3.4/tests/test_gdbus.py 2012-08-09 11:51:38.663713384 -0400
|
||||
@@ -100,6 +100,7 @@ class TestGDBusClient(unittest.TestCase)
|
||||
call_done, data)
|
||||
main_loop.run()
|
||||
|
||||
+ @unittest.expectedFailure
|
||||
def test_python_calls_sync(self):
|
||||
# single value return tuples get unboxed to the one element
|
||||
result = self.dbus_proxy.ListNames('()')
|
||||
diff -up pygobject-3.3.4/tests/test_gi.py.known-failures pygobject-3.3.4/tests/test_gi.py
|
||||
--- pygobject-3.3.4/tests/test_gi.py.known-failures 2012-07-16 11:24:56.000000000 -0400
|
||||
+++ pygobject-3.3.4/tests/test_gi.py 2012-08-09 11:51:10.409711484 -0400
|
||||
@@ -2199,6 +2199,7 @@ class TestPropertiesObject(unittest.Test
|
||||
|
||||
self.assertAlmostEqual(obj.props.some_double, 42.0)
|
||||
|
||||
+ @unittest.expectedFailure
|
||||
def test_strv(self):
|
||||
self.assertEqual(self.obj.props.some_strv, [])
|
||||
self.obj.props.some_strv = ['hello', 'world']
|
583
pygobject3.spec
583
pygobject3.spec
@ -1,124 +1,180 @@
|
||||
# Last updated for version 3.27.5
|
||||
%define glib2_version 2.38.0
|
||||
%define gobject_introspection_version 1.46.0
|
||||
%define pycairo_version 1.11.1
|
||||
%define python2_version 2.7
|
||||
# Last updated for version 3.4.1.1
|
||||
%define glib2_version 2.31.0
|
||||
%define gobject_introspection_version 1.34.1.1
|
||||
%define python2_version 2.3.5
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
%if 0%{?fedora} > 12
|
||||
%global with_python3 1
|
||||
%define python3_version 3.4
|
||||
%define python3_version 3.1
|
||||
%endif
|
||||
|
||||
%global with_check 0
|
||||
%if 1
|
||||
# Verbose build
|
||||
%global verbosity V=1
|
||||
%else
|
||||
# Quiet build
|
||||
%global verbosity %{nil}
|
||||
%endif
|
||||
|
||||
Name: pygobject3
|
||||
Version: 3.28.3
|
||||
Release: 3%{?dist}
|
||||
Summary: Python bindings for GObject Introspection
|
||||
%global with_check 1
|
||||
|
||||
License: LGPLv2+ and MIT
|
||||
URL: https://wiki.gnome.org/Projects/PyGObject
|
||||
Source0: https://download.gnome.org/sources/pygobject/3.28/pygobject-%{version}.tar.xz
|
||||
### Abstract ###
|
||||
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
||||
BuildRequires: python2-devel >= %{python2_version}
|
||||
BuildRequires: python2-cairo-devel >= %{pycairo_version}
|
||||
Name: pygobject3
|
||||
Version: 3.4.2
|
||||
Release: 6%{?dist}
|
||||
License: LGPLv2+ and MIT
|
||||
Group: Development/Languages
|
||||
Summary: Python 2 bindings for GObject Introspection
|
||||
URL: https://live.gnome.org/PyGObject
|
||||
#VCS: git:git://git.gnome.org/pygobject
|
||||
Source: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.4/pygobject-%{version}.tar.xz
|
||||
|
||||
# Add these additional exclusions to the pep8 rules in "make check":
|
||||
# E127 continuation line over-indented for visual indent
|
||||
# Not yet sent upstream
|
||||
Patch1: ignore-more-pep8-errors.patch
|
||||
|
||||
# Mark some tests as known to fail; currently:
|
||||
#
|
||||
# On i686:
|
||||
# ======================================================================
|
||||
# FAIL: test_strv (test_gi.TestPropertiesObject)
|
||||
# ----------------------------------------------------------------------
|
||||
# Traceback (most recent call last):
|
||||
# File "/builddir/build/BUILD/pygobject-3.3.4/tests/test_gi.py", line 2205, in test_strv
|
||||
# self.assertEqual(self.obj.props.some_strv, ['hello', 'world'])
|
||||
# AssertionError: Lists differ: ['hello'] != ['hello', 'world']
|
||||
# Second list contains 1 additional elements.
|
||||
# First extra element 1:
|
||||
# world
|
||||
# - ['hello']
|
||||
# + ['hello', 'world']
|
||||
# ----------------------------------------------------------------------
|
||||
#
|
||||
# Intermittently:
|
||||
# ======================================================================
|
||||
# FAIL: test_python_calls_sync (test_gdbus.TestGDBusClient)
|
||||
# ----------------------------------------------------------------------
|
||||
# Traceback (most recent call last):
|
||||
# File "/builddir/build/BUILD/pygobject-3.3.4/tests/test_gdbus.py", line 140, in test_python_calls_sync
|
||||
# self.assertTrue('Timeout' in str(e), str(e))
|
||||
# AssertionError: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name '1': no such name
|
||||
# ----------------------------------------------------------------------
|
||||
#
|
||||
# Not yet sent upstream
|
||||
Patch2: pygobject-3.3.4-known-failures.patch
|
||||
|
||||
# Add regression test for rhbz#842880
|
||||
# Not yet sent upstream:
|
||||
Patch3: test-list-marshalling.patch
|
||||
|
||||
# upstream fix for property type lookup, needed for basic Sugar operation
|
||||
Patch4: property-lookup.patch
|
||||
|
||||
# upstream fixes for Gdk.Atom
|
||||
Patch5: gdk-atom-1.patch
|
||||
Patch6: gdk-atom-2.patch
|
||||
|
||||
# upstream fix for arrays of struct pointers
|
||||
Patch7: struct-pointers.patch
|
||||
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=690514
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=872851
|
||||
# rhythmbox crash
|
||||
Patch8: fix-rhythmbox.patch
|
||||
|
||||
# upstream fix for array of boxed struct values
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=656312
|
||||
Patch9: structarray.patch
|
||||
|
||||
### Build Dependencies ###
|
||||
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
||||
BuildRequires: python2-devel >= %{python2_version}
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel >= %{python3_version}
|
||||
BuildRequires: python3-cairo-devel >= %{pycairo_version}
|
||||
BuildRequires: python3-devel >= %{python3_version}
|
||||
BuildRequires: python3-cairo-devel
|
||||
%endif # if with_python3
|
||||
|
||||
BuildRequires: cairo-gobject-devel
|
||||
BuildRequires: cairo-gobject-devel
|
||||
BuildRequires: pycairo-devel
|
||||
|
||||
# Required by the upstream selftest suite:
|
||||
%if %{with_check}
|
||||
%if 0%{?with_python3}
|
||||
# Temporarily disabled pyflakes tests to avoid the build failing due to too new
|
||||
# pyflakes 0.7.2 in F19
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=701009
|
||||
#BuildRequires: python2-pyflakes
|
||||
BuildRequires: python2-pep8
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: pyflakes
|
||||
BuildRequires: python-pep8
|
||||
%endif
|
||||
## for the Gdk and Gtk typelibs, used during the test suite:
|
||||
BuildRequires: gtk3
|
||||
BuildRequires: gtk3
|
||||
## for xvfb-run:
|
||||
BuildRequires: xorg-x11-server-Xvfb
|
||||
BuildRequires: dejavu-sans-fonts
|
||||
BuildRequires: dejavu-sans-mono-fonts
|
||||
BuildRequires: dejavu-serif-fonts
|
||||
BuildRequires: xorg-x11-server-Xvfb
|
||||
BuildRequires: dejavu-sans-fonts
|
||||
BuildRequires: dejavu-sans-mono-fonts
|
||||
BuildRequires: dejavu-serif-fonts
|
||||
## for dbus-launch, used by test_gdbus:
|
||||
BuildRequires: dbus-x11
|
||||
BuildRequires: dbus-x11
|
||||
%endif # with_check
|
||||
|
||||
Requires: %{name}-base = %{version}-%{release}
|
||||
|
||||
# The cairo override module depends on this
|
||||
Requires: pycairo
|
||||
|
||||
%description
|
||||
The %{name} package provides a convenient wrapper for the GObject library
|
||||
for use in Python programs.
|
||||
|
||||
%package -n python2-gobject
|
||||
%{?python_provide:%python_provide python2-gobject}
|
||||
Summary: Python 2 bindings for GObject Introspection
|
||||
Requires: python2-gobject-base%{?_isa} = %{version}-%{release}
|
||||
# The cairo override module depends on this
|
||||
Requires: python2-cairo%{?_isa} >= %{pycairo_version}
|
||||
%package base
|
||||
Summary: Python 2 bindings for GObject Introspection base package
|
||||
Group: Development/Languages
|
||||
Requires: gobject-introspection >= %{gobject_introspection_version}
|
||||
|
||||
Obsoletes: %{name} < 3.17.90-2
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
Provides: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n python2-gobject
|
||||
The python-gobject package provides a convenient wrapper for the GObject
|
||||
library and and other libraries that are compatible with GObject Introspection,
|
||||
for use in Python 2 programs.
|
||||
|
||||
%package -n python2-gobject-base
|
||||
%{?python_provide:%python_provide python2-gobject-base}
|
||||
Summary: Python 2 bindings for GObject Introspection base package
|
||||
Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version}
|
||||
|
||||
Obsoletes: %{name}-base < 3.17.90-2
|
||||
Provides: %{name}-base = %{version}-%{release}
|
||||
Provides: %{name}-base%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n python2-gobject-base
|
||||
%description base
|
||||
This package provides the non-cairo specific bits of the GObject Introspection
|
||||
library.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for embedding PyGObject introspection support
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: glib2-devel
|
||||
Requires: gobject-introspection-devel
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
This package contains files required to embed PyGObject
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-gobject
|
||||
Summary: Python 3 bindings for GObject Introspection
|
||||
Requires: python3-gobject-base%{?_isa} = %{version}-%{release}
|
||||
%package -n python3-gobject
|
||||
Summary: Python 3 bindings for GObject Introspection
|
||||
Group: Development/Languages
|
||||
|
||||
# The cairo override module depends on this
|
||||
Requires: python3-cairo%{?_isa} >= %{pycairo_version}
|
||||
Requires: python3-cairo
|
||||
Requires: gobject-introspection >= %{gobject_introspection_version}
|
||||
|
||||
%description -n python3-gobject
|
||||
The python3-gobject package provides a convenient wrapper for the GObject
|
||||
library and and other libraries that are compatible with GObject Introspection,
|
||||
for use in Python 3 programs.
|
||||
|
||||
%package -n python3-gobject-base
|
||||
Summary: Python 3 bindings for GObject Introspection base package
|
||||
Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version}
|
||||
|
||||
%description -n python3-gobject-base
|
||||
This package provides the non-cairo specific bits of the GObject Introspection
|
||||
library.
|
||||
|
||||
%endif # with_python3
|
||||
|
||||
%package devel
|
||||
Summary: Development files for embedding PyGObject introspection support
|
||||
Requires: python2-gobject%{?_isa} = %{version}-%{release}
|
||||
%if 0%{?with_python3}
|
||||
Requires: python3-gobject%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
Requires: gobject-introspection-devel%{?_isa}
|
||||
|
||||
%description devel
|
||||
This package contains files required to embed PyGObject
|
||||
|
||||
%prep
|
||||
%setup -q -n pygobject-%{version}
|
||||
%patch1 -p1 -b .ignore-more-pep8-errors
|
||||
%patch2 -p1 -b .known-failures
|
||||
%patch3 -p1 -b .test-list-marshalling
|
||||
%patch4 -p1 -b .property-lookup
|
||||
%patch5 -p1 -b .atom1
|
||||
%patch6 -p1 -b .atom2
|
||||
%patch7 -p1 -b .struct-pointers
|
||||
%patch8 -p1 -b .fix-rhythmbox
|
||||
%patch9 -p1 -b .boxed-struct
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
@ -132,29 +188,36 @@ find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
|
||||
PYTHON=%{__python}
|
||||
export PYTHON
|
||||
%configure
|
||||
make %{?_smp_mflags} V=1
|
||||
make %{?_smp_mflags} %{verbosity}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
PYTHON=%{__python3}
|
||||
export PYTHON
|
||||
%configure
|
||||
make %{?_smp_mflags} V=1
|
||||
make %{_smp_mflags} %{verbosity}
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
PYTHON=%{__python3}
|
||||
export PYTHON
|
||||
%make_install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install %{verbosity}
|
||||
popd
|
||||
|
||||
chrpath --delete $RPM_BUILD_ROOT%{python3_sitearch}/gi/{*.so,*/*.so}
|
||||
|
||||
%endif # with_python3
|
||||
|
||||
%make_install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install %{verbosity}
|
||||
find $RPM_BUILD_ROOT -name '*.la' -delete
|
||||
find $RPM_BUILD_ROOT -name '*.a' -delete
|
||||
|
||||
chrpath --delete $RPM_BUILD_ROOT%{python_sitearch}/gi/{*.so,*/*.so}
|
||||
|
||||
# Don't include makefiles in the installed docs, in order to avoid creating
|
||||
# multilib conflicts
|
||||
@ -164,6 +227,7 @@ cp -a examples _docs
|
||||
rm _docs/examples/Makefile*
|
||||
|
||||
%check
|
||||
|
||||
%if %{with_check}
|
||||
# Run the selftests under a temporary xvfb X server (so that they can
|
||||
# initialize Gdk etc):
|
||||
@ -178,341 +242,70 @@ rm _docs/examples/Makefile*
|
||||
pushd %{py3dir}
|
||||
PYTHON=%{__python3}
|
||||
export PYTHON
|
||||
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check V=1
|
||||
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check %{verbosity}
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check V=1
|
||||
xvfb-run make DESTDIR=$RPM_BUILD_ROOT check %{verbosity}
|
||||
|
||||
%endif # with_check
|
||||
|
||||
%files -n python2-gobject
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(644, root, root, 755)
|
||||
%{python_sitearch}/gi/_gi_cairo.so
|
||||
|
||||
%files -n python2-gobject-base
|
||||
%license COPYING
|
||||
%doc NEWS
|
||||
%files base
|
||||
%defattr(644, root, root, 755)
|
||||
%doc AUTHORS NEWS README COPYING
|
||||
%{_libdir}/libpyglib-gi-2.0-python.so*
|
||||
%dir %{python_sitearch}/gi
|
||||
%{python_sitearch}/gi/*
|
||||
%exclude %{python_sitearch}/gi/_gi_cairo.so
|
||||
%{python_sitearch}/pygobject-*.egg-info
|
||||
%{python_sitearch}/pygtkcompat/
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-gobject
|
||||
%{python3_sitearch}/gi/_gi_cairo*.so
|
||||
|
||||
%files -n python3-gobject-base
|
||||
%license COPYING
|
||||
%doc NEWS
|
||||
%dir %{python3_sitearch}/gi
|
||||
%{python3_sitearch}/gi/*
|
||||
%exclude %{python3_sitearch}/gi/_gi_cairo*.so
|
||||
%{python3_sitearch}/pygobject-*.egg-info
|
||||
%{python3_sitearch}/pygtkcompat/
|
||||
%endif # with_python3
|
||||
|
||||
%files devel
|
||||
%defattr(644, root, root, 755)
|
||||
%doc _docs/*
|
||||
%dir %{_includedir}/pygobject-3.0/
|
||||
%{_includedir}/pygobject-3.0/pygobject.h
|
||||
%{_libdir}/pkgconfig/pygobject-3.0.pc
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-gobject
|
||||
%defattr(644, root, root, 755)
|
||||
%doc AUTHORS NEWS README COPYING
|
||||
%{_libdir}/libpyglib-gi-2.0-python3.so*
|
||||
%dir %{python3_sitearch}/gi
|
||||
%{python3_sitearch}/gi/*
|
||||
%{python3_sitearch}/pygobject-*.egg-info
|
||||
|
||||
%endif # with_python3
|
||||
|
||||
%changelog
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.28.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
* Fri Dec 21 2012 Daniel Drake <dsd@laptop.org> 3.4.2-6
|
||||
- Another upstream fix for copy/paste functionality in sugar (gnome#656312)
|
||||
|
||||
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 3.28.3-2
|
||||
- Rebuilt for Python 3.7
|
||||
* Wed Dec 19 2012 Ray Strode <rstrode@redhat.com> 3.4.2-5
|
||||
- Fix rhythmbox crash
|
||||
Resolves: #872851
|
||||
|
||||
* Fri Jun 01 2018 Kalev Lember <klember@redhat.com> - 3.28.3-1
|
||||
- Update to 3.28.3
|
||||
|
||||
* Wed Mar 28 2018 Kalev Lember <klember@redhat.com> - 3.28.2-1
|
||||
- Update to 3.28.2
|
||||
|
||||
* Mon Mar 19 2018 Kalev Lember <klember@redhat.com> - 3.28.1-1
|
||||
- Update to 3.28.1
|
||||
|
||||
* Mon Mar 12 2018 Kalev Lember <klember@redhat.com> - 3.28.0-1
|
||||
- Update to 3.28.0
|
||||
|
||||
* Sat Mar 03 2018 Kalev Lember <klember@redhat.com> - 3.27.5-1
|
||||
- Update to 3.27.5
|
||||
|
||||
* Wed Feb 21 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.27.1-3
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.27.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Wed Dec 20 2017 Kalev Lember <klember@redhat.com> - 3.27.1-1
|
||||
- Update to 3.27.1
|
||||
|
||||
* Wed Nov 01 2017 Kalev Lember <klember@redhat.com> - 3.26.1-1
|
||||
- Update to 3.26.1
|
||||
|
||||
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 3.26.0-2
|
||||
- Cleanup spec file conditionals
|
||||
|
||||
* Thu Sep 14 2017 Kalev Lember <klember@redhat.com> - 3.26.0-1
|
||||
- Update to 3.26.0
|
||||
|
||||
* Thu Sep 14 2017 Kalev Lember <klember@redhat.com> - 3.24.1-5
|
||||
- Rename python-gobject-base to python2-gobject-base as well
|
||||
|
||||
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.24.1-4
|
||||
- Python 2 binary package renamed to python2-pygobject3
|
||||
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.24.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.24.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Tue Apr 11 2017 Kalev Lember <klember@redhat.com> - 3.24.1-1
|
||||
- Update to 3.24.1
|
||||
|
||||
* Tue Mar 21 2017 Kalev Lember <klember@redhat.com> - 3.24.0-1
|
||||
- Update to 3.24.0
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.22.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.22.0-2
|
||||
- Rebuild for Python 3.6
|
||||
|
||||
* Mon Sep 19 2016 Kalev Lember <klember@redhat.com> - 3.22.0-1
|
||||
- Update to 3.22.0
|
||||
|
||||
* Sun Sep 11 2016 Kalev Lember <klember@redhat.com> - 3.21.92-1
|
||||
- Update to 3.21.92
|
||||
|
||||
* Fri Aug 26 2016 Kalev Lember <klember@redhat.com> - 3.21.91-1
|
||||
- Update to 3.21.91
|
||||
|
||||
* Tue Aug 23 2016 Kalev Lember <klember@redhat.com> - 3.21.1-0.1.git395779e
|
||||
- Update to 3.21.1 git snapshot
|
||||
|
||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.21.0-2
|
||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||
|
||||
* Tue May 03 2016 Kalev Lember <klember@redhat.com> - 3.21.0-1
|
||||
- Update to 3.21.0
|
||||
|
||||
* Tue Mar 22 2016 Kalev Lember <klember@redhat.com> - 3.20.0-1
|
||||
- Update to 3.20.0
|
||||
|
||||
* Wed Mar 16 2016 Kalev Lember <klember@redhat.com> - 3.19.92-1
|
||||
- Update to 3.19.92
|
||||
|
||||
* Wed Mar 02 2016 Richard Hughes <rhughes@redhat.com> - 3.19.91-1
|
||||
- Update to 3.19.91
|
||||
|
||||
* Mon Feb 29 2016 Richard Hughes <rhughes@redhat.com> - 3.19.90-1
|
||||
- Update to 3.19.90
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Tue Nov 03 2015 Robert Kuska <rkuska@redhat.com> - 3.19.2-2
|
||||
- Rebuilt for Python3.5 rebuild
|
||||
|
||||
* Sun Nov 01 2015 Kalev Lember <klember@redhat.com> - 3.19.2-1
|
||||
- Update to 3.19.2
|
||||
|
||||
* Sat Oct 24 2015 Kalev Lember <klember@redhat.com> - 3.18.2-1
|
||||
- Update to 3.18.2
|
||||
|
||||
* Sat Oct 24 2015 Kalev Lember <klember@redhat.com> - 3.18.1-1
|
||||
- Update to 3.18.1
|
||||
- Update project URL and Source download location
|
||||
|
||||
* Mon Oct 19 2015 Kalev Lember <klember@redhat.com> - 3.18.0-2
|
||||
- Backport a fix for Gdk.rectangle_intersect/rectangle_union compatibility
|
||||
(#1269901)
|
||||
|
||||
* Tue Sep 22 2015 Kalev Lember <klember@redhat.com> - 3.18.0-1
|
||||
- Update to 3.18.0
|
||||
|
||||
* Sat Aug 22 2015 Kalev Lember <klember@redhat.com> - 3.17.90-2
|
||||
- Rename Python 2 subpackage to python-gobject for consistency with the
|
||||
python3-gobject package
|
||||
|
||||
* Thu Aug 20 2015 Kalev Lember <klember@redhat.com> - 3.17.90-1
|
||||
- Update to 3.17.90
|
||||
- Use make_install macro
|
||||
- Use license macro for COPYING
|
||||
|
||||
* Tue Jun 30 2015 Kalev Lember <klember@redhat.com> - 3.17.1-3
|
||||
- Split non-cairo parts python3-gobject into a subpackage
|
||||
|
||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.17.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Mon Jun 15 2015 Kalev Lember <kalevlember@gmail.com> - 3.17.1-1
|
||||
- Update to 3.17.1
|
||||
|
||||
* Wed Jun 03 2015 Kalev Lember <kalevlember@gmail.com> - 3.16.1-2
|
||||
- Backport a patch for GdkRectangle changes in gtk+ 3.17.2
|
||||
|
||||
* Tue Apr 14 2015 Kalev Lember <kalevlember@gmail.com> - 3.16.1-1
|
||||
- Update to 3.16.1
|
||||
|
||||
* Tue Mar 24 2015 Kalev Lember <kalevlember@gmail.com> - 3.16.0-1
|
||||
- Update to 3.16.0
|
||||
|
||||
* Thu Mar 05 2015 Kalev Lember <kalevlember@gmail.com> - 3.15.91-1
|
||||
- Update to 3.15.91
|
||||
|
||||
* Sat Feb 21 2015 Kalev Lember <kalevlember@gmail.com> - 3.15.0-1
|
||||
- Update to 3.15.0
|
||||
|
||||
* Mon Sep 22 2014 Kalev Lember <kalevlember@gmail.com> - 3.14.0-1
|
||||
- Update to 3.14.0
|
||||
|
||||
* Tue Sep 16 2014 Kalev Lember <kalevlember@gmail.com> - 3.13.92-1
|
||||
- Update to 3.13.92
|
||||
|
||||
* Tue Sep 02 2014 Kalev Lember <kalevlember@gmail.com> - 3.13.91-1
|
||||
- Update to 3.13.91
|
||||
|
||||
* Thu Aug 21 2014 Kalev Lember <kalevlember@gmail.com> - 3.13.90-2
|
||||
- Backport a fix for virt-manager crash (#1130758)
|
||||
|
||||
* Tue Aug 19 2014 Kalev Lember <kalevlember@gmail.com> - 3.13.90-1
|
||||
- Update to 3.13.90
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Fri Aug 15 2014 Kalev Lember <kalevlember@gmail.com> - 3.13.4-1
|
||||
- Update to 3.13.4
|
||||
|
||||
* Tue Jun 24 2014 Richard Hughes <rhughes@redhat.com> - 3.13.3-1
|
||||
- Update to 3.13.3
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Mon May 26 2014 Kalev Lember <kalevlember@gmail.com> - 3.13.2-1
|
||||
- Update to 3.13.2
|
||||
- Drop old testsuite patches
|
||||
|
||||
* Mon May 12 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 3.13.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
||||
|
||||
* Tue Apr 29 2014 Richard Hughes <rhughes@redhat.com> - 3.13.1-1
|
||||
- Update to 3.13.1
|
||||
|
||||
* Tue Apr 15 2014 Kalev Lember <kalevlember@gmail.com> - 3.12.1-1
|
||||
- Update to 3.12.1
|
||||
|
||||
* Sat Apr 05 2014 Kalev Lember <kalevlember@gmail.com> - 3.12.0-2
|
||||
- Update dep versions
|
||||
- Tighten deps with %%_isa
|
||||
|
||||
* Mon Mar 24 2014 Richard Hughes <rhughes@redhat.com> - 3.12.0-1
|
||||
- Update to 3.12.0
|
||||
|
||||
* Tue Mar 18 2014 Richard Hughes <rhughes@redhat.com> - 3.11.92-1
|
||||
- Update to 3.11.92
|
||||
|
||||
* Tue Mar 04 2014 Richard Hughes <rhughes@redhat.com> - 3.11.91-1
|
||||
- Update to 3.11.91
|
||||
|
||||
* Tue Feb 18 2014 Richard Hughes <rhughes@redhat.com> - 3.11.90-1
|
||||
- Update to 3.11.90
|
||||
|
||||
* Wed Feb 05 2014 Richard Hughes <rhughes@redhat.com> - 3.11.5-1
|
||||
- Update to 3.11.5
|
||||
|
||||
* Tue Jan 14 2014 Richard Hughes <rhughes@redhat.com> - 3.11.4-1
|
||||
- Update to 3.11.4
|
||||
|
||||
* Tue Dec 17 2013 Richard Hughes <rhughes@redhat.com> - 3.11.3-1
|
||||
- Update to 3.11.3
|
||||
|
||||
* Mon Nov 18 2013 Richard Hughes <rhughes@redhat.com> - 3.11.2-1
|
||||
- Update to 3.11.2
|
||||
|
||||
* Tue Oct 29 2013 Richard Hughes <rhughes@redhat.com> - 3.11.1-1
|
||||
- Update to 3.11.1
|
||||
|
||||
* Wed Sep 25 2013 Kalev Lember <kalevlember@gmail.com> - 3.10.0-1
|
||||
- Update to 3.10.0
|
||||
|
||||
* Wed Sep 18 2013 Kalev Lember <kalevlember@gmail.com> - 3.9.92-1
|
||||
- Update to 3.9.92
|
||||
|
||||
* Tue Sep 03 2013 Kalev Lember <kalevlember@gmail.com> - 3.9.91-1
|
||||
- Update to 3.9.91
|
||||
|
||||
* Thu Aug 22 2013 Kalev Lember <kalevlember@gmail.com> - 3.9.90-1
|
||||
- Update to 3.9.90
|
||||
|
||||
* Fri Aug 9 2013 Daniel Drake <dsd@laptop.org> - 3.9.5-1
|
||||
- Update to 3.9.5
|
||||
|
||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.9.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Sun Jun 02 2013 Kalev Lember <kalevlember@gmail.com> - 3.9.2-1
|
||||
- Update to 3.9.2
|
||||
|
||||
* Sun Jun 02 2013 Kalev Lember <kalevlember@gmail.com> - 3.9.1-2
|
||||
- Disable pyflakes tests to avoid failures with too new pyflakes 0.7.2
|
||||
|
||||
* Fri May 10 2013 Richard Hughes <rhughes@redhat.com> - 3.9.1-1
|
||||
- Update to 3.9.1
|
||||
|
||||
* Thu Apr 25 2013 Peter Robinson <pbrobinson@fedoraproject.org> 3.8.1-2
|
||||
- Add upstream patch to fix Sugar (RHBZ 947538)
|
||||
|
||||
* Mon Apr 15 2013 Kalev Lember <kalevlember@gmail.com> - 3.8.1-1
|
||||
- Update to 3.8.1
|
||||
|
||||
* Tue Apr 2 2013 David Malcolm <dmalcolm@redhat.com> - 3.8.0-2
|
||||
- add workarounds for ppc64 (rhbz#924425)
|
||||
|
||||
* Tue Mar 26 2013 Kalev Lember <kalevlember@gmail.com> - 3.8.0-1
|
||||
- Update to 3.8.0
|
||||
|
||||
* Wed Mar 20 2013 Kalev Lember <kalevlember@gmail.com> - 3.7.92-1
|
||||
- Update to 3.7.92
|
||||
|
||||
* Thu Mar 7 2013 Matthias Clasen <mclasen@redhat.com> - 3.7.91-1
|
||||
- Update to 3.7.91
|
||||
|
||||
* Thu Feb 21 2013 Kalev Lember <kalevlember@gmail.com> - 3.7.90-1
|
||||
- Update to 3.7.90
|
||||
|
||||
* Wed Feb 06 2013 Kalev Lember <kalevlember@gmail.com> - 3.7.5.1-1
|
||||
- Update to 3.7.5.1
|
||||
- Re-enable tests
|
||||
|
||||
* Wed Jan 16 2013 Matthias Clasen <mclasen@redhat.com> - 3.7.4-1
|
||||
- Update to 3.7.4
|
||||
|
||||
* Fri Dec 28 2012 Dan Horák <dan[at]danny.cz> - 3.7.3-2
|
||||
- Fix GBytes test (gnome#690837)
|
||||
|
||||
* Thu Dec 20 2012 Kalev Lember <kalevlember@gmail.com> - 3.7.3-1
|
||||
- Update to 3.7.3
|
||||
- Drop upstreamed patches; rebase the ignore-more-pep8-errors patch
|
||||
|
||||
* Thu Dec 13 2012 Ray Strode <rstrode@redhat.com> 3.7.1-3
|
||||
* Thu Dec 13 2012 Ray Strode <rstrode@redhat.com> 3.4.2-4
|
||||
- Split non-cairo parts into a subpackage
|
||||
|
||||
* Mon Nov 12 2012 Kalev Lember <kalevlember@gmail.com> - 3.7.1-2
|
||||
* Mon Nov 26 2012 Daniel Drake <dsd@laptop.org> - 3.4.2-3
|
||||
- More upstream patches to fix copy/paste functionality in Sugar.
|
||||
|
||||
* Mon Nov 12 2012 Kalev Lember <kalevlember@gmail.com> - 3.4.2-2
|
||||
- Remove lib64 rpaths (#817701)
|
||||
- Move code examples to the -devel subpackage and fix the multilib
|
||||
conflict (#831434)
|
||||
|
||||
* Fri Nov 09 2012 Kalev Lember <kalevlember@gmail.com> - 3.7.1-1
|
||||
- Update to 3.7.1
|
||||
* Mon Nov 12 2012 Kalev Lember <kalevlember@gmail.com> - 3.4.2-1
|
||||
- Update to 3.4.2
|
||||
|
||||
* Tue Nov 6 2012 Daniel Drake <dsd@laptop.org> - 3.4.1.1-2
|
||||
- Upstream fix for property lookup; needed for basic Sugar operation.
|
||||
@ -600,10 +393,10 @@ xvfb-run make DESTDIR=$RPM_BUILD_ROOT check V=1
|
||||
* Wed Aug 31 2011 Ignacio Casal Quinteiro <icq@gnome.org> - 2.90.3-1
|
||||
- udpate to 2.90.3
|
||||
|
||||
* Mon Aug 22 2011 John (J5) Palmieri <johnp@redhat.com> - 2.90.2-3
|
||||
* Thu Aug 22 2011 John (J5) Palmieri <johnp@redhat.com> - 2.90.2-3
|
||||
- remove some old requires
|
||||
|
||||
* Fri Aug 19 2011 John (J5) Palmieri <johnp@redhat.com> - 2.90.2-2
|
||||
* Thu Aug 19 2011 John (J5) Palmieri <johnp@redhat.com> - 2.90.2-2
|
||||
- fix up issues uncovered during package review
|
||||
- disable docs because they still reference the static bindings
|
||||
and upstream is working on new documentation
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (pygobject-3.28.3.tar.xz) = 0abda393dd774f9cea04f883eab53f5ebde81d2439ed18cfe08ef39a1996054ab34bf4e770f70116a4485fb4f9970464b9a950ffa4af76cfa21ecc8d4dff968d
|
||||
a17b3897507f179d643e02f5abf111ac pygobject-3.4.2.tar.xz
|
||||
|
33
struct-pointers.patch
Normal file
33
struct-pointers.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From da049efee691fcf6f9d3cd6bb270ee11b3a34b65 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlos@lanedo.com>
|
||||
Date: Tue, 13 Nov 2012 18:24:28 +0100
|
||||
Subject: [PATCH 3/3] Fix marshalling of arrays of struct pointers to Python
|
||||
|
||||
Fill in the pointer to the struct, not the pointer to the
|
||||
array position. This makes the GdkAtom** argument in
|
||||
gtk_clipboard_wait_for_targets() work.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=678620
|
||||
---
|
||||
gi/pygi-marshal-to-py.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gi/pygi-marshal-to-py.c b/gi/pygi-marshal-to-py.c
|
||||
index 811d8b0..950895d 100644
|
||||
--- a/gi/pygi-marshal-to-py.c
|
||||
+++ b/gi/pygi-marshal-to-py.c
|
||||
@@ -439,7 +439,10 @@ _pygi_marshal_to_py_array (PyGIInvokeState *state,
|
||||
memcpy (_struct, array_->data + i * item_size,
|
||||
item_size);
|
||||
item_arg.v_pointer = _struct;
|
||||
- } else
|
||||
+ } else if (item_arg_cache->is_pointer)
|
||||
+ /* this is the case for GAtom* arrays */
|
||||
+ item_arg.v_pointer = g_array_index (array_, gpointer, i);
|
||||
+ else
|
||||
item_arg.v_pointer = array_->data + i * item_size;
|
||||
break;
|
||||
default:
|
||||
--
|
||||
1.7.11.7
|
||||
|
30
structarray.patch
Normal file
30
structarray.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 9454c01f2b1b82d43eea0f72fe9a28ef50065fc9 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlos@lanedo.com>
|
||||
Date: Tue, 18 Dec 2012 21:47:09 +0000
|
||||
Subject: Fix marshalling of arrays of boxed struct values
|
||||
|
||||
This fixes methods like gtk_selection_set_with_data(). In such cases
|
||||
data is passed as an array of struct pointers, so it must be converted
|
||||
to an array of structs.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=656312
|
||||
|
||||
Co-Authored-By: Martin Pitt <martinpitt@gnome.org>
|
||||
---
|
||||
diff --git a/gi/pygi-marshal-from-py.c b/gi/pygi-marshal-from-py.c
|
||||
index dc14ca5..e842227 100644
|
||||
--- a/gi/pygi-marshal-from-py.c
|
||||
+++ b/gi/pygi-marshal-from-py.c
|
||||
@@ -1009,6 +1009,12 @@ _pygi_marshal_from_py_array (PyGIInvokeState *state,
|
||||
if (from_py_cleanup)
|
||||
from_py_cleanup (state, item_arg_cache, item.v_pointer, TRUE);
|
||||
}
|
||||
+ } else if (is_boxed && !item_iface_cache->arg_cache.is_pointer) {
|
||||
+ /* The array elements are not expected to be pointers, but the
|
||||
+ * elements obtained are boxed pointers themselves, so insert
|
||||
+ * the pointed to data.
|
||||
+ */
|
||||
+ g_array_insert_vals (array_, i, item.v_pointer, 1);
|
||||
} else {
|
||||
g_array_insert_val (array_, i, item);
|
||||
}
|
13
test-list-marshalling.patch
Normal file
13
test-list-marshalling.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: pygobject-3.3.91/tests/test_overrides_gtk.py
|
||||
===================================================================
|
||||
--- pygobject-3.3.91.orig/tests/test_overrides_gtk.py
|
||||
+++ pygobject-3.3.91/tests/test_overrides_gtk.py
|
||||
@@ -1553,3 +1553,8 @@ class TestTextBuffer(unittest.TestCase):
|
||||
None)
|
||||
self.assertEqual(start.get_offset(), 6)
|
||||
self.assertEqual(end.get_offset(), 11)
|
||||
+
|
||||
+ def test_rhbz842880(self):
|
||||
+ # Regression test for https://bugzilla.redhat.com/show_bug.cgi?id=842880
|
||||
+ store = Gtk.ListStore(int, int)
|
||||
+ store.append([1, 2])
|
Loading…
Reference in New Issue
Block a user