Blob Blame History Raw
# Created by pyp2rpm-3.3.2
%global pypi_name priority

%global common_description %{expand:
A HTTP/2 Priority Implementation Priority is a pure-Python
implementation of the priority logic for HTTP/2, set out in RFC 7540 Section
5.3 (Stream Priority)_. This logic allows for clients to express a preference
for how the server allocates its (limited) resources to the many outstanding
HTTP requests that may be running over a single HTTP/2 connection.}

Name:           python-%{pypi_name}
Version:        2.0.0
Release:        %autorelease
Summary:        A pure-Python implementation of the HTTP/2 priority tree

License:        MIT
URL:            http://python-hyper.org/priority/
Source0:        %pypi_source

BuildArch:      noarch

BuildRequires:  python3-devel

%description %{common_description}

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

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

%prep
%autosetup -n %{pypi_name}-%{version} -p1
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# Relax pytest-cov dependency
sed -i "s|pytest-cov>=2.10,<3|pytest-cov>=2.10,<4|" tox.ini
# Relax pytest dependency
sed -i "s|pytest>=6.2,<7|pytest>=6.2,<8|" tox.ini

%generate_buildrequires
%pyproject_buildrequires -t -e docs,%{toxenv}

%build
%pyproject_wheel

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

%install
%pyproject_install

%pyproject_save_files priority

%check
%pytest

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.rst
%doc html

%changelog
%autochangelog