[gnome-clocks] Use python3-pycanberra
Yanko Kaneti
yaneti at fedoraproject.org
Wed Feb 6 09:03:21 UTC 2013
commit c7f733af27974015ba9b82275c421527f2e10107
Author: Yanko Kaneti <yaneti at declera.com>
Date: Wed Feb 6 10:59:26 2013 +0200
Use python3-pycanberra
0001-Use-the-system-pycanberra.patch | 33 +++++++++++++++++++++++++++++++++
gnome-clocks.spec | 12 ++++++++++--
2 files changed, 43 insertions(+), 2 deletions(-)
---
diff --git a/0001-Use-the-system-pycanberra.patch b/0001-Use-the-system-pycanberra.patch
new file mode 100644
index 0000000..4e046b0
--- /dev/null
+++ b/0001-Use-the-system-pycanberra.patch
@@ -0,0 +1,33 @@
+From 3bb5d7ca10dd441cec9f1b0a7f558c041962800c Mon Sep 17 00:00:00 2001
+From: Mathieu Bridon <bochecha at fedoraproject.org>
+Date: Wed, 6 Feb 2013 16:43:25 +0800
+Subject: [PATCH] Use the system pycanberra
+
+As pycanberra has not yet been ported to Python 3, keep the fallback on
+the bundled version.
+---
+ gnomeclocks/utils.py | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/gnomeclocks/utils.py b/gnomeclocks/utils.py
+index 637983d..159fe67 100644
+--- a/gnomeclocks/utils.py
++++ b/gnomeclocks/utils.py
+@@ -20,7 +20,13 @@ import os
+ import time
+ import datetime
+ from gi.repository import GObject, Gio, GnomeDesktop, Notify
+-from . import pycanberra
++
++try:
++ import pycanberra
++except ImportError:
++ # Fallback on the bundled version
++ from . import pycanberra
++
+ from gnomeclocks import GNOMECLOCKS_DATADIR
+
+
+--
+1.8.1.2
+
diff --git a/gnome-clocks.spec b/gnome-clocks.spec
index 7722687..1d14b6e 100644
--- a/gnome-clocks.spec
+++ b/gnome-clocks.spec
@@ -1,6 +1,6 @@
Name: gnome-clocks
Version: 0.1.6
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Clock application designed for GNOME 3
License: GPLv2+
@@ -15,12 +15,15 @@ Patch2: gnome-clocks-0.1.6-py3cairo.patch
# for patch2
BuildRequires: automake autoconf
+# Upstream commit 3bb5d7ca10dd441cec9f1b0a7f558c041962800c
+Patch3: 0001-Use-the-system-pycanberra.patch
+
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: intltool desktop-file-utils glib2-devel
BuildRequires: pygobject3-devel python3-cairo-devel
Requires: pygobject3 clutter-gtk libgweather gnome-desktop3 libnotify python3-cairo
-Requires: pycanberra
+Requires: python3-pycanberra
@@ -29,8 +32,10 @@ Clock application designed for GNOME 3
%prep
%setup -q
+rm -fv gnomeclocks/pycanberra.py
%patch1 -p1 -b .desktop-keywords
%patch2 -p1 -b .py3cairo
+%patch3 -p1 -b .use-system-pycanberra
autoreconf -fi
intltoolize --force
@@ -70,6 +75,9 @@ fi
%changelog
+* Wed Feb 6 2013 Yanko Kaneti <yaneti at declera.com> - 0.1.6-3
+- Use python3-pycanberra
+
* Wed Feb 6 2013 Yanko Kaneti <yaneti at declera.com> - 0.1.6-2
- pycairo is python3-cairo in python3 land.
More information about the scm-commits
mailing list