diff --git a/python-rsa.spec b/python-rsa.spec new file mode 100644 index 0000000000000000000000000000000000000000..a335e008433c33d7dd68a83d852f2ab9f6647cf2 --- /dev/null +++ b/python-rsa.spec @@ -0,0 +1,89 @@ +%define anolis_release 1 + +%global pypi_name rsa + +Name: python-%{pypi_name} +Version: 4.8 +Release: %{anolis_release}%{dist} +Summary: Pure-Python RSA implementation +License: ASL 2.0 +URL: http://stuvel.eu/rsa +Source0: https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +%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. It can be used as a Python library as +well as on the command-line. + +%package -n python3-%{pypi_name} +Summary: Pure-Python RSA implementation +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pyasn1 >= 0.1.3 +Requires: python3-pyasn1 >= 0.1.3 +Requires: python3-setuptools + +%description -n python3-%{pypi_name} +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. It can be used as a Python library as +well as on the command-line. + +%package -n python3-%{pypi_name}-doc +Summary: Documentation files for %{name} +Requires: python3-%{pypi_name} = %{EVR} +BuildArch: noarch + +%description -n python3-%{pypi_name}-doc +The %{name}-doc package contains documentation files for %{name}. + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%py3_build + +%install +%py3_install +cp %{buildroot}%{_bindir}/pyrsa-priv2pub %{buildroot}%{_bindir}/pyrsa-priv2pub-3 +cp %{buildroot}%{_bindir}/pyrsa-keygen %{buildroot}%{_bindir}/pyrsa-keygen-3 +cp %{buildroot}%{_bindir}/pyrsa-encrypt %{buildroot}%{_bindir}/pyrsa-encrypt-3 +cp %{buildroot}%{_bindir}/pyrsa-decrypt %{buildroot}%{_bindir}/pyrsa-decrypt-3 +cp %{buildroot}%{_bindir}/pyrsa-sign %{buildroot}%{_bindir}/pyrsa-sign-3 +cp %{buildroot}%{_bindir}/pyrsa-verify %{buildroot}%{_bindir}/pyrsa-verify-3 + +%generate_compatibility_deps + +%files -n python3-%{pypi_name} +%license LICENSE +%{_bindir}/pyrsa-priv2pub +%{_bindir}/pyrsa-keygen +%{_bindir}/pyrsa-encrypt +%{_bindir}/pyrsa-decrypt +%{_bindir}/pyrsa-sign +%{_bindir}/pyrsa-verify +%{_bindir}/pyrsa-priv2pub-3 +%{_bindir}/pyrsa-keygen-3 +%{_bindir}/pyrsa-encrypt-3 +%{_bindir}/pyrsa-decrypt-3 +%{_bindir}/pyrsa-sign-3 +%{_bindir}/pyrsa-verify-3 +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ + +%check +# Disabled following https://github.com/sybrenstuvel/python-rsa/issues/153 +# As for the multiple comments, it seems more like a test problem than a code problem +# Please re-enable tests as soon as that Issue got solved +# %{__python3} setup.py test + +%files -n python3-%{pypi_name}-doc +%doc README.md + +%changelog +* Wed Mar 29 2023 yuanhui - 4.8-1 +- Init package from upstream diff --git a/rsa-4.8.tar.gz b/rsa-4.8.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..695b9c9434f27dd3d37eeee2cc982171f0814a2b Binary files /dev/null and b/rsa-4.8.tar.gz differ