Accepting request 331682 from home:M0ses:branches:devel:languages:python

Added patch to import gi module and added to changes file

OBS-URL: https://build.opensuse.org/request/show/331682
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-keyring?expand=0&rev=38
This commit is contained in:
Denisart Benjamin 2015-09-17 11:51:45 +00:00 committed by Git OBS Bridge
parent fd533b464a
commit c6f3fb5e9f
3 changed files with 21 additions and 1 deletions

12
keyring-import-gi.patch Normal file
View File

@ -0,0 +1,12 @@
diff --git a/keyring/backends/Gnome.py b/keyring/backends/Gnome.py
index 7a8a274..642bc80 100644
--- a/keyring/backends/Gnome.py
+++ b/keyring/backends/Gnome.py
@@ -3,6 +3,7 @@ import os
try:
from gi import Repository
if Repository.get_default().enumerate_versions('GnomeKeyring'):
+ import gi
gi.require_version('GnomeKeyring', '1.0')
from gi.repository import GnomeKeyring
except ImportError:

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Sep 17 11:41:56 UTC 2015 - m0ses@samaxi.de
- Added keyring-import-gi.patch: gi.require_version is called and not
found if gi is not imported
-------------------------------------------------------------------
Mon Sep 7 08:40:56 UTC 2015 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package python-keyring
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -26,6 +26,7 @@ Group: Development/Languages/Python
Source: https://pypi.python.org/packages/source/k/keyring/keyring-%{version}.tar.gz
# PATCH-FIX-UPSTREAM keyring-gnome-3.18.patch dimstar@opensuse.org -- Silence a warning when run in GNOME 3.18: gi requires versioned imports now.
Patch0: keyring-gnome-3.18.patch
Patch1: keyring-import-gi.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-setuptools
@ -57,6 +58,7 @@ from python. It can be used in any application that needs safe password storage.
%prep
%setup -q -n keyring-%{version}
%patch0 -p1
%patch1 -p1
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' keyring/cli.py keyring/backends/_win_crypto.py