diff --git a/.github/workflows/build-simplepyble.yml b/.github/workflows/build-simplepyble.yml index da644d0d0f42..8455468781f4 100644 --- a/.github/workflows/build-simplepyble.yml +++ b/.github/workflows/build-simplepyble.yml @@ -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 }} @@ -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. 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' @@ -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 diff --git a/docs/packages/simplepyble.yaml b/docs/packages/simplepyble.yaml index c0be297d6414..fa4ef21aa474 100644 --- a/docs/packages/simplepyble.yaml +++ b/docs/packages/simplepyble.yaml @@ -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 diff --git a/patches/simplepyble/1.3.0/0001-Widen-license-files-to-cover-bundled-third-party-licences.patch b/patches/simplepyble/1.3.0/0001-Widen-license-files-to-cover-bundled-third-party-licences.patch new file mode 100644 index 000000000000..26e828735b24 --- /dev/null +++ b/patches/simplepyble/1.3.0/0001-Widen-license-files-to-cover-bundled-third-party-licences.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: RISE Project CI +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.` 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 +