[packages/python3-aiosmtpd] - new; with patch for more pkg_resources deprecations

qboosh qboosh at pld-linux.org
Sun Feb 15 12:43:33 CET 2026


commit 2e4a18603757579b768d56b6b1e5f4128f316112
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Feb 15 12:43:21 2026 +0100

    - new; with patch for more pkg_resources deprecations

 aiosmtpd-warnings.patch |  11 ++++++
 python3-aiosmtpd.spec   | 100 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 111 insertions(+)
---
diff --git a/python3-aiosmtpd.spec b/python3-aiosmtpd.spec
new file mode 100644
index 0000000..578374b
--- /dev/null
+++ b/python3-aiosmtpd.spec
@@ -0,0 +1,100 @@
+#
+# Conditional build:
+%bcond_without	doc	# API documentation
+%bcond_without	tests	# unit tests
+
+Summary:	asyncio based SMTP server
+Summary(pl.UTF-8):	Serwer SMTP oparty na asyncio
+Name:		python3-aiosmtpd
+Version:	1.4.6
+Release:	1
+License:	Apache v2.0
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/aiosmtpd/
+Source0:	https://files.pythonhosted.org/packages/source/a/aiosmtpd/aiosmtpd-%{version}.tar.gz
+# Source0-md5:	d9d2a7c9aff2d7a579c6d20777930a71
+Patch0:		aiosmtpd-warnings.patch
+URL:		https://pypi.org/project/aiosmtpd/
+BuildRequires:	python3-modules >= 1:3.8
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-atpublic >= 4.1.0
+BuildRequires:	python3-attrs >= 23.2.0
+BuildRequires:	python3-pytest >= 8.2.0
+BuildRequires:	python3-pytest-asyncio >= 0.23.6
+BuildRequires:	python3-pytest-cov >= 5.0.0
+BuildRequires:	python3-pytest-mock >= 3.14.0
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	python3-sphinx_autofixture >= 0.4.0
+BuildRequires:	python3-sphinx_rtd_theme >= 2.0.0
+BuildRequires:	sphinx-pdg-3 >= 7.3.7
+%endif
+Requires:	python3-modules >= 1:3.8
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is a server for SMTP and related MTA protocols, similar in
+utility to the standard library's smtpd.py module, but rewritten to be
+based on asyncio.
+
+%description -l pl.UTF-8
+Serwer SMTP i powiązanych protokołów MTA, podobnie działający do
+modułu smtpd.py z biblioteki standardowej, ale przepisany w oparciu o
+asyncio.
+
+%package apidocs
+Summary:	API documentation for Python aiosmtpd module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona aiosmtpd
+Group:		Documentation
+
+%description apidocs
+API documentation for Python aiosmtpd module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona aiosmtpd.
+
+%prep
+%setup -q -n aiosmtpd-%{version}
+%patch -P0 -p1
+
+%build
+%py3_build
+
+%if %{with tests}
+# aiosmtpd/tests/test_server.py::TestUnthreaded::test_unixsocket fails for me
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_asyncio.plugin,pytest_cov.plugin,pytest_mock.plugin \
+%{__python3} -m pytest aiosmtpd/tests -k 'not test_unixsocket'
+%endif
+
+%if %{with doc}
+%{__make} -C aiosmtpd/docs html \
+	SPHINXBUILD=sphinx-build-3
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/aiosmtpd/{docs,tests}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc DESCRIPTION.rst NOTICE README.rst
+%attr(755,root,root) %{_bindir}/aiosmtpd
+%{py3_sitescriptdir}/aiosmtpd
+%{py3_sitescriptdir}/aiosmtpd-%{version}-py*.egg-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc aiosmtpd/docs/_build/html/{_static,*.html,*.js}
+%endif
diff --git a/aiosmtpd-warnings.patch b/aiosmtpd-warnings.patch
new file mode 100644
index 0000000..cf5fd73
--- /dev/null
+++ b/aiosmtpd-warnings.patch
@@ -0,0 +1,11 @@
+--- aiosmtpd-1.4.6/pytest.ini.orig	2024-05-18 13:37:31.000000000 +0200
++++ aiosmtpd-1.4.6/pytest.ini	2026-02-15 12:11:01.312683567 +0100
+@@ -15,6 +15,8 @@ filterwarnings =
+     error
+     # TODO: Replace pkg_resources
+     ignore:pkg_resources is deprecated as an API:DeprecationWarning
++    ignore:pkg_resources is deprecated as an API:UserWarning
++    ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning
+     # TODO: Fix resource warnings
+     ignore:unclosed transport:ResourceWarning
+     ignore:unclosed <socket.socket:ResourceWarning
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-aiosmtpd.git/commitdiff/2e4a18603757579b768d56b6b1e5f4128f316112



More information about the pld-cvs-commit mailing list