diff --git a/python-httpx.spec b/python-httpx.spec index 038275cc80a5b3a029d1eaf7dbab02de4e141bd0..0f9d8047c4a172f285581ed58b328b7c92db956a 100644 --- a/python-httpx.spec +++ b/python-httpx.spec @@ -1,31 +1,45 @@ -%global pypi_name httpx -%define _unpackaged_files_terminate_build 0 +%bcond_with tests -Name: python-%{pypi_name} -Version: 0.24.1 -Release: 4%{?dist} -Summary: Python HTTP client +Name: python-httpx +Version: 0.27.2 +Release: 1%{?dist} +Summary: Next-generation HTTP client for Python -License: BSD +License: BSD-3-Clause URL: https://github.com/encode/httpx -Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz +Source0: %{url}/archive/%{version}/httpx-%{version}.tar.gz BuildArch: noarch -%description -HTTPX is a fully featured HTTP client for Python, which provides sync and -async APIs, and support for both HTTP/1.1 and HTTP/2. +BuildRequires: python3-devel +%if %{with tests} +BuildRequires: %{py3_dist chardet} +BuildRequires: %{py3_dist cryptography} +BuildRequires: %{py3_dist pytest} +BuildRequires: %{py3_dist trio} +BuildRequires: %{py3_dist trustme} +BuildRequires: %{py3_dist uvicorn} +BuildRequires: %{py3_dist zstandard} +%endif +BuildRequires: help2man + +%global _description %{expand: +HTTPX is a fully featured HTTP client library for Python 3. It includes an +integrated command line client, has support for both HTTP/1.1 and HTTP/2, and +provides both sync and async APIs.} -%package -n python3-%{pypi_name} + +%description %{_description} + +%package -n python3-httpx Summary: %{summary} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%description -n python3-%{pypi_name} +%description -n python3-httpx %{_description} HTTPX is a fully featured HTTP client for Python, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2. + %prep -%autosetup -n %{pypi_name}-%{version} +%autosetup -n httpx-%{version} %generate_buildrequires %pyproject_buildrequires @@ -35,14 +49,36 @@ async APIs, and support for both HTTP/1.1 and HTTP/2. %install %pyproject_install -%pyproject_save_files %{pypi_name} +%pyproject_save_files httpx +install -d '%{buildroot}%{_mandir}/man1' +PYTHONPATH='%{buildroot}%{python3_sitelib}' \ + PATH="${PATH-}:%{buildroot}%{_bindir}" \ + PYTHONDONTWRITEBYTECODE=1 \ + help2man --no-info --version-string='%{version}' \ + --output='%{buildroot}%{_mandir}/man1/httpx.1' httpx -%files -n python3-%{pypi_name} -f %{pyproject_files} -%license LICENSE.md -%doc README.md +%check +%if %{with tests} +k="${k-}${k+ and }not test_async_proxy_close" +k="${k-}${k+ and }not test_sync_proxy_close" + +k="${k-}${k+ and }not test_write_timeout[trio]" + +%pytest -k "${k-}" -v +%endif + +%files -n python3-httpx -f %{pyproject_files} %attr(755, root, root) %{_bindir}/httpx +%{_mandir}/man1/httpx.1* +%doc CHANGELOG.md +%doc README.md +%license LICENSE.md %changelog +* Mon Jan 05 2026 bbrucezhang - 0.27.2-1 +- [Type] security +- [DESC] Update to 0.27.2 + * Wed Jun 11 2025 bbrucezhang - 0.24.1-4 - Rebuilt for loongarch64 diff --git a/sources b/sources index dcf06611f81b094dc3e4dbe0905b0eac38753687..53ff122e4a924c53f2ebb9c279fc12eca57b608f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (httpx-0.24.1.tar.gz) = 056741ef4e356f13adfcb66766489b39e79dbf4264d9780b8788c0934f7f3ff1a9b6bcb396a9f146e88315831f5399cebdd537c5a39c86b9b6bac3600d5560b6 +SHA512 (httpx-0.27.2.tar.gz) = c7852ae3e982bacee1587b66aed506f3f7e12caf296e651d3cdd9c111a7d737af49473be455bcabccc8e52487ad18b4821ea56b39500c3b77ed2325fc55505ae