From c0886110793628d7cda25a5cffa7a886939dce96 Mon Sep 17 00:00:00 2001 From: tigro Date: Sat, 4 Jan 2025 21:33:13 +0300 Subject: [PATCH] import python-httptools-0.6.0-6.el10 --- .gitignore | 2 + .python-httptools.metadata | 2 + SPECS/python-httptools.spec | 199 ++++++++++++++++++++++++++++++++++++ 3 files changed, 203 insertions(+) create mode 100644 .gitignore create mode 100644 .python-httptools.metadata create mode 100644 SPECS/python-httptools.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a76f28 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/httptools-0.6.0.tar.gz +SOURCES/httptools-git-0.6.0.tar.gz diff --git a/.python-httptools.metadata b/.python-httptools.metadata new file mode 100644 index 0000000..cf20edf --- /dev/null +++ b/.python-httptools.metadata @@ -0,0 +1,2 @@ +16236fe1d944bf7f88ef083c969002b33a48c540 SOURCES/httptools-0.6.0.tar.gz +6bc833c13dc6187288b884edd5728131d3c23529 SOURCES/httptools-git-0.6.0.tar.gz diff --git a/SPECS/python-httptools.spec b/SPECS/python-httptools.spec new file mode 100644 index 0000000..435ba10 --- /dev/null +++ b/SPECS/python-httptools.spec @@ -0,0 +1,199 @@ +Name: python-httptools +Version: 0.6.0 +Release: 6%{?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 + +# We use 2 similar source tarballs, each of them containing some additional stuff +# In %%prep they are unpacked to the same target directory +# The sdist from PyPI does not contain tests: +Source0: %{pypi_source httptools} +# The GitHub tarball does not contain 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) = 8.1.1 + +%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 + +# Build with Cython 3 works in Fedora 40 +# Upstream queried: https://github.com/MagicStack/httptools/issues/98 +sed -i 's/Cython(>=0.29.24,<0.30.0)/Cython(>=0.29.24,<4)/' setup.py + + +%generate_buildrequires +# NB: At least in 0.20 and 0.3.0 the [test] extra installs only Cython :/ +%pyproject_buildrequires -x 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 +* Sat Jan 04 2025 Arkady L. Shane - 0.6.0-6 +- Rebuilt for MSVSphere 10 + +* Fri Jul 19 2024 Fedora Release Engineering - 0.6.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 0.6.0-5 +- Rebuilt for Python 3.13 + +* Tue Feb 06 2024 Karolina Surma - 0.6.0-4 +- Allow to build with Cython 3.0+ + +* Fri Jan 26 2024 Fedora Release Engineering - 0.6.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 0.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Sep 24 2023 Carl George - 0.6.0-1 +- Update to version 0.6.0, resolves rhbz#1953151 + +* Fri Jul 21 2023 Fedora Release Engineering - 0.2.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 0.2.0-6 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 0.2.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 0.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.2.0-3 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 0.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Sep 10 2021 Miro Hrončok - 0.2.0-1 +- Update to 0.2.0 +- Now bundles llhttp + +* Fri Jul 23 2021 Fedora Release Engineering - 0.1.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.1.0-4 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 0.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jun 18 2020 Itamar Reis Peixoto - 0.1.0-1 +- Update to 0.1.0 + +* Tue May 26 2020 Miro Hrončok - 0.0.11-9 +- Rebuilt for Python 3.9 + +* Wed Apr 15 2020 Igor Raits - 0.0.11-8 +- Rebuild for http-parser 2.9.4 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.0.11-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 0.0.11-6 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 0.0.11-5 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 0.0.11-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 0.0.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 0.0.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sun Jul 08 2018 Igor Gnatenko - 0.0.11-1 +- Update to 0.0.11 + +* Tue Jun 19 2018 Miro Hrončok - 0.0.10-3 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 0.0.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Dec 31 2017 Igor Gnatenko - 0.0.10-1 +- Update to 0.0.10 + +* Thu Aug 03 2017 Fedora Release Engineering - 0.0.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.0.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.0.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jan 03 2017 Igor Gnatenko - 0.0.9-2 +- Drop python2 subpackage + +* Sun Jan 01 2017 Igor Gnatenko - 0.0.9-1 +- Initial package