Name: python-httptools Version: 0.3.0 Release: 1%{?dist} Summary: A collection of framework independent HTTP protocol utils # httptools is MIT # llhttp is MIT # http-parser is MIT (unused but kept in this list for reference) License: MIT URL: https://github.com/MagicStack/httptools # This source does not contain tests Source0: %{pypi_source httptools} # This source does not contain the git submodules with vendored libraries Source1: %{url}/archive/v%{version}/httptools-git-%{version}.tar.gz BuildRequires: gcc BuildRequires: http-parser-devel BuildRequires: python3-devel %global _description %{expand: The httptools module is a Python binding for the nodejs HTTP parser. It contains two classes: httptools.HttpRequestParser, httptools.HttpResponseParser (fulfilled through llhttp) and a function for parsing URLs httptools.parse_url.} %description %_description %package -n python3-httptools Summary: %{summary} Provides: bundled(llhttp) = 4.0.0 %description -n python3-httptools %_description %prep %autosetup -p1 -b1 -n httptools-%{version} # Remove pregenerated Cython C sources rm $(grep -rl '/\* Generated by Cython') # Do not install *.c sources # https://github.com/MagicStack/httptools/pull/73 sed -i 's/include_package_data=True/include_package_data=False/' setup.py # Move the vendored license to a better name mv vendor/llhttp/LICENSE-MIT LICENSE.llhttp # Use system http-parser sed -i 's/use_system_http_parser = False/use_system_http_parser = True/' setup.py rm -r vendor/http-parser %generate_buildrequires # NB: At least in 0.3.0 the [test] extra installs only Cython :/ %pyproject_buildrequires -rx test %build %pyproject_wheel %install %pyproject_install %pyproject_save_files httptools %check # do not attempt to import from $PWD mv httptools _httptools export PYTHONPATH=%{buildroot}%{python3_sitearch} %{python3} -m unittest -v tests.suite # cleanup mv _httptools httptools %files -n python3-httptools -f %{pyproject_files} %doc README.md %changelog * Thu Sep 09 2021 Miro HronĨok - 0.3.0-1 - Initial package - Fixes: rhbz#