commit 172351c3343086d5d15ee72338d4282b69d808a2 Author: tigro Date: Mon Feb 12 20:37:44 2024 +0300 import python-pytest-asyncio-0.18.3-1.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c5ab9e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pytest-asyncio-0.18.3.tar.gz diff --git a/.python-pytest-asyncio.metadata b/.python-pytest-asyncio.metadata new file mode 100644 index 0000000..e8dbe26 --- /dev/null +++ b/.python-pytest-asyncio.metadata @@ -0,0 +1 @@ +5ceaa61a4c2a7ef4c141e7051a6e77280290c3d9 SOURCES/pytest-asyncio-0.18.3.tar.gz diff --git a/SPECS/python-pytest-asyncio.spec b/SPECS/python-pytest-asyncio.spec new file mode 100644 index 0000000..d7bf3de --- /dev/null +++ b/SPECS/python-pytest-asyncio.spec @@ -0,0 +1,94 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.2.5) +%define autorelease(e:s:pb:) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} +## END: Set by rpmautospec + +%global srcname pytest-asyncio +%global _description %{expand: +pytest-asyncio is an Apache2 licensed library, written in Python, for testing +asyncio code with pytest. + +asyncio code is usually written in the form of coroutines, which makes it +slightly more difficult to test using normal testing tools. pytest-asyncio +provides useful fixtures and markers to make testing easier.} + +%if %{undefined el9} +# EL9 missing pytest-trio +%bcond_without tests +%endif + +Name: python-%{srcname} +Version: 0.18.3 +Release: %autorelease +Summary: Pytest support for asyncio +License: ASL 2.0 +URL: https://github.com/pytest-dev/pytest-asyncio +Source: %pypi_source +BuildArch: noarch +BuildRequires: python3-devel + + +%description %{_description} + + +%package -n python3-%{srcname} +Summary: %{summary} + + +%description -n python3-%{srcname} %{_description} + + +%prep +%autosetup -n %{srcname}-%{version} + +# disable code quality checks in "testing" extras +sed -e '/coverage==/d' \ + -e '/mypy ==/d' \ + -i setup.cfg + +%if %{defined el9} +# EL9 has setuptools_scm 6.0.1 that works +sed -e '/setuptools_scm/ s/>=6.2//' -i pyproject.toml +%endif + + +%generate_buildrequires +# upstream also has tox that invokes make that invokes pytest... +# we install the [testing] extra and will invoke pytest directly instead +%pyproject_buildrequires %{?with_tests:-x testing} + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files pytest_asyncio + + +%check +%if %{with tests} +# tests/modes/test_legacy_mode.py fails when pytest is invoked by /usr/bin/pytest +# using python -m pytest works: +%global __pytest %{python3} -m pytest +%pytest +%else +%pyproject_check_import +%endif + + +%files -n python3-%{srcname} -f %{pyproject_files} +%doc README.rst CHANGELOG.rst + + +%changelog +* Mon Feb 12 2024 Arkady L. Shane - 0.18.3-1 +- Rebuilt for MSVSphere 9.3 + +* Wed Apr 20 2022 Carl George 0.18.3-1 +- Renamed from python3-pytest-asyncio (resolves: rhbz#2076825)