Blob Blame History Raw
%global pkgname aiosmtpd
%global summary Asyncio-based SMTP server
%global _description \
This is a server for SMTP and related protocols, similar in utility \
to the standard library’s module, but rewritten to be based \
on asyncio for Python 3.
%global srcname %{pkgname}

Name:           python-%{pkgname}
Version:        1.4.4.post2
Release:        %autorelease
Summary:        %{summary}

License:        Apache-2.0
Source0:        %{url}/archive/%{version}/%{pkgname}-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
# Required for tests
BuildRequires:  git-core

%description %{_description}

%package -n python%{python3_pkgversion}-%{pkgname}
Summary:        %{summary}

%description -n python%{python3_pkgversion}-%{pkgname} %{_description}

%autosetup -p1 -n %{srcname}-%{version}
# Remove unused cosmetic dependencies to tests
sed -i 's/pytest-print//' tox.ini
sed -i 's/pytest-sugar//' tox.ini
sed -i 's/pytest-profiling//' tox.ini
# Remove unused linter dependency
sed -i 's/bandit//' tox.ini

rm aiosmtpd/docs/.gitignore
rm examples/authenticated_relayer/.gitignore

%pyproject_buildrequires -t -e nocov



%pyproject_save_files %{pkgname}

%{__python3} -m pytest -v -k "not (unknown_args_ or factory_none or noexc_smtpd_missing)"
# %%tox

%files -n python%{python3_pkgversion}-%{pkgname} -f %{pyproject_files}
%license LICENSE
%doc README.rst examples