a4f3949
%global pkgname aiosmtpd
a4f3949
%global summary Asyncio-based SMTP server
a4f3949
%global _description \
a4f3949
This is a server for SMTP and related protocols, similar in utility \
a4f3949
to the standard library’s smtpd.py module, but rewritten to be based \
a4f3949
on asyncio for Python 3.
a4f3949
%global srcname %{pkgname}
a4f3949
a4f3949
a4f3949
Name:           python-%{pkgname}
e68b577
Version:        1.4.4.post2
3a89b7a
Release:        %autorelease
a4f3949
Summary:        %{summary}
a4f3949
78c31c0
License:        Apache-2.0
a4f3949
URL:            https://github.com/aio-libs/aiosmtpd
c6b9cd8
Source0:        %{url}/archive/%{version}/%{pkgname}-%{version}.tar.gz
da26e58
a4f3949
BuildArch:      noarch
500db99
78c31c0
BuildRequires:  python%{python3_pkgversion}-devel
c6b9cd8
# Required for tests
c6b9cd8
BuildRequires:  git-core
a4f3949
a4f3949
%description %{_description}
a4f3949
a4f3949
a4f3949
%package -n python%{python3_pkgversion}-%{pkgname}
a4f3949
Summary:        %{summary}
a4f3949
a4f3949
%description -n python%{python3_pkgversion}-%{pkgname} %{_description}
a4f3949
a4f3949
a4f3949
%prep
500db99
%autosetup -p1 -n %{srcname}-%{version}
78c31c0
# Remove unused cosmetic dependencies to tests
78c31c0
sed -i 's/pytest-print//' tox.ini
78c31c0
sed -i 's/pytest-sugar//' tox.ini
78c31c0
sed -i 's/pytest-profiling//' tox.ini
78c31c0
# Remove unused linter dependency
78c31c0
sed -i 's/bandit//' tox.ini
78c31c0
78c31c0
rm aiosmtpd/docs/.gitignore
78c31c0
rm examples/authenticated_relayer/.gitignore
78c31c0
78c31c0
%generate_buildrequires
78c31c0
%pyproject_buildrequires -t -e nocov
a4f3949
a4f3949
a4f3949
%build
78c31c0
%pyproject_wheel
a4f3949
a4f3949
a4f3949
%install
78c31c0
%pyproject_install
78c31c0
78c31c0
%pyproject_save_files %{pkgname}
a4f3949
a4f3949
a4f3949
%check
63fefb1
%{__python3} -m pytest -v -k "not (unknown_args_ or factory_none or noexc_smtpd_missing)"
78c31c0
# %%tox
a4f3949
a4f3949
78c31c0
%files -n python%{python3_pkgversion}-%{pkgname} -f %{pyproject_files}
78c31c0
%license LICENSE
a4f3949
%doc README.rst examples
a4f3949
%{_bindir}/aiosmtpd
a4f3949
a4f3949
a4f3949
%changelog
3a89b7a
%autochangelog