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
28 changes: 25 additions & 3 deletions .github/workflows/build-simplepyble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ on:
paths:
- '.github/workflows/build-simplepyble.yml'
- 'docs/packages/simplepyble.yaml'
- 'patches/simplepyble/**'
push:
branches: [main]
paths:
- '.github/workflows/build-simplepyble.yml'
- 'docs/packages/simplepyble.yaml'
- 'patches/simplepyble/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -63,6 +65,23 @@ jobs:
ref: v${{ env.SIMPLEPYBLE_VERSION }}
persist-credentials: false

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

# 1.3.0's setup.py lists license_files=["LICENSE.md"] explicitly, which drops the
# LICENSE.<dep> files staged below for the libraries auditwheel vendors; the patch
# widens it. Earlier releases use setuptools' default glob and have no patch.
- name: Patch simplepyble source
run: |
patches="$PWD/python-wheels/patches/simplepyble/$SIMPLEPYBLE_VERSION"
if [ -d "$patches" ]; then
git apply "$patches"/*.patch
fi

- name: Stage the licence-collection script
run: |
cat > collect-licenses.sh <<'COLLECT_EOF'
Expand Down Expand Up @@ -136,10 +155,13 @@ jobs:
dnf install -y dbus-devel &&
bash {project}/collect-licenses.sh {project}
CIBW_TEST_REQUIRES: pytest
# upstream's suite targets the Plain (mock) backend; only these two are backend-independent
# upstream's suite targets the Plain (mock) backend; only these two are backend-independent.
# Since 1.3.0 the module has an autouse fixture that fetches a Bluetooth adapter,
# which needs the system D-Bus (absent in the build container) for this Linux
# backend, so the two tests are called directly instead of through pytest.
CIBW_TEST_COMMAND: >-
pytest -v {project}/simplepyble/test/test_simpleble.py
-k "test_configuration_parity or test_platform_enums" &&
python -c "import sys; sys.path.insert(0, '{project}/simplepyble/test');
import test_simpleble as t; t.test_configuration_parity(); t.test_platform_enums()" &&
python -c "import simplepyble; assert simplepyble.get_operating_system() == simplepyble.OperatingSystem.LINUX"

- name: Verify the wheel ships the extension and every vendored library's licence
Expand Down
1 change: 1 addition & 0 deletions docs/packages/simplepyble.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ versions:
gpl-sources:
filename: gpl-sources.tar
description: gcc and the copyleft libraries bundled in the wheel
- version: 1.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: RISE Project CI <ci@riseproject.dev>
Date: Sat, 31 Oct 2026 00:00:00 +0000
Subject: [PATCH] Widen license-files to cover bundled third-party licences

`license_files=["LICENSE.md"]` is an explicit PEP 639 list, so it replaces
setuptools' default `LICEN[CS]E*` glob rather than adding to it: a
`LICENSE.<dep>` dropped at the project root to cover a library
`auditwheel repair` vendors into the wheel (libdbus-1 and its transitive
closure) is silently ignored. Widening the list to also match `LICENSE.*`
picks those up with no other packaging change.

Upstream-Status: To upstream [not filed; this port may only touch riseproject-dev/python-wheels]
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index a5ab373..179211b 100644
--- a/setup.py
+++ b/setup.py
@@ -62,7 +62,7 @@ skbuild.setup(
long_description=long_description,
long_description_content_type="text/markdown",
license_expression="BUSL-1.1",
- license_files=["LICENSE.md"],
+ license_files=["LICENSE.md", "LICENSE.*"],
packages=["simplepyble"],
package_dir={"": "simplepyble/src"},
package_data={"simplepyble": ["py.typed", "*.pyi"]},
--
2.43.0

Loading