8ea9e99
# Created by pyp2rpm-3.3.2
8ea9e99
%global pypi_name priority
8ea9e99
8ea9e99
%global common_description %{expand:
8ea9e99
A HTTP/2 Priority Implementation Priority is a pure-Python
8ea9e99
implementation of the priority logic for HTTP/2, set out in RFC 7540 Section
8ea9e99
5.3 (Stream Priority)_. This logic allows for clients to express a preference
8ea9e99
for how the server allocates its (limited) resources to the many outstanding
8ea9e99
HTTP requests that may be running over a single HTTP/2 connection.}
8ea9e99
8ea9e99
Name:           python-%{pypi_name}
99606a1
Version:        2.0.0
99606a1
Release:        %autorelease
8ea9e99
Summary:        A pure-Python implementation of the HTTP/2 priority tree
8ea9e99
8ea9e99
License:        MIT
8ea9e99
URL:            http://python-hyper.org/priority/
99606a1
Source0:        %pypi_source
5a6c782
8ea9e99
BuildArch:      noarch
8ea9e99
99606a1
BuildRequires:  python3-devel
8ea9e99
99606a1
%description %{common_description}
8ea9e99
8ea9e99
%package -n     python3-%{pypi_name}
8ea9e99
Summary:        %{summary}
8ea9e99
99606a1
%description -n python3-%{pypi_name} %{common_description}
8ea9e99
8ea9e99
%prep
5a6c782
%autosetup -n %{pypi_name}-%{version} -p1
8ea9e99
# Remove bundled egg-info
8ea9e99
rm -rf %{pypi_name}.egg-info
99f2a03
# Relax pytest-cov dependency
99f2a03
sed -i "s|pytest-cov>=2.10,<3|pytest-cov>=2.10,<4|" tox.ini
84564e5
# Relax pytest dependency
84564e5
sed -i "s|pytest>=6.2,<7|pytest>=6.2,<8|" tox.ini
8ea9e99
99606a1
%generate_buildrequires
1a2bbc3
%pyproject_buildrequires -t -e docs,%{toxenv}
8ea9e99
8ea9e99
%build
99606a1
%pyproject_wheel
8ea9e99
99606a1
# generate html docs
99606a1
PYTHONPATH=${PWD} sphinx-build-3 docs/source html
99606a1
# remove the sphinx-build leftovers
99606a1
rm -rf html/.{doctrees,buildinfo}
8ea9e99
c7f8540
%install
c7f8540
%pyproject_install
c7f8540
c7f8540
%pyproject_save_files priority
c7f8540
99606a1
%check
99606a1
%pytest
8ea9e99
99606a1
%files -n python3-%{pypi_name} -f %{pyproject_files}
8ea9e99
%license LICENSE
8ea9e99
%doc README.rst
99606a1
%doc html
8ea9e99
8ea9e99
%changelog
99606a1
%autochangelog