[packages/python-h11] - initial
qboosh
qboosh at pld-linux.org
Sat Dec 13 09:17:41 CET 2025
commit 9783390eafc917bad1c62883cfe7b1453fda12d7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Dec 13 09:17:52 2025 +0100
- initial
python-h11.spec | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 166 insertions(+)
---
diff --git a/python-h11.spec b/python-h11.spec
new file mode 100644
index 0000000..01f44bf
--- /dev/null
+++ b/python-h11.spec
@@ -0,0 +1,166 @@
+#
+# Conditional build:
+%bcond_without doc # Sphinx documentation
+%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
+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
+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-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
+%endif
+Requires: python-modules >= 1:2.7
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+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 -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 -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
+Group: Documentation
+
+%description apidocs
+API documentation for Python h11 module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona h11.
+
+%prep
+%setup -q -n h11-%{version}
+
+%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
+%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
+%{py3_sitescriptdir}/h11
+%{py3_sitescriptdir}/h11-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/build/html/{_images,_modules,_static,*.html,*.js}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-h11.git/commitdiff/9783390eafc917bad1c62883cfe7b1453fda12d7
More information about the pld-cvs-commit
mailing list