SHA256
1
0
forked from pool/python-rsa

Accepting request 929838 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/929838
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rsa?expand=0&rev=22
This commit is contained in:
Dominique Leuenberger 2021-11-09 22:53:52 +00:00 committed by Git OBS Bridge
commit 9e6010d852
2 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 23 14:46:41 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
-------------------------------------------------------------------
Tue Mar 2 00:30:30 UTC 2021 - Dirk Müller <dmueller@suse.com>

View File

@ -16,6 +16,12 @@
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-rsa
@ -28,11 +34,16 @@ URL: https://stuvel.eu/rsa
Source: https://files.pythonhosted.org/packages/source/r/rsa/rsa-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python-rpm-macros >= 20210929
Requires: python-pyasn1 >= 0.1.3
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(post): update-alternatives
Requires(pre): coreutils
Requires(preun): update-alternatives
%endif
Requires(pre): coreutils
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module pyasn1 >= 0.1.3}
@ -64,6 +75,10 @@ export LC_ALL=en_US.utf8
%python_clone -a %{buildroot}%{_bindir}/pyrsa-sign
%python_clone -a %{buildroot}%{_bindir}/pyrsa-verify
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative pyrsa-priv2pub
%post
%{python_install_alternative pyrsa-priv2pub pyrsa-decrypt pyrsa-encrypt pyrsa-keygen pyrsa-sign pyrsa-verify}