Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .github/workflows/build-pylsqpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on: https://github.com/aiortc/pylsqpack/blob/0.3.24/.github/workflows/tests.yml
name: Build pylsqpack wheels (riscv64)

on:
workflow_dispatch:
inputs:
version:
description: 'pylsqpack version to build (git tag, e.g. 0.3.24)'
required: true
default: '0.3.24'
pull_request:
paths:
- '.github/workflows/build-pylsqpack.yml'
- 'patches/pylsqpack/**'

concurrency:
group: ${{ github.workflow }}-${{ inputs.version || '0.3.24' }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

env:
PYLSQPACK_VERSION: ${{ inputs.version || '0.3.24' }}
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64

jobs:
setup:
uses: $/.github/workflows/_setup.yml

build_wheels:
needs: [setup]
name: Build pylsqpack ${{ inputs.version || '0.3.24' }} cp310-abi3-manylinux_riscv64
runs-on: ubuntu-24.04-riscv
timeout-minutes: 90

steps:
- name: Checkout pylsqpack ${{ env.PYLSQPACK_VERSION }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: aiortc/pylsqpack
ref: ${{ env.PYLSQPACK_VERSION }}
submodules: true
persist-credentials: false

- name: Checkout python-wheels
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: python-wheels
persist-credentials: false

- name: Patch pylsqpack source
run: git apply python-wheels/patches/pylsqpack/${{ env.PYLSQPACK_VERSION }}/*.patch

- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
with:
output-dir: wheelhouse/
env:
CIBW_ARCHS: riscv64
# cp310 first: binding.c defines PY_SSIZE_T_CLEAN, whose PyArg_Parse*
# aliases were dropped in 3.13, so an abi3 wheel compiled on a newer
# interpreter raises SystemError on 3.10-3.12 despite its tag (gotcha 96).
# The later entries build nothing; they re-test the one wheel.
CIBW_BUILD: >-
cp310-manylinux_riscv64 cp311-manylinux_riscv64 cp312-manylinux_riscv64
cp313-manylinux_riscv64 cp314-manylinux_riscv64
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
CIBW_TEST_COMMAND: >-
python -c "import importlib.metadata as m; f = sorted(p.name for p in m.files('pylsqpack') if '.dist-info/licenses/' in str(p)); assert f == ['LICENSE', 'LICENSE.ls-qpack', 'LICENSE.xxhash'], f"
&& python -m unittest discover -v -s {project}/tests

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pylsqpack-${{ env.PYLSQPACK_VERSION }}-cp310-abi3-manylinux_riscv64
path: wheelhouse/*.whl
if-no-files-found: error

publish:
name: Publish pylsqpack ${{ inputs.version || '0.3.24' }}
needs: [setup, build_wheels]
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
with:
artifact-pattern: pylsqpack-${{ inputs.version || '0.3.24' }}-*-manylinux_riscv64
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
From afdce09a4bc71b3a95b1eedd15114287bd806ddc Mon Sep 17 00:00:00 2001
From: Ludovic Henry <git@ludovic.dev>
Date: Thu, 3 Sep 2026 22:34:29 +0200
Subject: [PATCH] add the vendored ls-qpack/xxhash licences next to the
package's own

Upstream-Status: To upstream [not yet submitted; the same gap exists in every pylsqpack wheel on PyPI, so this needs a maintainer discussion rather than a drive-by PR]

setup.py compiles vendor/ls-qpack (ls-qpack, MIT) and its bundled
vendor/ls-qpack/deps/xxhash (xxHash, BSD-2-Clause) straight into the
pylsqpack._binding extension. Both licences require their notice to be
reproduced with binary redistributions. The wheel ships only the package's
own BSD-3-Clause LICENSE: setuptools globs license files from the project
root, and neither vendored notice lives there (xxhash carries no LICENSE
file at all, only the header reproduced here as LICENSE.xxhash).

Add both licences at the root as LICENSE.ls-qpack and LICENSE.xxhash, which
the default LICEN[CS]E* glob picks up, so they land in dist-info/licenses/
beside LICENSE with no packaging change.

Signed-off-by: Ludovic Henry <git@ludovic.dev>
---
LICENSE.ls-qpack | 21 +++++++++++++++++++++
LICENSE.xxhash | 30 ++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 LICENSE.ls-qpack
create mode 100644 LICENSE.xxhash

diff --git a/LICENSE.ls-qpack b/LICENSE.ls-qpack
new file mode 100644
index 0000000..4b3c1fd
--- /dev/null
+++ b/LICENSE.ls-qpack
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 - 2022 LiteSpeed Technologies Inc
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/LICENSE.xxhash b/LICENSE.xxhash
new file mode 100644
index 0000000..87f1a1b
--- /dev/null
+++ b/LICENSE.xxhash
@@ -0,0 +1,30 @@
+xxHash - Fast Hash algorithm
+Copyright (C) 2012-2014, Yann Collet.
+BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+You can contact the author at :
+- xxHash source repository : http://code.google.com/p/xxhash/
+- public discussion board : https://groups.google.com/forum/#!forum/lz4c
--
2.50.1 (Apple Git-155)