2012-05-19 20:51:15 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-rsa
|
|
|
|
#
|
2023-04-21 15:36:54 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2012-05-19 20:51:15 +02:00
|
|
|
#
|
|
|
|
# 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.
|
2012-11-23 12:19:49 +01:00
|
|
|
|
2018-12-04 15:01:02 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-05-19 20:51:15 +02:00
|
|
|
#
|
|
|
|
|
2012-11-23 12:19:49 +01:00
|
|
|
|
2021-11-06 11:27:02 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%bcond_without libalternatives
|
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
|
|
|
|
2017-05-17 17:15:23 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-12-09 13:02:50 +01:00
|
|
|
%define skip_python2 1
|
2023-04-21 15:36:54 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2012-05-19 20:51:15 +02:00
|
|
|
Name: python-rsa
|
2022-07-24 10:46:02 +02:00
|
|
|
Version: 4.9
|
2012-05-19 20:51:15 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Pure-Python RSA Implementation
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2020-08-17 08:16:23 +02:00
|
|
|
URL: https://stuvel.eu/rsa
|
2017-05-19 16:16:10 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/r/rsa/rsa-%{version}.tar.gz
|
2018-12-04 15:01:02 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-05-17 17:15:23 +02:00
|
|
|
BuildRequires: fdupes
|
2021-11-06 11:27:02 +01:00
|
|
|
BuildRequires: python-rpm-macros >= 20210929
|
2018-12-04 18:22:01 +01:00
|
|
|
Requires: python-pyasn1 >= 0.1.3
|
2021-11-06 11:27:02 +01:00
|
|
|
%if %{with libalternatives}
|
|
|
|
Requires: alts
|
|
|
|
BuildRequires: alts
|
|
|
|
%else
|
2018-12-04 18:22:01 +01:00
|
|
|
Requires(post): update-alternatives
|
2022-06-25 22:55:14 +02:00
|
|
|
Requires(preun):update-alternatives
|
2021-11-06 11:27:02 +01:00
|
|
|
%endif
|
|
|
|
Requires(pre): coreutils
|
2018-12-04 18:22:01 +01:00
|
|
|
BuildArch: noarch
|
2020-08-17 08:16:23 +02:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module pyasn1 >= 0.1.3}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
# /SECTION
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_subpackages
|
2012-05-19 20:51:15 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Python-RSA is a pure-Python RSA implementation. It supports encryption and
|
|
|
|
decryption, signing and verifying signatures, and key generation according to
|
|
|
|
PKCS#1 version 1.5.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n rsa-%{version}
|
|
|
|
|
|
|
|
%build
|
2019-03-23 19:54:39 +01:00
|
|
|
export LC_ALL=en_US.utf8
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_build
|
2012-05-19 20:51:15 +02:00
|
|
|
|
|
|
|
%install
|
2019-03-23 19:54:39 +01:00
|
|
|
export LC_ALL=en_US.utf8
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2015-05-16 15:22:48 +02:00
|
|
|
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-priv2pub
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-decrypt
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-encrypt
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-keygen
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-sign
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-verify
|
2013-10-12 01:58:18 +02:00
|
|
|
|
2021-11-06 11:27:02 +01:00
|
|
|
%pre
|
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
%python_libalternatives_reset_alternative pyrsa-priv2pub
|
|
|
|
|
2013-10-12 01:58:18 +02:00
|
|
|
%post
|
2019-02-18 08:38:22 +01:00
|
|
|
%{python_install_alternative pyrsa-priv2pub pyrsa-decrypt pyrsa-encrypt pyrsa-keygen pyrsa-sign pyrsa-verify}
|
2013-10-12 01:58:18 +02:00
|
|
|
|
|
|
|
%preun
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_uninstall_alternative pyrsa-priv2pub
|
|
|
|
|
|
|
|
%check
|
2020-12-09 13:02:50 +01:00
|
|
|
# don't run the static type checker test -- mypy is only available for the default python3 flavor
|
2022-06-25 22:55:14 +02:00
|
|
|
# pytest --ignore tests/test_mypy.py
|
2013-10-12 01:58:18 +02:00
|
|
|
|
2017-05-17 17:15:23 +02:00
|
|
|
%files %{python_files}
|
2018-12-04 18:22:01 +01:00
|
|
|
%license LICENSE
|
2020-06-23 17:43:48 +02:00
|
|
|
%doc README.md
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_alternative %{_bindir}/pyrsa-decrypt
|
|
|
|
%python_alternative %{_bindir}/pyrsa-encrypt
|
|
|
|
%python_alternative %{_bindir}/pyrsa-keygen
|
|
|
|
%python_alternative %{_bindir}/pyrsa-priv2pub
|
|
|
|
%python_alternative %{_bindir}/pyrsa-sign
|
|
|
|
%python_alternative %{_bindir}/pyrsa-verify
|
2020-12-09 13:02:50 +01:00
|
|
|
%{python_sitelib}/rsa
|
|
|
|
%{python_sitelib}/rsa-%{version}*-info
|
2012-05-19 20:51:15 +02:00
|
|
|
|
|
|
|
%changelog
|