%global pypi_name dkimpy Name: python-%{pypi_name} Version: 1.0.2 Release: 1%{?dist} Summary: DKIM, ARC and TLSRPT email signing and verification License: BSD-like URL: https://launchpad.net/dkimpy Source0: %pypi_source BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(aiodns) BuildRequires: python3dist(authres) BuildRequires: python3dist(dnspython) BuildRequires: python3dist(pynacl) BuildRequires: python3dist(setuptools) %description dkimpy is a library that implements DKIM (DomainKeys Identified Mail), ARC (Authenticated Receive Chain), and TLSRPT (TLS Report) email signing and verification. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3dist(aiodns) Requires: python3dist(authres) Requires: python3dist(dnspython) Requires: python3dist(pynacl) Requires: python3dist(setuptools) %description -n python3-%{pypi_name} dkimpy is a library that implements DKIM (DomainKeys Identified Mail), ARC (Authenticated Receive Chain), and TLSRPT (TLS Report) email signing and verification. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info. rm -rf %{pypi_name}.egg-info # Fix tests import. sed -i 's/from tests import test_suite/from dkim.tests import test_suite/' dkim/__main__.py %build %py3_build %install %py3_install %check # NOTE: We need to manually set the PYTHONPATH environment variable so that the # newly built Python package is found. PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{__python3} setup.py test %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{_bindir}/arcsign %{_bindir}/arcverify %{_bindir}/dkimsign %{_bindir}/dkimverify %{_bindir}/dknewkey %{python3_sitelib}/dkim %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %{_mandir}/man1/arcsign.1.gz %{_mandir}/man1/arcverify.1.gz %{_mandir}/man1/dkimsign.1.gz %{_mandir}/man1/dkimverify.1.gz %{_mandir}/man1/dknewkey.1.gz %changelog * Thu Jan 02 2020 Tadej Janež - 1.0.2-1 - Initial package