## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 3;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%bcond tests %{undefined rhel}

Name:           python-respx
Version:        0.21.1
Release:        %autorelease
Summary:        Utility for mocking out the HTTPX and HTTP Core libraries

License:        BSD
URL:            https://lundberg.github.io/respx/
Source0:        https://github.com/lundberg/respx/archive/%{version}/respx-%{version}.tar.gz
BuildArch:      noarch

%description
An utility for mocking out the Python HTTPX and HTTP Core libraries.

%package -n     python3-respx
Summary:        %{summary}

BuildRequires:  python3-devel
%if %{with tests}
# Test requirements
BuildRequires:  python3dist(flask)
BuildRequires:  python3dist(starlette)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(pytest-asyncio)
BuildRequires:  python3dist(trio)
%endif

%description -n python3-respx
An utility for mocking out the Python HTTPX and HTTP Core libraries.

%prep
%autosetup -n respx-%{version} -p1
# We don't care about coverage in downstream builds,
# and running it is against the Python Packaging Guidelines.
sed -i -e '/--cov/d' setup.cfg

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files respx

%check
%if %{with tests}
%pytest -v tests -k "not test_pass_through" --asyncio-mode=auto
%endif

%files -n python3-respx -f %{pyproject_files}
%license LICENSE.md
%doc README.md

%changelog
## START: Generated by rpmautospec
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Sat Jun 15 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.21.1-2
- Rebuilt for Python 3.13 (fixes RHBZ#2291901)

* Sun Apr 07 2024 Fabian Affolter <mail@fabian-affolter.ch> - 0.21.1-1
- Update to latest upstream release (closes rhbz#22703439)

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Sat Aug 12 2023 Maxwell G <maxwell@gtmx.me> - 0.20.2-7
- Add tests bcond

* Sun Jul 23 2023 František Zatloukal <fzatlouk@redhat.com> - 0.20.2-1
- Update to 0.20.2 (Fixes RHBZ#2224453)

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 0.20.1-2
- Rebuilt for Python 3.12

* Mon May 15 2023 František Zatloukal <fzatlouk@redhat.com> - 0.20.1-1
- Update to 0.20.1 (Fixes RHBZ#2126802 and RHBZ#2143791  )

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Thu Aug 04 2022 František Zatloukal <fzatlouk@redhat.com> - 0.19.2-5
- Temp switch of pytest-asyncio to legacy to fix build against Flask >= 2.2

* Tue Aug 02 2022 Charalampos Stratakis <cstratak@redhat.com> - 0.19.2-4
- Fix test failures with pytest-asyncio >= 0.19

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 0.19.2-2
- Rebuilt for Python 3.11

* Sun Mar 06 2022 Fabian Affolter <mail@fabian-affolter.ch> - 0.19.2-1
- Update to latest upstream release 0.19.2 (closes rhbz#2046909)

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Thu Aug 26 2021 Fabian Affolter <mail@fabian-affolter.ch> - 0.17.1-1
- * Thu Aug 26 2021 Fabian Affolter <mail@fabian-affolter.ch> - 0.17.1-1 -
  Update to latest upstream release 0.17.1 (closes rhbz#1954159)

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.16.3-3
- Rebuilt for Python 3.10

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Mon Dec 14 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.16.3-1
- * Mon Dec 14 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.16.3-1 -
  Update to latest upstream release 0.16.3 (#1907495)

* Fri Dec 11 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.16.2-1
- * Fri Dec 11 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.16.2-1 -
  Update to latest upstream release 0.16.2 (#1904258)

* Thu Dec 03 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.16.0-1
- * Thu Dec 03 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.16.0-1 -
  Update to latest upstream release 0.16.0

* Wed Nov 18 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.14.0-1
- * Sat Oct 17 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.14.0-1 -
  Initial package for Fedora
## END: Generated by rpmautospec