[packages/python3-h11] - python-h11.spec updated to 0.16.0 for python 3.8+; doc disabled (relies on httpbin.org availabilit
qboosh
qboosh at pld-linux.org
Sat Dec 13 09:20:40 CET 2025
commit a9f9d9fd3ac99ed319d93628f55b2983447de3f1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Dec 13 09:20:56 2025 +0100
- python-h11.spec updated to 0.16.0 for python 3.8+; doc disabled (relies on httpbin.org availability)
h11-sphinx.patch | 15 ++++++
python-h11.spec => python3-h11.spec | 93 ++++++-------------------------------
2 files changed, 29 insertions(+), 79 deletions(-)
---
diff --git a/python-h11.spec b/python3-h11.spec
similarity index 50%
rename from python-h11.spec
rename to python3-h11.spec
index 01f44bf..38ef8c6 100644
--- a/python-h11.spec
+++ b/python3-h11.spec
@@ -1,45 +1,34 @@
#
# Conditional build:
-%bcond_without doc # Sphinx documentation
+%bcond_with doc # Sphinx documentation (requires network to render ipython insertions)
%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_with python3 # CPython 3.x module (built from python3-h11.spec)
Summary: A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
Summary(pl.UTF-8): Czysto Pythonowa implementacja HTTP/1.1, operująca na dostarczonym we/wy
-Name: python-h11
-# keep 0.11.x here for python2 support
-Version: 0.11.0
+Name: python3-h11
+Version: 0.16.0
Release: 1
License: MIT
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/h11/
Source0: https://files.pythonhosted.org/packages/source/h/h11/h11-%{version}.tar.gz
-# Source0-md5: 12f254d89443b3f3d28b5345876974b8
+# Source0-md5: af51401a776fd654cfd98a197af9f21f
+Patch0: h11-sphinx.patch
URL: https://pypi.org/project/h11/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-pytest
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.5
+BuildRequires: python3-modules >= 1:3.8
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-pytest
%endif
-%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
-BuildRequires: python-ipython
-BuildRequires: python-jsonschema
-BuildRequires: python-mistune
-BuildRequires: sphinx-pdg-2
+BuildRequires: python3-ipython
+BuildRequires: python3-jsonschema
+BuildRequires: python3-mistune
+BuildRequires: sphinx-pdg-3
%endif
-Requires: python-modules >= 1:2.7
+Requires: python3-modules >= 1:3.8
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -63,32 +52,6 @@ ulubione API sieciowe, które może być dowolnego rodzaju:
synchroniczne, wielowątkowe, asynchroniczne lub własną implementacją
RFC 6214.
-%package -n python3-h11
-Summary: A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
-Summary(pl.UTF-8): Czysto Pythonowa implementacja HTTP/1.1, operująca na dostarczonym we/wy
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.5
-
-%description -n python3-h11
-This is a little HTTP/1.1 library written from scratch in Python,
-heavily inspired by hyper-h2 <https://hyper-h2.readthedocs.io/>.
-
-It's a "bring-your-own-I/O" library; h11 contains no IO code
-whatsoever. This means you can hook h11 up to your favorite network
-API, and that could be anything you want: synchronous, threaded,
-asynchronous, or your own implementation of RFC 6214.
-
-%description -n python3-h11 -l pl.UTF-8
-Ten pakiet zawiera małą bibliotekę HTTP/1.1, napisaną od podstaw w
-Pythonie, w dużym stopniu inspirowaną hyper-h2
-<https://hyper-h2.readthedocs.io/>.
-
-Jest to biblioteka z podejściem "dostarcz swoje własne we/wy" - sama
-h11 nie zawiera kodu we/wy. Oznacza to, że można do niej podpiąć
-ulubione API sieciowe, które może być dowolnego rodzaju:
-synchroniczne, wielowątkowe, asynchroniczne lub własną implementacją
-RFC 6214.
-
%package apidocs
Summary: API documentation for Python h11 module
Summary(pl.UTF-8): Dokumentacja API modułu Pythona h11
@@ -102,62 +65,34 @@ Dokumentacja API modułu Pythona h11.
%prep
%setup -q -n h11-%{version}
+%patch -P0 -p1
%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python} -m pytest h11
-%endif
-%endif
-
-%if %{with python3}
%py3_build
%if %{with tests}
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
%{__python3} -m pytest h11
%endif
-%endif
%if %{with doc}
%{__make} -C docs html \
- SPHINXBUILD=sphinx-build-2
+ SPHINXBUILD=sphinx-build-3
%endif
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
%py3_install
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc LICENSE.txt README.rst
-%{py_sitescriptdir}/h11
-%{py_sitescriptdir}/h11-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-h11
-%defattr(644,root,root,755)
-%doc LICENSE.txt README.rst
+%doc LICENSE.txt README.rst notes.org
%{py3_sitescriptdir}/h11
%{py3_sitescriptdir}/h11-%{version}-py*.egg-info
-%endif
%if %{with doc}
%files apidocs
diff --git a/h11-sphinx.patch b/h11-sphinx.patch
new file mode 100644
index 0000000..e3d5c3e
--- /dev/null
+++ b/h11-sphinx.patch
@@ -0,0 +1,15 @@
+--- h11-0.16.0/docs/source/conf.py.orig 2025-01-10 05:29:45.000000000 +0100
++++ h11-0.16.0/docs/source/conf.py 2025-12-12 22:54:56.071579934 +0100
+@@ -58,9 +58,9 @@ extensions = [
+ # Undocumented trick: if we def setup here in conf.py, it gets called just
+ # like an extension's setup function.
+ def setup(app):
+- app.add_javascript("show-code.js")
+- app.add_javascript("facebox.js")
+- app.add_stylesheet("facebox.css")
++ app.add_js_file("show-code.js")
++ app.add_js_file("facebox.js")
++ app.add_css_file("facebox.css")
+
+ # Add any paths that contain templates here, relative to this directory.
+ templates_path = ['_templates']
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-h11.git/commitdiff/a9f9d9fd3ac99ed319d93628f55b2983447de3f1
More information about the pld-cvs-commit
mailing list