libdbusmenu-glib: work on python3
This commit is contained in:
parent
72e710ebaf
commit
8e607d7173
2 changed files with 61 additions and 2 deletions
60
srcpkgs/libdbusmenu-glib/patches/python3.patch
Normal file
60
srcpkgs/libdbusmenu-glib/patches/python3.patch
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
--- a/tools/dbusmenu-bench
|
||||||
|
+++ b/tools/dbusmenu-bench
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
+#!/usr/bin/env python3
|
||||||
|
# encoding: utf-8
|
||||||
|
"""
|
||||||
|
A library to communicate a menu object set accross DBus and
|
||||||
|
@@ -61,7 +61,7 @@
|
||||||
|
|
||||||
|
def dump_properties(properties, prepend=""):
|
||||||
|
for key, value in properties.items():
|
||||||
|
- print "%s- %s: %s" % (prepend, key, value)
|
||||||
|
+ print("%s- %s: %s" % (prepend, key, value))
|
||||||
|
|
||||||
|
|
||||||
|
def run_test_sequence(menu, dump=False):
|
||||||
|
@@ -74,9 +74,9 @@
|
||||||
|
revision, layout = menu.GetLayout(dbus.Int32(0))
|
||||||
|
times["GetLayout"] = chrono.elapsed()
|
||||||
|
if dump:
|
||||||
|
- print "revision:", revision
|
||||||
|
- print "layout:"
|
||||||
|
- print layout
|
||||||
|
+ print("revision:", revision)
|
||||||
|
+ print("layout:")
|
||||||
|
+ print(layout)
|
||||||
|
|
||||||
|
# Get ids
|
||||||
|
tree = ET.fromstring(layout)
|
||||||
|
@@ -89,17 +89,17 @@
|
||||||
|
children = menu.GetChildren(dbus.Int32(root_id), property_names)
|
||||||
|
times["GetChildren"] = chrono.elapsed()
|
||||||
|
if dump:
|
||||||
|
- print "children:"
|
||||||
|
+ print("children:")
|
||||||
|
for child in children:
|
||||||
|
id, properties = child
|
||||||
|
- print "- %d:" % id
|
||||||
|
+ print("- %d:" % id)
|
||||||
|
dump_properties(properties, prepend=" ")
|
||||||
|
|
||||||
|
chrono.restart()
|
||||||
|
properties = menu.GetProperties(dbus.Int32(child_id), property_names)
|
||||||
|
times["GetProperties"] = chrono.elapsed()
|
||||||
|
if dump:
|
||||||
|
- print "properties:"
|
||||||
|
+ print("properties:")
|
||||||
|
dump_properties(properties)
|
||||||
|
|
||||||
|
return times
|
||||||
|
@@ -109,7 +109,7 @@
|
||||||
|
|
||||||
|
def print_probe(prefix, name, value, timestamp):
|
||||||
|
value = int(value * 1000000)
|
||||||
|
- print "%(prefix)s.%(name)s:%(value)d@%(timestamp)d" % locals()
|
||||||
|
+ print("%(prefix)s.%(name)s:%(value)d@%(timestamp)d" % locals())
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = OptionParser(usage = "%prog [options]")
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'libdbusmenu-glib'
|
# Template file for 'libdbusmenu-glib'
|
||||||
pkgname=libdbusmenu-glib
|
pkgname=libdbusmenu-glib
|
||||||
version=16.04.0
|
version=16.04.0
|
||||||
revision=5
|
revision=6
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
build_helper="gir"
|
build_helper="gir"
|
||||||
configure_args="--disable-dumper --disable-static --disable-tests
|
configure_args="--disable-dumper --disable-static --disable-tests
|
||||||
|
@ -15,7 +15,6 @@ license="GPL-3, LGPL-2.1, LGPL-3"
|
||||||
homepage="https://launchpad.net/libdbusmenu"
|
homepage="https://launchpad.net/libdbusmenu"
|
||||||
distfiles="${homepage}/${version%.*}/${version}/+download/libdbusmenu-${version}.tar.gz"
|
distfiles="${homepage}/${version%.*}/${version}/+download/libdbusmenu-${version}.tar.gz"
|
||||||
checksum=b9cc4a2acd74509435892823607d966d424bd9ad5d0b00938f27240a1bfa878a
|
checksum=b9cc4a2acd74509435892823607d966d424bd9ad5d0b00938f27240a1bfa878a
|
||||||
python_version=2 #unverified
|
|
||||||
|
|
||||||
build_options="gir"
|
build_options="gir"
|
||||||
build_options_default="gir"
|
build_options_default="gir"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue