## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %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 python3_pkgversion 38 %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_with tests %endif Name: python%{python3_pkgversion}-%{srcname}-epel 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: pyproject-rpm-macros BuildRequires: python%{python3_pkgversion}-devel BuildRequires: %{py3_dist setuptools} BuildRequires: %{py3_dist pytest} %if %{with tests} BuildRequires: %{py3_dist pytest-trio} BuildRequires: %{py3_dist hypothesis} BuildRequires: %{py3_dist flaky} %endif %description %{_description} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} %description -n python%{python3_pkgversion}-%{srcname} %{_description} %prep %autosetup -n %{srcname}-%{version} # disable code quality checks in "testing" extras and relax pytest req sed -e '/coverage==/d' \ -e '/mypy ==/d' \ -e 's|pytest >= .*$|pytest|' \ -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 %{?pyproject_buildrequires: %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 python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc README.rst CHANGELOG.rst %changelog * Mon Jun 27 2022 Maxwell G 0.18.3-1 - Uncommitted changes