python-keyring/python-keyring.spec
Dirk Mueller 0ab6fd2f2b - update to 23.5.0:
* Require Python 3.7 or later.
  * #551: Fixed docs warnings.
  * #549: EnvironCredential now allows for equality
    comparison.
  * #529: macOS backend is no longer viable if the API module
    cannot be loaded. Prevents "symbol not found" errors on
    macOS 11 (Big Sur) and later when a "universal2" binary
    is not used (available for Python 3.8.7 and later).
  * #547: Tests no longer attempt to run macOS backends even
    on macOS when the backend is non-viable.
  * #542: Change get_credential to return generic Credential.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-keyring?expand=0&rev=93
2022-01-10 22:46:27 +00:00

88 lines
2.8 KiB
RPMSpec

#
# spec file for package python-keyring
#
# Copyright (c) 2022 SUSE LLC
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-keyring
Version: 23.5.0
Release: 0
Summary: System keyring service access from Python
License: MIT AND Python-2.0
URL: https://github.com/jaraco/keyring
Source: https://files.pythonhosted.org/packages/source/k/keyring/keyring-%{version}.tar.gz
Patch0: support-new-importlib.patch
BuildRequires: %{python_module SecretStorage >= 3}
BuildRequires: %{python_module entrypoints}
BuildRequires: %{python_module importlib-metadata}
BuildRequires: %{python_module pytest >= 3.5}
BuildRequires: %{python_module setuptools >= 17.1}
BuildRequires: %{python_module setuptools_scm >= 1.15.0}
BuildRequires: %{python_module toml}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-SecretStorage >= 3
Requires: python-entrypoints
Requires: python-importlib-metadata
Requires: python-jeepney >= 0.4.2
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
%description
The Python keyring lib provides a way to access the system keyring service
from python. It can be used in any application that needs safe password storage.
%prep
%autosetup -p1 -n keyring-%{version}
%if 0%{?sle_version}
# keyring is not setting the egg version correctly without this:
sed -i -e '1a version=%{version}' setup.cfg
%endif
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' keyring/cli.py
sed -i -e 's,--flake8,,' -e 's,--black,,' -e 's,--cov,,' pytest.ini
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/keyring
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%post
%python_install_alternative keyring
%postun
%python_uninstall_alternative keyring
%files %{python_files}
%doc README.rst CHANGES.rst
%license LICENSE
%python_alternative %{_bindir}/keyring
%{python_sitelib}/keyring-%{version}-py*.egg-info
%{python_sitelib}/keyring/
%changelog