View | Details | Raw Unified | Return to bug 243704 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 / +5 lines)
Lines 4-10 Link Here
4
4
5
PORTNAME=	zeitgeist
5
PORTNAME=	zeitgeist
6
PORTVERSION=	0.9.16
6
PORTVERSION=	0.9.16
7
PORTREVISION=	2
7
PORTREVISION=	3
8
CATEGORIES=	sysutils
8
CATEGORIES=	sysutils
9
MASTER_SITES=	https://launchpad.net/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}/${PORTVERSION}/+download/
9
MASTER_SITES=	https://launchpad.net/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}/${PORTVERSION}/+download/
10
10
Lines 14-19 Link Here
14
LICENSE=	GPLv2 LGPL21
14
LICENSE=	GPLv2 LGPL21
15
LICENSE_COMB=	multi
15
LICENSE_COMB=	multi
16
16
17
CONFLICTS_INSTALL=	zeitgeist1
18
17
BUILD_DEPENDS=	valac:lang/vala \
19
BUILD_DEPENDS=	valac:lang/vala \
18
		dee-tool:devel/dee \
20
		dee-tool:devel/dee \
19
		rapper:textproc/raptor2 \
21
		rapper:textproc/raptor2 \
Lines 21-30 Link Here
21
RUN_DEPENDS=	${PYTHON_SITELIBDIR}/xdg/__init__.py:devel/py-xdg@${PY_FLAVOR} \
23
RUN_DEPENDS=	${PYTHON_SITELIBDIR}/xdg/__init__.py:devel/py-xdg@${PY_FLAVOR} \
22
		${PYTHON_SITELIBDIR}/dbus/__init__.py:devel/py-dbus@${PY_FLAVOR}
24
		${PYTHON_SITELIBDIR}/dbus/__init__.py:devel/py-dbus@${PY_FLAVOR}
23
25
24
USES=		gettext gmake gnome libtool pathfix pkgconfig python:2.7 sqlite \
26
USES=		gettext gmake gnome libtool pathfix pkgconfig python sqlite \
25
		tar:xz
27
		tar:xz
26
USE_GNOME=	intlhack glib20 introspection:build
28
USE_GNOME=	intlhack glib20 introspection:build
27
USE_LDCONFIG=	yes
29
USE_LDCONFIG=	yes
30
USE_PYTHON=	py3kplist
28
GNU_CONFIGURE=	yes
31
GNU_CONFIGURE=	yes
29
CPPFLAGS+=	-I${LOCALBASE}/include
32
CPPFLAGS+=	-I${LOCALBASE}/include
30
LDFLAGS+=	-L${LOCALBASE}/lib
33
LDFLAGS+=	-L${LOCALBASE}/lib
(-)sysutils/zeitgeist/files/patch-python_client.py (+35 lines)
Line 0 Link Here
1
--- python/client.py.orig	2014-07-03 07:47:07 UTC
2
+++ python/client.py
3
@@ -118,7 +118,7 @@ class _DBusInterface(object):
4
 
5
 		try:
6
 			return method_getter()(*args, **kwargs)
7
-		except dbus.exceptions.DBusException, e:
8
+		except dbus.exceptions.DBusException as e:
9
 			return reconnecting_error_handler(e)
10
 
11
 	def __getattr__(self, name):
12
@@ -258,7 +258,7 @@ class ZeitgeistDBusInterface(object):
13
 			try:
14
 				proxy = get_bus().get_object(self.BUS_NAME,
15
 					self.OBJECT_PATH, follow_name_owner_changes=True)
16
-			except dbus.exceptions.DBusException, e:
17
+			except dbus.exceptions.DBusException as e:
18
 				if e.get_dbus_name() == "org.freedesktop.DBus.Error.ServiceUnknown":
