2019-03-14 15:10:45 +00:00
#
# spec file for package python-geventhttpclient
#
2024-10-08 08:32:03 +00:00
# Copyright (c) 2024 SUSE LLC
2019-03-14 15:10:45 +00:00
#
# 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.
2019-03-14 15:29:54 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
2019-03-14 15:10:45 +00:00
Name : python-geventhttpclient
2024-10-08 08:32:03 +00:00
Version : 2.3.1
2019-03-14 15:10:45 +00:00
Release : 0
2019-03-14 15:29:54 +00:00
Summary : HTTP client library for gevent
2019-03-14 15:10:45 +00:00
License : MIT
Group : Development/Languages/Python
2020-01-14 11:10:54 +00:00
URL : https://github.com/gwik/geventhttpclient
2019-03-14 15:29:54 +00:00
Source : https://files.pythonhosted.org/packages/source/g/geventhttpclient/geventhttpclient-%{version} .tar.gz
2024-10-08 08:32:03 +00:00
# Needed for tests
Source1 : https://github.com/gwik/geventhttpclient/archive/%{version} .tar.gz#/%{name}-%{version}.tar.gz
2022-11-04 14:51:45 +00:00
BuildRequires : %{python_module Brotli}
2019-03-14 15:29:54 +00:00
BuildRequires : %{python_module certifi}
BuildRequires : %{python_module devel}
2020-08-21 08:30:16 +00:00
BuildRequires : %{python_module dpkt}
2019-03-14 15:29:54 +00:00
BuildRequires : %{python_module gevent}
2024-10-08 08:32:03 +00:00
BuildRequires : %{python_module pip}
2019-03-14 15:29:54 +00:00
BuildRequires : %{python_module pytest}
BuildRequires : %{python_module setuptools}
2024-10-08 08:32:03 +00:00
BuildRequires : %{python_module wheel}
2020-12-14 06:23:49 +00:00
%if 0%{?suse_version} <= 1500
BuildRequires : python-mock
2020-12-13 21:28:49 +00:00
%endif
2019-03-14 15:29:54 +00:00
BuildRequires : fdupes
BuildRequires : python-rpm-macros
2022-11-04 14:51:45 +00:00
Requires : python-Brotli
2019-03-14 15:29:54 +00:00
Requires : python-certifi
Requires : python-gevent
2024-10-08 08:47:05 +00:00
Requires : python-urllib3
2019-03-14 15:29:54 +00:00
%python_subpackages
2019-03-14 15:10:45 +00:00
%description
2019-03-14 18:45:51 +00:00
A concurrent HTTP client library for Python using gevent.
2019-03-14 15:10:45 +00:00
2019-03-14 18:45:51 +00:00
geventhttpclient uses a HTTP parser, written in C, originating from
nginx, extracted and modified by Joyent.
2019-03-14 15:10:45 +00:00
2019-03-14 18:45:51 +00:00
geventhttpclient has been designed for high concurrency and
streaming, and supports HTTP/1.1 persistent connections. More
generally, it is designed for pulling from REST APIs and streaming
APIs like Twitter's.
2019-03-14 15:10:45 +00:00
%prep
2020-12-12 12:12:15 +00:00
%autosetup -p1 -n geventhttpclient-%{version}
2024-10-08 08:32:03 +00:00
tar -xvf %{SOURCE1} geventhttpclient-%{version} /tests/
2019-03-14 15:10:45 +00:00
%build
2024-10-08 08:32:03 +00:00
%pyproject_wheel
2019-03-14 15:10:45 +00:00
%install
2024-10-08 08:32:03 +00:00
%pyproject_install
2019-03-14 15:29:54 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitearch}
%check
2020-01-14 11:10:54 +00:00
# test_cookielib_compatibility https://github.com/gwik/geventhttpclient/issues/119
2023-08-25 18:48:15 +00:00
# test_no_module_ssl.py https://github.com/geventhttpclient/geventhttpclient/issues/180
2025-08-20 07:19:10 +00:00
%if 0%{?suse_version} > 1600
2024-10-08 08:32:03 +00:00
%pytest_arch -m 'not network' -k 'not (test_cookielib_compatibility or test_no_module_ssl)'
2025-08-20 07:19:10 +00:00
%else
%pytest_arch -m 'not network' -k 'not (test_cookielib_compatibility or test_no_module_ssl or test_implicit_sni_from_host_in_ssl or test_implicit_sni_from_header_in_ssl or test_explicit_sni_in_ssl)'
%endif
2019-03-14 15:10:45 +00:00
2019-03-14 15:29:54 +00:00
%files %{python_files}
2024-10-08 08:32:03 +00:00
%doc README.md
%license LICENSE-MIT
2022-11-04 14:53:11 +00:00
%{python_sitearch} /geventhttpclient
%{python_sitearch} /geventhttpclient-%{version} *-info
2019-03-14 15:10:45 +00:00
%changelog