[packages/python3-pylsqpack] - new

arekm arekm at pld-linux.org
Wed Nov 11 03:09:51 CET 2026


commit 89e78d262f6bbf61793ae7a0a1a1b740ab023e43
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Nov 11 03:08:41 2026 +0100

    - new

 pylsqpack-system-ls-qpack.patch | 30 ++++++++++++++++
 python3-pylsqpack.spec          | 76 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+)
---
diff --git a/python3-pylsqpack.spec b/python3-pylsqpack.spec
new file mode 100644
index 0000000..383580d
--- /dev/null
+++ b/python3-pylsqpack.spec
@@ -0,0 +1,76 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+
+%define		module	pylsqpack
+Summary:	Python wrapper for the ls-qpack QPACK library
+Summary(pl.UTF-8):	Pythonowe obudowanie biblioteki QPACK ls-qpack
+Name:		python3-%{module}
+Version:	1.1.0
+Release:	1
+License:	BSD
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/pylsqpack/
+Source0:	https://files.pythonhosted.org/packages/source/p/pylsqpack/%{module}-%{version}.tar.gz
+# Source0-md5:	d963e699dfaf2fa3edfbc348035dbf03
+Patch0:		pylsqpack-system-ls-qpack.patch
+URL:		https://github.com/aiortc/pylsqpack
+BuildRequires:	ls-qpack-devel
+BuildRequires:	python3-build
+BuildRequires:	python3-devel >= 1:3.11
+BuildRequires:	python3-installer
+BuildRequires:	python3-setuptools >= 1:70.1
+%if %{with tests}
+BuildRequires:	python3-pytest
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 2.044
+Requires:	python3-modules >= 1:3.11
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+pylsqpack is a wrapper around the ls-qpack library. It provides Python
+Decoder and Encoder objects to read or write HTTP/3 headers compressed
+with QPACK.
+
+%description -l pl.UTF-8
+pylsqpack to obudowanie biblioteki ls-qpack. Udostępnia pythonowe
+obiekty Decoder i Encoder do odczytu i zapisu nagłówków HTTP/3
+skompresowanych przy użyciu QPACK.
+
+%prep
+%setup -q -n %{module}-%{version}
+%patch -P0 -p1
+
+%{__rm} -r vendor
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/build-3-test \
+%{__python3} -m pytest tests
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/binding.c
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.rst docs/changelog.rst
+%dir %{py3_sitedir}/%{module}
+%{py3_sitedir}/%{module}/__init__.py
+%{py3_sitedir}/%{module}/__init__.pyi
+%{py3_sitedir}/%{module}/py.typed
+%{py3_sitedir}/%{module}/__pycache__
+%attr(755,root,root) %{py3_sitedir}/%{module}/_binding.abi3.so
+%{py3_sitedir}/%{module}-%{version}.dist-info
diff --git a/pylsqpack-system-ls-qpack.patch b/pylsqpack-system-ls-qpack.patch
new file mode 100644
index 0000000..7a12934
--- /dev/null
+++ b/pylsqpack-system-ls-qpack.patch
@@ -0,0 +1,30 @@
+# link the system ls-qpack library instead of the bundled copy
+--- pylsqpack-1.1.0.orig/setup.py
++++ pylsqpack-1.1.0/setup.py
+@@ -4,10 +4,7 @@
+ import setuptools
+ 
+ extra_compile_args = []
+-include_dirs = [
+-    os.path.join("vendor", "ls-qpack"),
+-    os.path.join("vendor", "ls-qpack", "deps", "xxhash"),
+-]
++include_dirs = []
+ if sys.platform == "win32":
+     include_dirs.append(os.path.join("vendor", "ls-qpack", "wincompat"))
+ else:
+@@ -21,12 +18,9 @@
+             define_macros=[("Py_LIMITED_API", "0x030B0000")],
+             extra_compile_args=extra_compile_args,
+             include_dirs=include_dirs,
++            libraries=["ls-qpack"],
+             py_limited_api=True,
+-            sources=[
+-                "src/pylsqpack/binding.c",
+-                "vendor/ls-qpack/lsqpack.c",
+-                "vendor/ls-qpack/deps/xxhash/xxhash.c",
+-            ],
++            sources=["src/pylsqpack/binding.c"],
+         ),
+     ],
+     options={"bdist_wheel": {"py_limited_api": "cp311"}},
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pylsqpack.git/commitdiff/89e78d262f6bbf61793ae7a0a1a1b740ab023e43



More information about the pld-cvs-commit mailing list