Hello community,

here is the log from the commit of package python-pass_python_keyring for 
openSUSE:Leap:15.2 checked in at 2020-02-19 18:48:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-pass_python_keyring (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-pass_python_keyring.new.26092 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pass_python_keyring"

Wed Feb 19 18:48:58 2020 rev:11 rq:776895 version:1.1

Changes:
--------
--- 
/work/SRC/openSUSE:Leap:15.2/python-pass_python_keyring/python-pass_python_keyring.changes
  2020-01-15 15:51:24.351527832 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-pass_python_keyring.new.26092/python-pass_python_keyring.changes
       2020-02-19 18:49:00.099049751 +0100
@@ -1,0 +2,21 @@
+Mon Aug 20 23:41:25 UTC 2018 - [email protected]
+
+- Add python3.patch to fix TypeError on python3
+  https://github.com/notandy/pass_python_keyring/pull/6
+
+-------------------------------------------------------------------
+Sun Aug  5 01:01:31 UTC 2018 - [email protected]
+
+- convert python-keyring from recommended to requirement
+
+-------------------------------------------------------------------
+Wed May 23 19:33:06 UTC 2018 - [email protected]
+
+- CLean up SPEC
+
+-------------------------------------------------------------------
+Thu Aug 24 13:49:01 UTC 2017 - [email protected]
+
+- singlespec auto-conversion
+
+-------------------------------------------------------------------
@@ -9,0 +31 @@
+

New:
----
  python3.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pass_python_keyring.spec ++++++
--- /var/tmp/diff_new_pack.Yyl3g5/_old  2020-02-19 18:49:00.479050155 +0100
+++ /var/tmp/diff_new_pack.Yyl3g5/_new  2020-02-19 18:49:00.483050160 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package pass_python_keyring
+# spec file for package python-pass_python_keyring
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,47 +15,53 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 %define mod_name pass_python_keyring
+%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitearch: %global python_sitearch %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pass_python_keyring
 Version:        1.1
 Release:        0
 Summary:        Pass backend for python-keyring lib
-Url:            http://github.com/notandy/pass_python_keyring
-Group:          Productivity/Other
 License:        Python-2.0
+Group:          Productivity/Other
+URL:            http://github.com/notandy/pass_python_keyring
 Source:         
http://github.com/notandy/%{mod_name}/archive/v%{version}.tar.gz
 Source1:        keyringrc.cfg
-BuildRequires:  python-setuptools
+Patch0:         python3.patch
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+Requires:       python-keyring
 Recommends:     password-store
-Recommends:     python-keyring
-BuildRoot:      %{_tmppath}/%{mod_name}-%{version}-build
-%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%{!?python_sitearch: %global python_sitearch %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 %if 0%{?suse_version}
-%py_requires
-%if 0%{?suse_version} > 1110
 BuildArch:      noarch
 %endif
-%endif
+%python_subpackages
 
 %description
 A pass-powered backend for Python Keyring lib.
 
 %prep
 %setup -q -n %{mod_name}-%{version}
-install -m0644 %{S:1} .
+%patch0 -p1
+install -m0644 %{SOURCE1} .
 
 %build
-python setup.py build
+%python_build
 
 %install
-python setup.py install --skip-build --root=%{buildroot} --prefix=%{_prefix}
+%python_install --skip-build
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
+
+# no tests available
 
-%files
-%defattr(-,root,root)
+%files %{python_files}
 %doc README.md keyringrc.cfg
 %dir %{python_sitelib}/%{mod_name}-%{version}-py*.egg-info/
 %{python_sitelib}/%{mod_name}-%{version}-py*.egg-info/*
+%pycache_only %{python_sitelib}/__pycache__/*
 %{python_sitelib}/pass.py*
 
 %changelog

++++++ python3.patch ++++++
>From 0b49c548db332b6ffe14b7122a6e29bc3c94209f Mon Sep 17 00:00:00 2001
From: Theo Chatzimichos <[email protected]>
Date: Sun, 5 Aug 2018 13:51:02 +0200
Subject: [PATCH 1/2] remove whitespace

---
 pass.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pass.py b/pass.py
index 21dc517..bdc4442 100755
--- a/pass.py
+++ b/pass.py
@@ -11,7 +11,7 @@
 class Keyring(KeyringBackend):
     """Pass Keyring"""
 
-    def supported(self): 
+    def supported(self):
         return 0
 
     def get_password(self, service, username):
@@ -32,6 +32,6 @@ def set_password(self, service, username, password):
 
     def delete_password(self, service, username):
         proc = Popen(['pass', 'rm', '--force', '/'.join([service,username])])
-        proc.wait() 
+        proc.wait()
         if(proc.returncode != 0):
             raise PasswordDeleteError("Password not found")

>From 08c90c10d78ba80bd6b92586fda5487bf2ad5cc2 Mon Sep 17 00:00:00 2001
From: Theo Chatzimichos <[email protected]>
Date: Sun, 5 Aug 2018 14:04:31 +0200
Subject: [PATCH 2/2] fix python3 TypeError on get_password

the password that is returned in the get_password method is not a
string, so when called a TypeError is raised:

`TypeError: a bytes-like object is required, not 'str'`

By decoding it to utf-8 it works on python3, without breaking
compatibility on python2
---
 pass.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pass.py b/pass.py
index bdc4442..96e2cd8 100755
--- a/pass.py
+++ b/pass.py
@@ -20,7 +20,7 @@ def get_password(self, service, username):
         password, _ = proc.communicate()
         proc.wait()
         if(proc.returncode == 0):
-            return password.rstrip('\n')
+            return password.decode('utf-8').rstrip('\n')
         else:
             return None
 

Reply via email to