File python-httpx.spec of Package python-httpx

# spec file for package python-httpx
# Copyright (c) 2021 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define skip_python36 1
Name:           python-httpx
Version:        0.18.2
Release:        0
Summary:        Python HTTP client with async support
License:        BSD-3-Clause
Group:          Development/Languages/Python
# PATCH-FIX-UPSTREAM (gh#encode/httpx#1669)
Patch0:         0001-Add-a-network-pytest-mark-for-tests-that-use-the-network.patch
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-brotlicffi
Requires:       python-certifi
Requires:       python-chardet >= 3.0
Requires:       python-h11 >= 0.8.0
Requires:       python-h2 >= 3.0
Requires:       python-hstspreload >= 2019.8.27
Requires:       python-httpcore >= 0.13.0
Requires:       python-idna >= 2.0
Requires:       python-rfc3986 >= 1.3
Requires:       python-sniffio
BuildArch:      noarch
# SECTION test requirements
BuildRequires:  %{python_module anyio}
BuildRequires:  %{python_module async_generator}
BuildRequires:  %{python_module brotlicffi}
BuildRequires:  %{python_module certifi}
BuildRequires:  %{python_module chardet >= 3.0}
BuildRequires:  %{python_module h11 >= 0.8.0}
BuildRequires:  %{python_module h2 >= 3.0}
BuildRequires:  %{python_module hstspreload >= 2019.8.27}
BuildRequires:  %{python_module httpcore >= 0.13.0}
BuildRequires:  %{python_module idna >= 2.0}
BuildRequires:  %{python_module pytest-asyncio}
BuildRequires:  %{python_module pytest-trio}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module rfc3986 >= 1.3}
BuildRequires:  %{python_module sniffio}
BuildRequires:  %{python_module trio}
BuildRequires:  %{python_module trustme}
BuildRequires:  %{python_module uvicorn}
BuildRequires:  %{python_module uvloop}

Python HTTP client with async support.

%setup -q -n httpx-%{version}
%patch0 -p1
rm setup.cfg


%python_expand %fdupes %{buildroot}%{$python_sitelib}

%pytest -k 'not network'

%files %{python_files}

openSUSE Build Service is sponsored by