diff --git a/.github/workflows/build-pyrnnoise.yml b/.github/workflows/build-pyrnnoise.yml index 7f483e48c5ee..03db46a6e844 100644 --- a/.github/workflows/build-pyrnnoise.yml +++ b/.github/workflows/build-pyrnnoise.yml @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: 2026 The RISE Project # SPDX-License-Identifier: MIT --- -# Based on upstream's own wheel build at this commit: +# Based on upstream's own wheel build: # https://github.com/pengzhendong/pyrnnoise/blob/a4edc69/.github/workflows/release.yml name: Build pyrnnoise wheels (riscv64) @@ -34,10 +34,13 @@ permissions: env: # Upstream cuts releases from a workflow_dispatch that stamps VERSION at - # build time (never committed) and tags no commit at all. This is the - # commit whose tree (pyrnnoise/pyrnnoise.py, requirements.txt) is - # byte-identical to the released 0.4.3 sdist/wheel contents. - PYRNNOISE_REF: a4edc697a2f475dcdac14c453d7c06eebbd06b33 + # build time (never committed) and tags no commit at all. Each entry is the + # commit whose pyrnnoise/*.py is byte-identical to the released wheel's. + # A new version must be added here, or the checkout guard below fails. + PYRNNOISE_REFS: >- + {"0.4.3": "a4edc697a2f475dcdac14c453d7c06eebbd06b33", + "0.4.4": "56c437f32cfa10136fdf766321d5570d9368d0a6", + "0.4.5": "fe603b252ccc7d3bacadb77d6ab766c48acc6fce"} MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64 jobs: @@ -62,14 +65,20 @@ jobs: PYRNNOISE_VERSION: ${{ matrix.version }} steps: - - name: Checkout pyrnnoise ${{ env.PYRNNOISE_REF }} + - name: Checkout pyrnnoise ${{ env.PYRNNOISE_VERSION }} uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: pengzhendong/pyrnnoise - ref: ${{ env.PYRNNOISE_REF }} + ref: ${{ fromJSON(env.PYRNNOISE_REFS)[env.PYRNNOISE_VERSION] }} submodules: true persist-credentials: false + - name: Check the checkout is the requested version + run: | + expected='${{ fromJSON(env.PYRNNOISE_REFS)[env.PYRNNOISE_VERSION] }}' + test -n "$expected" + test "$(git rev-parse HEAD)" = "$expected" + - name: Checkout python-wheels uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: diff --git a/docs/packages/pyrnnoise.yaml b/docs/packages/pyrnnoise.yaml index 98a93786ec20..e6aa140c7d9e 100644 --- a/docs/packages/pyrnnoise.yaml +++ b/docs/packages/pyrnnoise.yaml @@ -9,3 +9,5 @@ versions: files: - filename: pyrnnoise-0.4.3-py3-none-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl sha256: 6f86a69c4bcb5133750f7292b91e4fc3a6d5518592912d332fc73acbf0b8bd07 +- version: 0.4.4 +- version: 0.4.5 diff --git a/patches/pyrnnoise/0.4.4/0001-Add-RNNoise-s-LICENSE-at-project-root.patch b/patches/pyrnnoise/0.4.4/0001-Add-RNNoise-s-LICENSE-at-project-root.patch new file mode 100644 index 000000000000..e27c7720552d --- /dev/null +++ b/patches/pyrnnoise/0.4.4/0001-Add-RNNoise-s-LICENSE-at-project-root.patch @@ -0,0 +1,61 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Mon, 5 Oct 2026 00:00:00 +0000 +Subject: [PATCH] Add RNNoise's LICENSE at project root + +librnnoise.so is built from the xiph/rnnoise git submodule and statically +linked into every pyrnnoise wheel, but setup.py ships no license_files +list and the submodule's own COPYING (BSD-3-Clause) lives outside the +project root, so setuptools' default LICEN[CS]E*/COPYING*/NOTICE*/ +AUTHORS* glob never picks it up. Every wheel on PyPI currently ships +only pyrnnoise's own Apache-2.0 LICENSE. + +Copy rnnoise/COPYING to the root as LICENSE.rnnoise, which the existing +default glob already matches with no setup.py change. + +Upstream-Status: To upstream [not submitted from this automated port run; needs a pull request against pengzhendong/pyrnnoise] +--- + LICENSE.rnnoise | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + create mode 100644 LICENSE.rnnoise + +diff --git a/LICENSE.rnnoise b/LICENSE.rnnoise +new file mode 100644 +index 0000000..59d7d09 +--- /dev/null ++++ b/LICENSE.rnnoise +@@ -0,0 +1,32 @@ ++Copyright (c) 2007-2017, 2024 Jean-Marc Valin ++Copyright (c) 2023 Amazon ++Copyright (c) 2017, Mozilla ++Copyright (c) 2005-2017, Xiph.Org Foundation ++Copyright (c) 2003-2004, Mark Borgerding ++ ++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. ++ ++- Neither the name of the Xiph.Org Foundation nor the names of its ++contributors may be used to endorse or promote products derived from ++this software without specific prior written permission. ++ ++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 FOUNDATION ++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. +-- +2.43.0 diff --git a/patches/pyrnnoise/0.4.4/0002-setup.py-force-platlib-placement-for-auditwheel.patch b/patches/pyrnnoise/0.4.4/0002-setup.py-force-platlib-placement-for-auditwheel.patch new file mode 100644 index 000000000000..ddff24fbafad --- /dev/null +++ b/patches/pyrnnoise/0.4.4/0002-setup.py-force-platlib-placement-for-auditwheel.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Mon, 5 Oct 2026 00:00:00 +0000 +Subject: [PATCH] setup.py: force platlib placement for auditwheel + +custom_bdist_wheel.finalize_options sets root_is_pure = False to get a +platform-specific wheel tag, but setup.py declares no ext_modules, so +distutils' install_lib command still treats the build as pure and +installs every file (including librnnoise.so) under the wheel's +purelib data category. auditwheel's manylinux/musllinux repair step +refuses to process a shared library placed there: "Invalid binary +wheel, found the following shared library/libraries in purelib +folder: librnnoise.so. The wheel has to be platlib compliant in order +to be repaired by auditwheel." + +Overriding has_ext_modules() to True makes install_lib install the +whole package to platlib instead, which lands it at the wheel root +with no .data split and lets auditwheel repair the wheel normally. + +Upstream-Status: Inappropriate [upstream's own release.yml never runs auditwheel on any platform, so this only matters for a build pipeline like this one's] +--- + setup.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.py b/setup.py +index a6fba1b..ca22400 100644 +--- a/setup.py ++++ b/setup.py +@@ -23,6 +23,7 @@ class custom_bdist_wheel(bdist_wheel): + def finalize_options(self): + bdist_wheel.finalize_options(self) + self.root_is_pure = False ++ self.distribution.has_ext_modules = lambda: True + + def get_tag(self): + python, abi, plat = bdist_wheel.get_tag(self) +-- +2.43.0 diff --git a/patches/pyrnnoise/0.4.5/0001-Add-RNNoise-s-LICENSE-at-project-root.patch b/patches/pyrnnoise/0.4.5/0001-Add-RNNoise-s-LICENSE-at-project-root.patch new file mode 100644 index 000000000000..e27c7720552d --- /dev/null +++ b/patches/pyrnnoise/0.4.5/0001-Add-RNNoise-s-LICENSE-at-project-root.patch @@ -0,0 +1,61 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Mon, 5 Oct 2026 00:00:00 +0000 +Subject: [PATCH] Add RNNoise's LICENSE at project root + +librnnoise.so is built from the xiph/rnnoise git submodule and statically +linked into every pyrnnoise wheel, but setup.py ships no license_files +list and the submodule's own COPYING (BSD-3-Clause) lives outside the +project root, so setuptools' default LICEN[CS]E*/COPYING*/NOTICE*/ +AUTHORS* glob never picks it up. Every wheel on PyPI currently ships +only pyrnnoise's own Apache-2.0 LICENSE. + +Copy rnnoise/COPYING to the root as LICENSE.rnnoise, which the existing +default glob already matches with no setup.py change. + +Upstream-Status: To upstream [not submitted from this automated port run; needs a pull request against pengzhendong/pyrnnoise] +--- + LICENSE.rnnoise | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + create mode 100644 LICENSE.rnnoise + +diff --git a/LICENSE.rnnoise b/LICENSE.rnnoise +new file mode 100644 +index 0000000..59d7d09 +--- /dev/null ++++ b/LICENSE.rnnoise +@@ -0,0 +1,32 @@ ++Copyright (c) 2007-2017, 2024 Jean-Marc Valin ++Copyright (c) 2023 Amazon ++Copyright (c) 2017, Mozilla ++Copyright (c) 2005-2017, Xiph.Org Foundation ++Copyright (c) 2003-2004, Mark Borgerding ++ ++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. ++ ++- Neither the name of the Xiph.Org Foundation nor the names of its ++contributors may be used to endorse or promote products derived from ++this software without specific prior written permission. ++ ++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 FOUNDATION ++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. +-- +2.43.0 diff --git a/patches/pyrnnoise/0.4.5/0002-setup.py-force-platlib-placement-for-auditwheel.patch b/patches/pyrnnoise/0.4.5/0002-setup.py-force-platlib-placement-for-auditwheel.patch new file mode 100644 index 000000000000..ddff24fbafad --- /dev/null +++ b/patches/pyrnnoise/0.4.5/0002-setup.py-force-platlib-placement-for-auditwheel.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Mon, 5 Oct 2026 00:00:00 +0000 +Subject: [PATCH] setup.py: force platlib placement for auditwheel + +custom_bdist_wheel.finalize_options sets root_is_pure = False to get a +platform-specific wheel tag, but setup.py declares no ext_modules, so +distutils' install_lib command still treats the build as pure and +installs every file (including librnnoise.so) under the wheel's +purelib data category. auditwheel's manylinux/musllinux repair step +refuses to process a shared library placed there: "Invalid binary +wheel, found the following shared library/libraries in purelib +folder: librnnoise.so. The wheel has to be platlib compliant in order +to be repaired by auditwheel." + +Overriding has_ext_modules() to True makes install_lib install the +whole package to platlib instead, which lands it at the wheel root +with no .data split and lets auditwheel repair the wheel normally. + +Upstream-Status: Inappropriate [upstream's own release.yml never runs auditwheel on any platform, so this only matters for a build pipeline like this one's] +--- + setup.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.py b/setup.py +index a6fba1b..ca22400 100644 +--- a/setup.py ++++ b/setup.py +@@ -23,6 +23,7 @@ class custom_bdist_wheel(bdist_wheel): + def finalize_options(self): + bdist_wheel.finalize_options(self) + self.root_is_pure = False ++ self.distribution.has_ext_modules = lambda: True + + def get_tag(self): + python, abi, plat = bdist_wheel.get_tag(self) +-- +2.43.0