|
rdobuilder |
0c4502 |
## START: Set by rpmautospec
|
|
rdobuilder |
0c4502 |
## (rpmautospec version 0.2.6)
|
|
rdobuilder |
0c4502 |
%define autorelease(e:s:pb:) %{?-p:0.}%{lua:
|
|
rdobuilder |
0c4502 |
release_number = 4;
|
|
rdobuilder |
0c4502 |
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
rdobuilder |
0c4502 |
print(release_number + base_release_number - 1);
|
|
rdobuilder |
0c4502 |
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist}
|
|
rdobuilder |
0c4502 |
## END: Set by rpmautospec
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%global srcname pytest-asyncio
|
|
rdobuilder |
0c4502 |
%global _description %{expand:
|
|
rdobuilder |
0c4502 |
pytest-asyncio is an Apache2 licensed library, written in Python, for testing
|
|
rdobuilder |
0c4502 |
asyncio code with pytest.
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
asyncio code is usually written in the form of coroutines, which makes it
|
|
rdobuilder |
0c4502 |
slightly more difficult to test using normal testing tools. pytest-asyncio
|
|
rdobuilder |
0c4502 |
provides useful fixtures and markers to make testing easier.}
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%if %{undefined el9}
|
|
rdobuilder |
0c4502 |
# EL9 missing pytest-trio
|
|
rdobuilder |
0c4502 |
%bcond_without tests
|
|
rdobuilder |
0c4502 |
%endif
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
Name: python-%{srcname}
|
|
rdobuilder |
0c4502 |
Version: 0.18.3
|
|
rdobuilder |
0c4502 |
Release: %autorelease
|
|
rdobuilder |
0c4502 |
Summary: Pytest support for asyncio
|
|
rdobuilder |
0c4502 |
License: ASL 2.0
|
|
rdobuilder |
0c4502 |
URL: https://github.com/pytest-dev/pytest-asyncio
|
|
rdobuilder |
0c4502 |
Source: %pypi_source
|
|
rdobuilder |
0c4502 |
BuildArch: noarch
|
|
rdobuilder |
0c4502 |
BuildRequires: python3-devel
|
|
rdobuilder |
0c4502 |
BuildRequires: pyproject-rpm-macros
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%description %{_description}
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%package -n python3-%{srcname}
|
|
rdobuilder |
0c4502 |
Summary: %{summary}
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%description -n python3-%{srcname} %{_description}
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%prep
|
|
rdobuilder |
0c4502 |
%autosetup -n %{srcname}-%{version}
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
# disable code quality checks in "testing" extras
|
|
rdobuilder |
0c4502 |
sed -e '/coverage==/d' \
|
|
rdobuilder |
0c4502 |
-e '/mypy ==/d' \
|
|
rdobuilder |
0c4502 |
-i setup.cfg
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%if %{defined el9}
|
|
rdobuilder |
0c4502 |
# EL9 has setuptools_scm 6.0.1 that works
|
|
rdobuilder |
0c4502 |
sed -e '/setuptools_scm/ s/>=6.2//' -i pyproject.toml
|
|
rdobuilder |
0c4502 |
%endif
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%generate_buildrequires
|
|
rdobuilder |
0c4502 |
# upstream also has tox that invokes make that invokes pytest...
|
|
rdobuilder |
0c4502 |
# we install the [testing] extra and will invoke pytest directly instead
|
|
rdobuilder |
0c4502 |
%pyproject_buildrequires %{?with_tests:-x testing}
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%build
|
|
rdobuilder |
0c4502 |
%pyproject_wheel
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%install
|
|
rdobuilder |
0c4502 |
%pyproject_install
|
|
rdobuilder |
0c4502 |
%pyproject_save_files pytest_asyncio
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%check
|
|
rdobuilder |
0c4502 |
%if %{with tests}
|
|
rdobuilder |
0c4502 |
# tests/modes/test_legacy_mode.py fails when pytest is invoked by /usr/bin/pytest
|
|
rdobuilder |
0c4502 |
# using python -m pytest works:
|
|
rdobuilder |
0c4502 |
%global __pytest %{python3} -m pytest
|
|
rdobuilder |
0c4502 |
%pytest
|
|
rdobuilder |
0c4502 |
%else
|
|
rdobuilder |
0c4502 |
%pyproject_check_import
|
|
rdobuilder |
0c4502 |
%endif
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%files -n python3-%{srcname} -f %{pyproject_files}
|
|
rdobuilder |
0c4502 |
%doc README.rst CHANGELOG.rst
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
%changelog
|
|
rdobuilder |
0c4502 |
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> 0.18.3-4
|
|
rdobuilder |
0c4502 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> 0.18.3-3
|
|
rdobuilder |
0c4502 |
- Rebuilt for Python 3.11
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> 0.18.3-2
|
|
rdobuilder |
0c4502 |
- Bootstrap for Python 3.11
|
|
rdobuilder |
0c4502 |
|
|
rdobuilder |
0c4502 |
* Wed Apr 20 2022 Carl George <carl@george.computer> 0.18.3-1
|
|
rdobuilder |
0c4502 |
- Renamed from python3-pytest-asyncio (resolves: rhbz#2076825)
|