File python-keyring.spec of Package python-keyring.9074
#
# spec file for package python-keyring
#
# Copyright (c) 2019 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-keyring
Version: 5.7
Release: 0
Url: https://bitbucket.org/kang/python-keyring-lib
Summary: Store and access your passwords safely
License: Python-2.0 AND MIT
Group: Development/Languages/Python
Source: https://pypi.python.org/packages/source/k/keyring/keyring-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools_scm >= 1.15.0}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with tests}
# Test requirements:
BuildRequires: %{python_module SecretStorage}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest}
%endif
Requires: python-SecretStorage
Requires: python-setuptools
Provides: python-keyring-kde = %{version}
Obsoletes: python-keyring-kde < %{version}
Provides: python-keyring-gnome = %{version}
Obsoletes: python-keyring-gnome < %{version}
Supplements: packageand(kdebase4-workspace:kwalletmanager)
BuildArch: noarch
%python_subpackages
%description
The Python keyring lib provides a easy way to access the system keyring service
from python. It can be used in any application that needs safe password storage.
%prep
%setup -q -n keyring-%{version}
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' keyring/cli.py keyring/backends/_win_crypto.py
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
%{python_expand export PYTHONPATH="%{buildroot}%{$python_sitelib}"
py.test-%{$python_bin_suffix} --pyargs keyring.tests
}
%endif
%files %{python_files}
%defattr(-,root,root)
%doc README.rst CHANGES.rst
%python3_only %{_bindir}/keyring
%{python_sitelib}/keyring-%{version}-py*.egg-info
%{python_sitelib}/keyring/
%exclude %{python_sitelib}/keyring/tests
%changelog