Accepting request 673042 from home:mcepl:branches:devel:languages:python
Add fix-keyring-support.patch fixing gh#pypa/twine#408 OBS-URL: https://build.opensuse.org/request/show/673042 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twine?expand=0&rev=18
This commit is contained in:
parent
00c51ee418
commit
c7ceb96cfd
35
fix-keyring-support.patch
Normal file
35
fix-keyring-support.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 5e80bfa08808b15a340687f8224d449fa906ac8e Mon Sep 17 00:00:00 2001
|
||||
From: Dustin Ingram <di@users.noreply.github.com>
|
||||
Date: Mon, 1 Oct 2018 16:30:32 -0500
|
||||
Subject: [PATCH] Fix keyring support
|
||||
|
||||
---
|
||||
twine/utils.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/twine/utils.py b/twine/utils.py
|
||||
index 83a1867..57eefb3 100644
|
||||
--- a/twine/utils.py
|
||||
+++ b/twine/utils.py
|
||||
@@ -35,6 +35,11 @@
|
||||
except ImportError:
|
||||
from urllib.parse import urlparse, urlunparse
|
||||
|
||||
+try:
|
||||
+ import keyring # noqa
|
||||
+except ImportError:
|
||||
+ pass
|
||||
+
|
||||
from twine import exceptions
|
||||
|
||||
# Shim for raw_input in python3
|
||||
@@ -211,8 +216,7 @@ def get_password_from_keyring(system, username):
|
||||
return
|
||||
|
||||
try:
|
||||
- import keyring
|
||||
- return keyring.get_password(system, username)
|
||||
+ return sys.modules['keyring'].get_password(system, username)
|
||||
except Exception as exc:
|
||||
warnings.warn(str(exc))
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 9 19:52:43 CET 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add fix-keyring-support.patch fixing
|
||||
gh#pypa/twine#408
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 9 13:45:55 UTC 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
@ -6,9 +12,6 @@ Sat Feb 9 13:45:55 UTC 2019 - Matej Cepl <mcepl@suse.com>
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 4 14:54:32 UTC 2019 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- update to version 1.12.2
|
||||
- bug`408` Fix regression where keyring is unconditionally disabled.
|
||||
|
||||
- update to version 1.12.1
|
||||
- bug`404` Fix regression with upload exit code
|
||||
|
||||
|
@ -18,13 +18,15 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-twine
|
||||
Version: 1.12.2
|
||||
Version: 1.12.1
|
||||
Release: 0
|
||||
Summary: Collection of utilities for interacting with PyPI
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/pypa/twine
|
||||
Source: https://files.pythonhosted.org/packages/source/t/twine/twine-%{version}.tar.gz
|
||||
# gh#pypa/twine#408
|
||||
Patch0: fix-keyring-support.patch
|
||||
BuildRequires: %{python_module pkginfo >= 1.4.2}
|
||||
BuildRequires: %{python_module pretend}
|
||||
BuildRequires: %{python_module pytest}
|
||||
@ -59,6 +61,8 @@ checking, if descriptions will render correctly.
|
||||
|
||||
%prep
|
||||
%setup -q -n twine-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
sed -i '1s/^#!.*//' twine/__main__.py
|
||||
|
||||
%build
|
||||
|
3
twine-1.12.1.tar.gz
Normal file
3
twine-1.12.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7d89bc6acafb31d124e6e5b295ef26ac77030bf098960c2a4c4e058335827c5c
|
||||
size 69659
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c164c621ef3e04ee8c933559a2e4920e847005436b1a78703026ca5e011cf6c7
|
||||
size 62691
|
Loading…
Reference in New Issue
Block a user