diff --git a/pygobject-3.9.90-pep8.patch b/pygobject-3.9.90-pep8.patch new file mode 100644 index 0000000..81cceae --- /dev/null +++ b/pygobject-3.9.90-pep8.patch @@ -0,0 +1,51 @@ +From c7b75a8c250078ac8ea28752f087ed687bd20edd Mon Sep 17 00:00:00 2001 +From: Yanko Kaneti +Date: Wed, 21 Aug 2013 08:53:07 +0200 +Subject: [PATCH] Fix PEP-8 errors in propertyhelper.py + +https://bugzilla.gnome.org/show_bug.cgi?id=706319 + +Signed-off-by: Martin Pitt +--- + gi/_gobject/propertyhelper.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gi/_gobject/propertyhelper.py b/gi/_gobject/propertyhelper.py +index 162d30a..c9400df 100644 +--- a/gi/_gobject/propertyhelper.py ++++ b/gi/_gobject/propertyhelper.py +@@ -185,16 +185,16 @@ class Property(object): + if minimum is not None: + if minimum < self._get_minimum(): + raise TypeError( +- "Minimum for type %s cannot be lower than %d" % ( +- self.type, self._get_minimum())) ++ "Minimum for type %s cannot be lower than %d" % ++ (self.type, self._get_minimum())) + else: + minimum = self._get_minimum() + self.minimum = minimum + if maximum is not None: + if maximum > self._get_maximum(): + raise TypeError( +- "Maximum for type %s cannot be higher than %d" % ( +- self.type, self._get_maximum())) ++ "Maximum for type %s cannot be higher than %d" % ++ (self.type, self._get_maximum())) + else: + maximum = self._get_maximum() + self.maximum = maximum +@@ -393,8 +393,8 @@ def install_properties(cls): + raise TypeError( + "GObject subclass %r defines do_get/set_property" + " and it also uses a property with a custom setter" +- " or getter. This is not allowed" % ( +- cls.__name__,)) ++ " or getter. This is not allowed" % ++ (cls.__name__,)) + + def obj_get_property(self, pspec): + name = pspec.name.replace('-', '_') +-- +1.8.3.1 + diff --git a/pygobject3.spec b/pygobject3.spec index f57733b..11263fb 100644 --- a/pygobject3.spec +++ b/pygobject3.spec @@ -64,6 +64,10 @@ Patch2: pygobject-3.3.4-known-failures.patch # Not yet sent upstream: Patch3: test-list-marshalling.patch +# Backported from upstream, fixes build with newer PEP8 +# https://bugzilla.gnome.org/show_bug.cgi?id=706319 +Patch4: pygobject-3.9.90-pep8.patch + # Disable a test that still fails on ppc64 (see # https://bugzilla.redhat.com/show_bug.cgi?id=924425#c7 ) # Filed upstream as: @@ -153,6 +157,7 @@ for use in Python 3 programs. %setup -q -n pygobject-%{version} %patch2 -p1 -b .known-failures %patch3 -p1 -b .test-list-marshalling +%patch4 -p1 -b .pep8 %patch5 -p1 %if 0%{?with_python3}