19
 					raise RuntimeError(
20
 						"Found no running zeitgeist-daemon instance: %s" % \
21
@@ -1054,11 +1054,11 @@ class ZeitgeistClient:
22
 		"""
23
 		
24
 		if unique_id not in self._data_sources:
25
-			raise ValueError, 'set_data_source_enabled_callback() called before ' \
26
-			'register_data_source()'
27
+			raise ValueError('set_data_source_enabled_callback() called before ' \
28
+			'register_data_source()')
29
 		
30
 		if not callable(enabled_callback):
31
-			raise TypeError, 'enabled_callback: expected a callable method'
32
+			raise TypeError('enabled_callback: expected a callable method')
33
 		
34
 		self._data_sources[unique_id]['callback'] = enabled_callback
35
 	
(-)sysutils/zeitgeist/files/patch-python_datamodel.py (+130 lines)
Line 0 Link Here
1
--- python/datamodel.py.orig	2014-07-03 07:47:07 UTC
2
+++ python/datamodel.py
3
@@ -26,7 +26,7 @@ import os.path
4
 import gettext
5
 import time
6
 import sys
7
-gettext.install("zeitgeist", unicode=1)
8
+gettext.install("zeitgeist")
9
 
10
 __all__ = [
11
 	'Interpretation',
12
@@ -121,12 +121,12 @@ class Symbol(str):
13
 	def _ensure_all_children (self):
14
 		if self._all_children is not None : return
15
 		self._all_children = dict()
16
-		for child in self._children.itervalues():
17
+		for child in self._children.values():
18
 			child._visit(self._all_children)
19
 	
20
 	def _visit (self, dikt):
21
 		dikt[self.name] = self
22
-		for child in self._children.itervalues():
23
+		for child in self._children.values():
24
 			child._visit(dikt) 
25
 	
26
 	@staticmethod
27
@@ -141,7 +141,7 @@ class Symbol(str):
28
 			children = list(symbol.get_all_children())
29
 			children.append(uri)
30
 			return children
31
-		except KeyError, e:
32
+		except KeyError as e:
33
 			return [uri]
34
 		
35
 
36
@@ -174,7 +174,7 @@ class Symbol(str):
37
 		"""
38
 		Returns a list of immediate child symbols
39
 		"""
40
-		return frozenset(self._children.itervalues())
41
+		return frozenset(self._children.values())
42
 		
43
 	def iter_all_children(self):
44
 		"""
45
@@ -182,7 +182,7 @@ class Symbol(str):
46
 		of this symbol
47
 		"""
48
 		self._ensure_all_children()
49
-		return self._all_children.itervalues()
50
+		return self._all_children.values()
51
 		
52
 	def get_all_children(self):
53
 		"""
54
@@ -194,7 +194,7 @@ class Symbol(str):
55
 		"""
56
 		Returns a list of immediate parent symbols
57
 		"""
58
-		return frozenset(self._parents.itervalues())
59
+		return frozenset(self._parents.values())
60
 	
61
 	def is_child_of (self, parent):
62
 		"""
63
@@ -203,7 +203,7 @@ class Symbol(str):
64
 		if not isinstance (parent, Symbol):
65
 			try:
66
 				parent = _SYMBOLS_BY_URI[parent]
67
-			except KeyError, e:
68
+			except KeyError as e:
69
 				# Parent is not a known URI
70
 				return self.uri == parent
71
 		
72
@@ -226,7 +226,7 @@ class Symbol(str):
73
 		if isinstance (child, basestring):
74
 			try:
75
 				child = _SYMBOLS_BY_URI[child]
76
-			except KeyError, e:
77
+			except KeyError as e:
78
 				# Child is not a know URI
79
 				if isinstance (parent, basestring):
80
 					return child == parent
81
@@ -1170,7 +1170,7 @@ _SYMBOLS_BY_URI["Manifestation"] = Manifestation
82
 # Load the ontology definitions
83
 ontology_file = os.path.join(os.path.dirname(__file__), "_ontology.py")
84
 try:
85
-	execfile(ontology_file)
86
+	exec(open(ontology_file).read())
87
 except IOError:
88
 	raise ImportError("Unable to load Zeitgeist ontology. Did you run `make`?")
89
 
90
@@ -1178,23 +1178,23 @@ except IOError:
91
 # Bootstrap the symbol relations. We use a 2-pass strategy:
92
 #
93
 # 1) Make sure that all parents and children are registered on each symbol
94
-for symbol in _SYMBOLS_BY_URI.itervalues():
95
+for symbol in _SYMBOLS_BY_URI.values():
96
 	for parent in symbol._parents:
97
 		try:
98
 			_SYMBOLS_BY_URI[parent]._children[symbol.uri] = None
99
-		except KeyError, e:
100
-			print "ERROR", e, parent, symbol.uri
101
+		except KeyError as e:
102
+			print ("ERROR", e, parent, symbol.uri)
103
 			pass
104
 	for child in symbol._children:
105
 		try:
106
 			_SYMBOLS_BY_URI[child]._parents.add(symbol.uri)
107
 		except KeyError:
108
-			print "ERROR", e, child, symbol.uri
109
+			print ("ERROR", e, child, symbol.uri)
110
 			pass
111
 
112
 # 2) Resolve all child and parent URIs to their actual Symbol instances
113
-for symbol in _SYMBOLS_BY_URI.itervalues():
114
-	for child_uri in symbol._children.iterkeys():
115
+for symbol in _SYMBOLS_BY_URI.values():
116
+	for child_uri in symbol._children.keys():
117
 		symbol._children[child_uri] = _SYMBOLS_BY_URI[child_uri]
118
 	
119
 	parents = {}
120
@@ -1204,8 +1204,8 @@ for symbol in _SYMBOLS_BY_URI.itervalues():
121
 
122
 
123
 if __name__ == "__main__":
124
-	print "Success"
125
+	print ("Success")
126
 	end_symbols = time.time()
127
-	print >> sys.stderr, "Import time: %s" % (end_symbols - start_symbols)
128
+	print ("Import time: %s" % (end_symbols - start_symbols), sys.stderr)
129
 
130
 # vim:noexpandtab:ts=4:sw=4

Return to bug 243704