%global pypi_name pycryptodome Name: python-%{pypi_name} Version: 3.8.2 Release: 1%{?dist} Summary: Cryptographic library for Python License: BSD, Public Domain, Apache URL: https://www.pycryptodome.org Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildRequires: python3-devel BuildRequires: gcc BuildRequires: python3dist(setuptools) %description PyCryptodome PyCryptodome is a self-contained Python package of low-level cryptographic primitives. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} PyCryptodome PyCryptodome is a self-contained Python package of low-level cryptographic primitives.It supports Python 2.6 and 2.7, Python 3.4 and newer, and PyPy.You can install it with:: pip install pycryptodomeAll modules are installed under the Crypto package.Check the pycryptodomex_ project for the equivalent library that works under the Cryptodome package.PyCryptodome is a fork of... %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build # Use -fno-strict-aliasing in order to bypass: # https://github.com/Legrandin/pycryptodome/issues/291 export CFLAGS="%{optflags} -fno-strict-aliasing" %py3_build %install %py3_install %check %{__python3} setup.py test %files -n python3-%{pypi_name} %license LICENSE.rst Doc/src/license.rst Doc/ocb/license1.pdf Doc/ocb/license3.pdf Doc/ocb/license2.pdf Doc/LEGAL/copy/LICENSE.orig Doc/LEGAL/copy/LICENSE.python-2.2 Doc/LEGAL/copy/LICENSE.libtom %doc README.rst lib/Crypto/SelfTest/Hash/test_vectors/keccak/readme.txt lib/Crypto/SelfTest/Signature/test_vectors/ECDSA/README.txt lib/Crypto/SelfTest/Cipher/test_vectors/TDES/README.txt lib/Crypto/SelfTest/Cipher/test_vectors/AES/README.txt Doc/ocb/README.txt %{python3_sitearch}/Crypto %{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %changelog