[packages/python3-pytest-asyncio] - updated to 1.0.0, added -apidocs
qboosh
qboosh at pld-linux.org
Sat Jul 5 18:41:28 CEST 2025
commit 553fe465ab30d45a5acbcf90aa026bf61fce9bc6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jul 5 18:42:58 2025 +0200
- updated to 1.0.0, added -apidocs
bad-license-tag.patch | 13 --------
pytest-asyncio-tests.patch | 30 ++++++++++++++++++
python3-pytest-asyncio.spec | 74 ++++++++++++++++++++++++++++-----------------
3 files changed, 77 insertions(+), 40 deletions(-)
---
diff --git a/python3-pytest-asyncio.spec b/python3-pytest-asyncio.spec
index 77ae55a..4e1b252 100644
--- a/python3-pytest-asyncio.spec
+++ b/python3-pytest-asyncio.spec
@@ -1,35 +1,41 @@
#
# Conditional build:
+%bcond_without doc # Sphinx documentation
%bcond_without tests # unit tests
Summary: Pytest support for asyncio
Summary(pl.UTF-8): Wsparcie do asyncio dla Pytesta
Name: python3-pytest-asyncio
-Version: 0.26.0
+Version: 1.0.0
Release: 1
License: Apache v2.0
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/pytest-asyncio/
Source0: https://files.pythonhosted.org/packages/source/p/pytest-asyncio/pytest_asyncio-%{version}.tar.gz
-# Source0-md5: 6463f56f564ab33b34b9ab59a779f434
-Patch0: bad-license-tag.patch
+# Source0-md5: 84f54204d53c46291c412bce27562480
+Patch0: pytest-asyncio-tests.patch
URL: https://pypi.org/project/pytest-asyncio/
-BuildRequires: python3-modules >= 1:3.7
-BuildRequires: python3-setuptools >= 1:51.0
-#BuildRequires: python3-setuptools_scm >= 6.2
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.9
+BuildRequires: python3-setuptools >= 1:77
+BuildRequires: python3-setuptools_scm >= 6.2
BuildRequires: python3-toml
%if %{with tests}
-BuildRequires: python3-flaky >= 3.5.0
+BuildRequires: python3-coverage >= 6.2
BuildRequires: python3-hypothesis >= 5.7.1
-BuildRequires: python3-pytest >= 6.1.0
-BuildRequires: python3-pytest-trio
-%if "%{py3_ver}" == "3.7"
-BuildRequires: python3-typing_extensions >= 3.7.2
+BuildRequires: python3-pytest >= 8.2
+%if "%{_ver_lt %{py3_ver} 3.10}" == "1"
+BuildRequires: python3-typing_extensions >= 4.12
%endif
%endif
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-Requires: python3-modules >= 1:3.7
+BuildRequires: rpmbuild(macros) >= 2.044
+%if %{with doc}
+BuildRequires: python3-sphinx_rtd_theme >= 1
+BuildRequires: sphinx-pdg-3 >= 5.3
+%endif
+Requires: python3-modules >= 1:3.9
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -51,32 +57,40 @@ Kod asyncio jest zwykle pisany w postaci korutyn, co nieco utrudnia
testowanie przy użyciu zwykłych narzędzi testowych. pytest-asyncio
dostarcza przydatne wyposażenie i znaczniki ułatwiające testowanie.
+%package apidocs
+Summary: API documentation for Python pytest_asyncio module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona pytest_asyncio
+Group: Documentation
+
+%description apidocs
+API documentation for Python pytest_asyncio module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona pytest_asyncio.
+
%prep
%setup -q -n pytest_asyncio-%{version}
-%patch -P 0 -p1
-
-# stub for setuptools
-cat >setup.py <<EOF
-from setuptools import setup
-setup()
-EOF
+%patch -P0 -p1
%build
-%py3_build
+%py3_build_pyproject
%if %{with tests}
-# test_flaky_integration failure: no expected report found
-# test_legacy_mode failures: more warnings than expected
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS="pytest_asyncio.plugin,pytest_trio.plugin" \
+PYTEST_PLUGINS="pytest_asyncio.plugin" \
PYTHONPATH=$(pwd) \
-%{__python3} -m pytest tests -k 'not test_flaky_integration and not test_legacy_mode'
+%{__python3} -m pytest tests
+%endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd) \
+sphinx-build-3 -b html docs docs/_build/html
%endif
%install
rm -rf $RPM_BUILD_ROOT
-%py3_install
+%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
@@ -85,4 +99,10 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc README.rst
%{py3_sitescriptdir}/pytest_asyncio
-%{py3_sitescriptdir}/pytest_asyncio-%{version}-py*.egg-info
+%{py3_sitescriptdir}/pytest_asyncio-%{version}.dist-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,how-to-guides,reference,*.html,*.js}
+%endif
diff --git a/bad-license-tag.patch b/bad-license-tag.patch
deleted file mode 100644
index b4ec78d..0000000
--- a/bad-license-tag.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- pytest_asyncio-0.26.0/pyproject.toml.orig 2025-03-25 07:19:03.000000000 +0100
-+++ pytest_asyncio-0.26.0/pyproject.toml 2025-03-27 23:45:00.176648808 +0100
-@@ -10,10 +10,6 @@
- description = "Pytest support for asyncio"
- readme.content-type = "text/x-rst"
- readme.file = "README.rst"
--license = "Apache-2.0"
--license-files = [
-- "LICENSE",
--]
- authors = [
- { name = "Tin Tvrtković <tinchester at gmail.com>", email = "tinchester at gmail.com" },
- ]
diff --git a/pytest-asyncio-tests.patch b/pytest-asyncio-tests.patch
new file mode 100644
index 0000000..8801d63
--- /dev/null
+++ b/pytest-asyncio-tests.patch
@@ -0,0 +1,30 @@
+Adjust for pytest_asyncio already loaded via environment variable
+--- pytest_asyncio-1.0.0/tests/test_event_loop_fixture.py.orig 2025-05-26 06:48:36.000000000 +0200
++++ pytest_asyncio-1.0.0/tests/test_event_loop_fixture.py 2025-07-05 16:44:19.637737992 +0200
+@@ -65,7 +65,7 @@ def test_event_loop_fixture_handles_uncl
+ import asyncio
+ import pytest
+
+- pytest_plugins = 'pytest_asyncio'
++ # pytest_plugins = 'pytest_asyncio'
+
+ @pytest.mark.asyncio
+ async def test_something():
+@@ -92,7 +92,7 @@ def test_event_loop_already_closed(
+ import asyncio
+ import pytest
+ import pytest_asyncio
+- pytest_plugins = 'pytest_asyncio'
++ # pytest_plugins = 'pytest_asyncio'
+
+ @pytest_asyncio.fixture
+ async def _event_loop():
+@@ -124,7 +124,7 @@ def test_event_loop_fixture_asyncgen_err
+ import asyncio
+ import pytest
+
+- pytest_plugins = 'pytest_asyncio'
++ # pytest_plugins = 'pytest_asyncio'
+
+ @pytest.mark.asyncio
+ async def test_something():
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest-asyncio.git/commitdiff/553fe465ab30d45a5acbcf90aa026bf61fce9bc6
More information about the pld-cvs-commit
mailing list