%global srcname pytest-httpserver %global desc %{expand: \ This library is designed to help to test http clients without contacting the real http server. In other words, it is a fake http server which is accessible via localhost can be started with the pre-defined expected http requests and their responses.} %global python3_pkgversion 3.11 Name: python-%{srcname} Version: 1.0.8 Release: 4.c.py3.11%{?dist} Summary: HTTP server for pytest License: MIT URL: https://github.com/csernazs/pytest-httpserver Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz Patch0: pyproject.patch BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-requests BuildRequires: python%{python3_pkgversion}-toml BuildRequires: pyproject-rpm-macros %description %{desc} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} %description -n python%{python3_pkgversion}-%{srcname} %desc %prep %autosetup -p1 -n %{srcname}-%{version} # Remove unnecessary dependencies sed -i '/flake8/d' pyproject.toml sed -i '/pytest-cov/d' pyproject.toml sed -i '/coverage/d' pyproject.toml sed -i '/mypy/d' pyproject.toml sed -i '/types-requests/d' pyproject.toml %generate_buildrequires %pyproject_buildrequires -x test %build %pyproject_wheel %install %pyproject_install %pyproject_save_files pytest_httpserver %check for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s/(.*)$/\1-%{python3_pkgversion}/"<<<"$b"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s/(.*).([1-8]([^.]+)?)$/\1-%{python3_pkgversion}.\2/"<<<"$m"); done for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s/(.*).mo$/\1-%{python3_pkgversion}.mo/"<<<"$m"); done %pytest %files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc README.md CHANGES.rst CONTRIBUTION.md %changelog * Tue Apr 09 2024 Ding-Yi Chen - 1.0.8-4.c.py3.11 - Cut corner packaging * Fri Jan 26 2024 Fedora Release Engineering - 1.0.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 1.0.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Dec 07 2023 Frantisek Zatloukal - 1.0.8-1 - pytest-httpserver 1.0.8 * Fri Jul 21 2023 Fedora Release Engineering - 1.0.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jun 22 2023 Python Maint - 1.0.4-4 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 1.0.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 1.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jun 30 2022 Ali Erdinc Koroglu - 1.0.4-1 - Initial package