2019-09-12 11:26:53 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-aiosmtpd
|
|
|
|
|
#
|
2025-06-16 12:17:10 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2019-09-12 11:26:53 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2025-06-16 12:17:10 +00:00
|
|
|
%bcond_without libalternatives
|
2023-06-15 20:05:48 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-09-12 11:26:53 +00:00
|
|
|
Name: python-aiosmtpd
|
2024-05-20 11:21:32 +00:00
|
|
|
Version: 1.4.6
|
2019-09-12 11:26:53 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: SMTP server based on asyncio
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
URL: https://aiosmtpd.readthedocs.io/
|
2024-03-13 16:35:19 +00:00
|
|
|
Source: https://github.com/aio-libs/aiosmtpd/archive/v%{version}.tar.gz#/aiosmtpd-%{version}.tar.gz
|
2024-11-27 23:08:56 +00:00
|
|
|
# PATCH-FIX-UPSTREAM Based on gh#aio-libs/aiosmtpd#473
|
|
|
|
|
Patch0: support-python-313.patch
|
|
|
|
|
BuildRequires: %{python_module pip}
|
2019-09-12 11:26:53 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2024-11-27 23:08:56 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2025-06-16 12:17:10 +00:00
|
|
|
BuildRequires: alts
|
2019-09-12 11:26:53 +00:00
|
|
|
BuildRequires: fdupes
|
2021-03-22 22:17:11 +00:00
|
|
|
BuildRequires: git-core
|
2019-09-12 11:26:53 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2025-06-16 12:17:10 +00:00
|
|
|
Requires: alts
|
2019-09-12 11:26:53 +00:00
|
|
|
Requires: python-atpublic
|
2021-05-04 13:57:17 +00:00
|
|
|
Requires: python-attrs
|
2019-09-12 11:26:53 +00:00
|
|
|
Requires: user(nobody)
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module atpublic}
|
2021-05-04 13:57:17 +00:00
|
|
|
BuildRequires: %{python_module attrs}
|
2024-04-01 12:24:10 +00:00
|
|
|
BuildRequires: %{python_module pytest-asyncio}
|
2021-03-22 22:17:11 +00:00
|
|
|
BuildRequires: %{python_module pytest-mock}
|
2019-09-12 11:26:53 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
BuildRequires: user(nobody)
|
|
|
|
|
# /SECTION
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
2021-11-19 22:50:04 +00:00
|
|
|
The Python standard library includes a basic SMTP server in the smtpd module,
|
|
|
|
|
based on the old asynchronous libraries asyncore and asynchat. These modules
|
|
|
|
|
are quite old and are definitely showing their age; asyncore and asynchat are
|
|
|
|
|
difficult APIs to work with, understand, extend, and fix.
|
|
|
|
|
|
|
|
|
|
With the introduction of the asyncio module in Python 3.4, a much better way of
|
|
|
|
|
doing asynchronous I/O is now available. It seems obvious that an asyncio-based
|
|
|
|
|
version of the SMTP and related protocols are needed for Python 3. This project
|
|
|
|
|
brings together several highly experienced Python developers collaborating on
|
|
|
|
|
this reimplementation.
|
|
|
|
|
|
|
|
|
|
This package provides such an implementation of both the SMTP and LMTP protocols.
|
2019-09-12 11:26:53 +00:00
|
|
|
|
|
|
|
|
%prep
|
2024-03-14 07:07:08 +00:00
|
|
|
%autosetup -p1 -n aiosmtpd-%{version}
|
2019-09-12 11:26:53 +00:00
|
|
|
|
2024-03-14 07:12:16 +00:00
|
|
|
# Don't bother with the code coverage while packaging
|
|
|
|
|
sed -i '/--cov=/d' pytest.ini
|
|
|
|
|
|
2019-09-12 11:26:53 +00:00
|
|
|
%build
|
2024-11-27 23:08:56 +00:00
|
|
|
%pyproject_wheel
|
2019-09-12 11:26:53 +00:00
|
|
|
|
|
|
|
|
%install
|
2024-11-27 23:08:56 +00:00
|
|
|
%pyproject_install
|
2020-05-28 07:34:03 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/aiosmtpd
|
2019-09-12 11:26:53 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
2024-04-01 12:24:10 +00:00
|
|
|
ignore=""
|
|
|
|
|
|
|
|
|
|
%if 0%{?sle_version}
|
|
|
|
|
# One of the tests in this file breaks the tests client state for
|
|
|
|
|
# Leap, so it's ignored for now.
|
|
|
|
|
ignore="--ignore aiosmtpd/tests/test_server.py"
|
2021-11-19 22:50:04 +00:00
|
|
|
%endif
|
2019-09-12 11:26:53 +00:00
|
|
|
|
2024-04-01 12:24:10 +00:00
|
|
|
%pytest $ignore
|
|
|
|
|
|
2025-06-16 12:17:10 +00:00
|
|
|
%pre
|
|
|
|
|
%python_libalternatives_reset_alternative aiosmtpd
|
2020-05-28 07:34:03 +00:00
|
|
|
|
2019-09-12 11:26:53 +00:00
|
|
|
%files %{python_files}
|
|
|
|
|
%doc README.rst
|
2024-03-14 07:07:08 +00:00
|
|
|
%license LICENSE
|
2020-05-28 07:34:03 +00:00
|
|
|
%python_alternative %{_bindir}/aiosmtpd
|
2021-05-04 13:57:17 +00:00
|
|
|
%{python_sitelib}/aiosmtpd
|
2024-11-27 23:08:56 +00:00
|
|
|
%{python_sitelib}/aiosmtpd-%{version}.dist-info
|
2021-05-04 13:57:17 +00:00
|
|
|
%exclude %{python_sitelib}/aiosmtpd/docs
|
2019-09-12 11:26:53 +00:00
|
|
|
|
|
|
|
|
%changelog
|