Blob Blame History Raw
%global srcname hpack

%global common_description %{expand:
HTTP/2 Header Encoding for Python This module contains a pure-Python
HTTP/2 header encoding (HPACK) logic for use in Python programs that implement
HTTP/2. It also contains a compatibility layer that automatically enables the
use of nghttp2 if it's available.}

Name:           python-%{srcname}
Version:        4.0.0
Release:        2%{?dist}
Summary:        Pure-Python HPACK header compression

License:        MIT
Source0:        %vcs/archive/v%{version}/%{srcname}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  make
BuildRequires:  python3-devel
BuildRequires:  python3dist(hypothesis)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(sphinx)

%description %{common_description}

%package -n     python3-%{srcname}
Summary:        %{summary}

%description -n python3-%{srcname} %{common_description}

%package doc
Summary:        Documentation for %{name}

%description doc

This is the documentation package for %{name}.

%autosetup -p1 -n %{srcname}-%{version}

# Upstream uses tox to call pytest.  If we used it we'd have to patch out
# pytest-xdist, pytest-cov, and coverage related pytest flags.  Instead, we'll
# just call pytest directly.


# generate html docs
PYTHONPATH=${PWD} sphinx-build docs/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%pyproject_save_files %{srcname}

%if %{with check}
%pytest -k 'not test_get_by_index_out_of_range'

%files -n python3-%{srcname} -f %{pyproject_files}

%files doc
%doc html
%license LICENSE

* Fri Jul 22 2022 Fedora Release Engineering <> - 4.0.0-2
- Rebuilt for