Update to 3.18.1
This commit is contained in:
parent
3019ad87f8
commit
c26b64444d
@ -1,56 +0,0 @@
|
||||
From 8e7f6f1458cf1c162c13422c72562b00433b762b Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <creiter@src.gnome.org>
|
||||
Date: Sun, 11 Oct 2015 01:28:48 +0200
|
||||
Subject: [PATCH] Fix Gdk.rectangle_intersect/rectangle_union missing with GTK+
|
||||
3.18
|
||||
|
||||
3.18 added a Gdk.Rectangle type which changed these functions
|
||||
to methods in the gir.
|
||||
|
||||
Fix by providing aliases in the Gdk overrides.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=756364
|
||||
---
|
||||
gi/overrides/Gdk.py | 8 ++++++++
|
||||
tests/test_overrides_gdk.py | 9 +++++++++
|
||||
2 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
|
||||
index 3ab5d6d..840affe 100644
|
||||
--- a/gi/overrides/Gdk.py
|
||||
+++ b/gi/overrides/Gdk.py
|
||||
@@ -134,6 +134,14 @@ else:
|
||||
Rectangle = _cairo.RectangleInt
|
||||
|
||||
__all__.append('Rectangle')
|
||||
+ else:
|
||||
+ # https://bugzilla.gnome.org/show_bug.cgi?id=756364
|
||||
+ # These methods used to be functions, keep aliases for backwards compat
|
||||
+ rectangle_intersect = Gdk.Rectangle.intersect
|
||||
+ rectangle_union = Gdk.Rectangle.union
|
||||
+
|
||||
+ __all__.append('rectangle_intersect')
|
||||
+ __all__.append('rectangle_union')
|
||||
|
||||
if Gdk._version == '2.0':
|
||||
class Drawable(Gdk.Drawable):
|
||||
diff --git a/tests/test_overrides_gdk.py b/tests/test_overrides_gdk.py
|
||||
index eff2c54..9559a09 100644
|
||||
--- a/tests/test_overrides_gdk.py
|
||||
+++ b/tests/test_overrides_gdk.py
|
||||
@@ -184,3 +184,12 @@ class TestGdk(unittest.TestCase):
|
||||
|
||||
rgba = Gdk.RGBA(red=1.0, green=0.8, blue=0.6, alpha=0.4)
|
||||
self.assertEqual(eval(repr(rgba)), rgba)
|
||||
+
|
||||
+ def test_rectangle_functions(self):
|
||||
+ # https://bugzilla.gnome.org/show_bug.cgi?id=756364
|
||||
+ a = Gdk.Rectangle()
|
||||
+ b = Gdk.Rectangle()
|
||||
+ self.assertTrue(isinstance(Gdk.rectangle_union(a, b), Gdk.Rectangle))
|
||||
+ intersect, rect = Gdk.rectangle_intersect(a, b)
|
||||
+ self.assertTrue(isinstance(rect, Gdk.Rectangle))
|
||||
+ self.assertTrue(isinstance(intersect, bool))
|
||||
--
|
||||
2.5.0
|
||||
|
@ -11,15 +11,13 @@
|
||||
%global with_check 0
|
||||
|
||||
Name: pygobject3
|
||||
Version: 3.18.0
|
||||
Release: 2%{?dist}
|
||||
Version: 3.18.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Python bindings for GObject Introspection
|
||||
|
||||
License: LGPLv2+ and MIT
|
||||
URL: https://live.gnome.org/PyGObject
|
||||
Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.18/pygobject-%{version}.tar.xz
|
||||
# Backported from upstream
|
||||
Patch0: 0001-Fix-Gdk.rectangle_intersect-rectangle_union-missing-.patch
|
||||
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
||||
@ -116,7 +114,6 @@ This package contains files required to embed PyGObject
|
||||
|
||||
%prep
|
||||
%setup -q -n pygobject-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
@ -217,6 +214,9 @@ xvfb-run make DESTDIR=$RPM_BUILD_ROOT check V=1
|
||||
%{_libdir}/pkgconfig/pygobject-3.0.pc
|
||||
|
||||
%changelog
|
||||
* Sat Oct 24 2015 Kalev Lember <klember@redhat.com> - 3.18.1-1
|
||||
- Update to 3.18.1
|
||||
|
||||
* Mon Oct 19 2015 Kalev Lember <klember@redhat.com> - 3.18.0-2
|
||||
- Backport a fix for Gdk.rectangle_intersect/rectangle_union compatibility
|
||||
(#1269901)
|
||||
|
Loading…
x
Reference in New Issue
Block a user