Use python3-pycanberra

This commit is contained in:
Yanko Kaneti 2013-02-06 10:59:26 +02:00
parent 19972dbd4b
commit c7f733af27
2 changed files with 43 additions and 2 deletions

View File

@ -0,0 +1,33 @@
From 3bb5d7ca10dd441cec9f1b0a7f558c041962800c Mon Sep 17 00:00:00 2001
From: Mathieu Bridon <bochecha@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

View File

@ -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@declera.com> - 0.1.6-3
- Use python3-pycanberra
* Wed Feb 6 2013 Yanko Kaneti <yaneti@declera.com> - 0.1.6-2
- pycairo is python3-cairo in python3 land.