Accepting request 554632 from GNOME:Next
- Switch to using python3: + Replace -devel's python2-xml Requires with python3-xml. + Add gtk2-converter-python3.patch: convert gtk-build-converter to be a python3 script. OBS-URL: https://build.opensuse.org/request/show/554632 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk2?expand=0&rev=254
This commit is contained in:
parent
350f4b1ff7
commit
c3cdf3516e
72
gtk2-converter-python3.patch
Normal file
72
gtk2-converter-python3.patch
Normal file
@ -0,0 +1,72 @@
|
||||
Index: gtk+-2.24.31/gtk/gtk-builder-convert
|
||||
===================================================================
|
||||
--- gtk+-2.24.31.orig/gtk/gtk-builder-convert
|
||||
+++ gtk+-2.24.31/gtk/gtk-builder-convert
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright (C) 2006-2008 Async Open Source
|
||||
# Henrique Romano <henrique@async.com.br>
|
||||
@@ -210,7 +210,7 @@ class GtkBuilderConverter(object):
|
||||
obj.setAttribute('class', obj_class)
|
||||
obj.setAttribute('id', obj_id)
|
||||
if properties:
|
||||
- for name, value in properties.items():
|
||||
+ for name, value in list(properties.items()):
|
||||
if isinstance(value, Node):
|
||||
# Reuse the node, so translatable and context still will be
|
||||
# set when converting nodes. See also #509153
|
||||
@@ -259,7 +259,7 @@ class GtkBuilderConverter(object):
|
||||
for node in objects:
|
||||
self._convert(node.getAttribute("class"), node)
|
||||
if self._get_object(node.getAttribute('id')) is not None:
|
||||
- print "WARNING: duplicate id \"" + node.getAttribute('id') + "\""
|
||||
+ print("WARNING: duplicate id \"" + node.getAttribute('id') + "\"")
|
||||
self.objects[node.getAttribute('id')] = node
|
||||
|
||||
# Convert Gazpachos UI tag
|
||||
@@ -461,8 +461,8 @@ class GtkBuilderConverter(object):
|
||||
if signal_name in ['activate', 'toggled']:
|
||||
action.appendChild(signal)
|
||||
else:
|
||||
- print 'Unhandled signal %s::%s' % (node.getAttribute('class'),
|
||||
- signal_name)
|
||||
+ print('Unhandled signal %s::%s' % (node.getAttribute('class'),
|
||||
+ signal_name))
|
||||
|
||||
if not uimgr.childNodes:
|
||||
child = self._dom.createElement('child')
|
||||
@@ -481,8 +481,8 @@ class GtkBuilderConverter(object):
|
||||
for accelerator in get_accelerator_nodes(node):
|
||||
signal_name = accelerator.getAttribute('signal')
|
||||
if signal_name != 'activate':
|
||||
- print 'Unhandled accelerator signal for %s::%s' % (
|
||||
- node.getAttribute('class'), signal_name)
|
||||
+ print('Unhandled accelerator signal for %s::%s' % (
|
||||
+ node.getAttribute('class'), signal_name))
|
||||
continue
|
||||
accelerator.removeAttribute('signal')
|
||||
child.appendChild(accelerator)
|
||||
@@ -747,7 +747,7 @@ def _indent(output):
|
||||
return s.stdout.read()
|
||||
|
||||
def usage():
|
||||
- print __doc__
|
||||
+ print(__doc__)
|
||||
|
||||
def main(args):
|
||||
try:
|
||||
@@ -788,10 +788,10 @@ def main(args):
|
||||
|
||||
xml = _indent(conv.to_xml())
|
||||
if output_filename == "-":
|
||||
- print xml
|
||||
+ print(xml)
|
||||
else:
|
||||
open(output_filename, 'w').write(xml)
|
||||
- print "Wrote", output_filename
|
||||
+ print("Wrote", output_filename)
|
||||
|
||||
return 0
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 5 11:44:50 UTC 2017 - dimstar@opensuse.org
|
||||
|
||||
- Switch to using python3:
|
||||
+ Replace -devel's python2-xml Requires with python3-xml.
|
||||
+ Add gtk2-converter-python3.patch: convert gtk-build-converter
|
||||
to be a python3 script.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 1 14:13:22 UTC 2017 - mpluskal@suse.com
|
||||
|
||||
|
@ -58,6 +58,8 @@ Patch55: gtk2-default-printer.patch
|
||||
Patch56: gtk2-bgo625202-30-bit-drawables-remain-black.patch
|
||||
# PATCH-FIX-UPSTREAM gtk2-bgo743166-remember-printing-authentication.patch bgo#674264 joschibrauchle@gmx.de -- Credentials from gnome-keyring is not used while printing in GTK 2
|
||||
Patch57: gtk2-bgo743166-remember-printing-authentication.patch
|
||||
# PATCH-FEATURE-OPENSUSE gtk2-converter-python3.patch dimstar@opensuse.org -- Use python3 for gtk-build-converter
|
||||
Patch100: gtk2-converter-python3.patch
|
||||
BuildRequires: atk-devel
|
||||
BuildRequires: cairo-devel
|
||||
BuildRequires: cups-devel
|
||||
@ -286,7 +288,7 @@ Summary: The GTK+ toolkit library (version 2) -- Development Files
|
||||
Group: Development/Libraries/X11
|
||||
Requires: libgtk-2_0-0 = %{version}
|
||||
# gtk-builder-convert needs this.
|
||||
Requires: python2-xml
|
||||
Requires: python3-xml
|
||||
Requires: typelib-1_0-Gtk-2_0 = %{version}
|
||||
# gail is part of gtk+ as of 2.13.x
|
||||
Provides: gail-devel = 1.22.1
|
||||
@ -331,6 +333,7 @@ cp -a %{SOURCE2} .
|
||||
%patch55 -p1
|
||||
%patch56 -p1
|
||||
%patch57 -p1
|
||||
%patch100 -p1
|
||||
gnome-patch-translation-update
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user