- Add pr-402-http20-enable-push-fix.patch from upstream to fix http20 connection initialisation - Improve fix-dependencies.patch removing upper constraints - Merge hyper executable into main package - Remove bcond test - Simplify test invocation - Add missing test dependency 'futures' on Python 2.7 - Update to version 0.7.0+git88.18b629b: * Add a fix to make it possible to add window_manager to HTTP20Adapter. * Add support for brotli compression * Fix crash on getting unsupported content-encoding * fix HTTP/1.1 response body length * fix HTTP/1.1 response body length * fix some error * Add test function for length of the HTTP/1.1 response-body. * fix HEAD request body length * fix test_release (http2bin to nghttp2.org/httpbin) - Initial spec for version 0.7.0+git88.18b629b, adding fix-test.patch to de-vendor the tests and fix-dependencies.patch to unpin dependencies OBS-URL: https://build.opensuse.org/request/show/689405 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hyper?expand=0&rev=1
89 lines
2.9 KiB
RPMSpec
89 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package python-hyper
|
|
#
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-hyper
|
|
Version: 0.7.0+git88.18b629b
|
|
Release: 0
|
|
Summary: HTTP/2 Client for Python
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/Lukasa/hyper
|
|
Source0: hyper-%{version}.tar.xz
|
|
Patch0: fix-dependencies.patch
|
|
Patch1: fix-test.patch
|
|
Patch2: pr-402-h2-settings-fix.patch
|
|
Patch3: tests-mark-rpmfail_getaddrinfo.patch
|
|
BuildRequires: %{python_module brotlipy >= 0.7.0}
|
|
BuildRequires: %{python_module h2 > 2.5.0}
|
|
BuildRequires: %{python_module hyperframe >= 3.2}
|
|
BuildRequires: %{python_module mock}
|
|
BuildRequires: %{python_module packaging}
|
|
BuildRequires: %{python_module pytest >= 3.0}
|
|
BuildRequires: %{python_module pytest-runner}
|
|
BuildRequires: %{python_module requests}
|
|
BuildRequires: %{python_module rfc3986 >= 1.1.0}
|
|
BuildRequires: %{python_module setuptools}
|
|
#tests
|
|
BuildRequires: %{python_module virtualenv >= 14.0.0}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-enum34 >= 1.0.4
|
|
BuildRequires: python-futures
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-brotlipy >= 0.7.0
|
|
Requires: python-h2 > 2.5.0
|
|
Requires: python-hyperframe >= 3.2
|
|
Requires: python-rfc3986 >= 1.1.0
|
|
%ifpython2
|
|
Requires: python-enum34
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
hyper supports the final draft of the HTTP/2 specification: additionally,
|
|
it provides support for drafts 14, 15, and 16 of the HTTP/2 specification.
|
|
It also supports the final draft of the HPACK specification.
|
|
|
|
hyper is intended to be a drop-in replacement for http.client, with a
|
|
similar API. However, hyper intentionally does not name its classes the
|
|
same way http.client does. This is because most servers do not support
|
|
HTTP/2 at this time: I don't want you accidentally using hyper when you
|
|
wanted http.client.
|
|
|
|
%prep
|
|
%setup -q -n hyper-%{version}
|
|
%autopatch -p1
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%python_exec setup.py pytest --addopts="test/ -k 'not rpmfail_getaddrinfo'"
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.rst
|
|
%python3_only %{_bindir}/hyper
|
|
%{python_sitelib}/hyper*
|
|
|
|
%changelog
|