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
%global with_docs 0
a4f3949
a4f3949
a4f3949
Name:           python-%{pkgname}
a4f3949
Version:        1.0
7434095
Release:        4%{?dist}
a4f3949
Summary:        %{summary}
a4f3949
a4f3949
License:        ASL 2.0
a4f3949
URL:            https://github.com/aio-libs/aiosmtpd
a4f3949
Source0:        https://pypi.org/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz
a4f3949
BuildArch:      noarch
a4f3949
a4f3949
BuildRequires:  python-srpm-macros
a4f3949
BuildRequires:  python%{python3_pkgversion}-devel >= 3.4
a4f3949
BuildRequires:  python%{python3_pkgversion}-setuptools
a4f3949
BuildRequires:  python%{python3_pkgversion}-atpublic
a4f3949
BuildRequires:  python%{python3_pkgversion}-nose2
a4f3949
BuildRequires:  python%{python3_pkgversion}-flufl-testing
a4f3949
%if 0%{?with_docs}
a4f3949
BuildRequires:  python%{python3_pkgversion}-sphinx
a4f3949
%endif
a4f3949
%if 0%{?with_python3_other}
a4f3949
BuildRequires:  python%{python3_other_pkgversion}-devel >= 3.4
a4f3949
BuildRequires:  python%{python3_other_pkgversion}-setuptools
a4f3949
BuildRequires:  python%{python3_other_pkgversion}-atpublic
a4f3949
BuildRequires:  python%{python3_other_pkgversion}-nose2
a4f3949
BuildRequires:  python%{python3_other_pkgversion}-flufl-testing
a4f3949
%endif
a4f3949
a4f3949
%description %{_description}
a4f3949
a4f3949
a4f3949
%package -n python%{python3_pkgversion}-%{pkgname}
a4f3949
Summary:        %{summary}
a4f3949
Requires:       python%{python3_pkgversion}-atpublic
a4f3949
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
a4f3949
a4f3949
%description -n python%{python3_pkgversion}-%{pkgname} %{_description}
a4f3949
a4f3949
a4f3949
%if 0%{?with_python3_other}
a4f3949
%package -n python%{python3_other_pkgversion}-%{pkgname}
a4f3949
Summary:        %{summary}
a4f3949
Requires:       python%{python3_other_pkgversion}-atpublic
a4f3949
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{pkgname}}
a4f3949
a4f3949
%description -n python%{python3_other_pkgversion}-%{pkgname} %{_description}
a4f3949
%endif
a4f3949
a4f3949
a4f3949
%prep
a4f3949
%autosetup -n %{srcname}-%{version}
a4f3949
a4f3949
a4f3949
%build
a4f3949
%py3_build
a4f3949
%if 0%{?with_python3_other}
a4f3949
%py3_other_build
a4f3949
%endif
a4f3949
%if 0%{?with_docs}
a4f3949
%{__python3} setup.py build_sphinx
a4f3949
%endif
a4f3949
a4f3949
a4f3949
%install
a4f3949
%py3_install
a4f3949
# Cleanups
a4f3949
rm -rf %{buildroot}%{python3_sitelib}/examples
a4f3949
rm -f  %{buildroot}%{python3_sitelib}/aiosmtpd/docs/.gitignore
a4f3949
a4f3949
%if 0%{?with_python3_other}
a4f3949
%py3_other_install
a4f3949
# Avoid name clash
a4f3949
mv %{buildroot}%{_bindir}/aiosmtpd \
a4f3949
   %{buildroot}%{_bindir}/aiosmtpd-%{python3_other_version}
a4f3949
# Cleanups
a4f3949
rm -rf %{buildroot}%{python3_other_sitelib}/examples
a4f3949
rm -f  %{buildroot}%{python3_other_sitelib}/aiosmtpd/docs/.gitignore
a4f3949
%endif
a4f3949
a4f3949
a4f3949
%check
a4f3949
%{__python3} -m nose2 -v
a4f3949
%if 0%{?with_python3_other}
a4f3949
%{__python3_other} -m nose2 -v
a4f3949
%endif
a4f3949
a4f3949
a4f3949
%files -n python%{python3_pkgversion}-%{pkgname}
a4f3949
%doc README.rst examples
a4f3949
%if 0%{?with_docs}
a4f3949
%doc build/sphinx/html
a4f3949
%endif
a4f3949
%{_bindir}/aiosmtpd
a4f3949
%{python3_sitelib}/aiosmtpd/
a4f3949
%{python3_sitelib}/%{srcname}-%{version}*-py%{python3_version}.egg-info/
a4f3949
a4f3949
%if 0%{?with_python3_other}
a4f3949
%files -n python%{python3_other_pkgversion}-%{pkgname}
a4f3949
%doc README.rst examples build/sphinx/html
a4f3949
%{_bindir}/aiosmtpd-%{python3_other_version}
a4f3949
%{python3_other_sitelib}/aiosmtpd/
a4f3949
%{python3_other_sitelib}/%{srcname}-%{version}*-py%{python3_other_version}.egg-info/
a4f3949
%endif
a4f3949
a4f3949
a4f3949
%changelog
7434095
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-4
7434095
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7434095
30b8328
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-3
30b8328
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
30b8328
cd988fe
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-2
cd988fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cd988fe
a4f3949
* Sat Jun 03 2017 Aurelien Bompard <abompard@fedoraproject.org> - 1.0-0.1.a5
a4f3949
- Update to 1.0 final.
a4f3949
a4f3949
* Mon Apr 10 2017 Aurelien Bompard <abompard@fedoraproject.org> - 1.0-0.1.a5
a4f3949
- Update to 1.0a5.
a4f3949
a4f3949
* Wed Dec 14 2016 Aurelien Bompard <abompard@fedoraproject.org> - 1.0-0.1.a4
a4f3949
- Initial package.