diff --git a/.github/workflows/build-fastremap.yml b/.github/workflows/build-fastremap.yml index 887490f06cb6..5fc515467d81 100644 --- a/.github/workflows/build-fastremap.yml +++ b/.github/workflows/build-fastremap.yml @@ -16,11 +16,13 @@ on: paths: - '.github/workflows/build-fastremap.yml' - 'docs/packages/fastremap.yaml' + - 'patches/fastremap/**' push: branches: [main] paths: - '.github/workflows/build-fastremap.yml' - 'docs/packages/fastremap.yaml' + - 'patches/fastremap/**' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -62,6 +64,17 @@ jobs: ref: ${{ env.FASTREMAP_VERSION }} persist-credentials: false + - name: Checkout python-wheels + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + path: python-wheels + persist-credentials: false + + # meson-python (upstream's backend since 1.21.0) only ships the files named + # in `license-files`; see patches/fastremap/1.21.0 for details. + - name: Apply patches + run: git apply python-wheels/patches/fastremap/${{ env.FASTREMAP_VERSION }}/*.patch + - uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 with: output-dir: wheelhouse/ diff --git a/docs/packages/fastremap.yaml b/docs/packages/fastremap.yaml index e6a6bff205ab..54b3605b03dd 100644 --- a/docs/packages/fastremap.yaml +++ b/docs/packages/fastremap.yaml @@ -17,3 +17,4 @@ versions: - filename: fastremap-1.20.0-cp314-cp314t-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl sha256: 7162d4ac10ac2dbd0909e4cb83b4e598c4d0306be19026fc0261981a1993fbb3 requires-python: '>=3.9,<4.0' +- version: 1.21.0 diff --git a/patches/fastremap/1.21.0/0001-ship-the-LICENSE-and-AUTHORS-files-in-the-wheel-s-di.patch b/patches/fastremap/1.21.0/0001-ship-the-LICENSE-and-AUTHORS-files-in-the-wheel-s-di.patch new file mode 100644 index 000000000000..834a553f44b6 --- /dev/null +++ b/patches/fastremap/1.21.0/0001-ship-the-LICENSE-and-AUTHORS-files-in-the-wheel-s-di.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Thu, 22 Oct 2026 12:00:00 +0200 +Subject: [PATCH] ship the LICENSE and AUTHORS files in the wheel's dist-info + +Since 1.21.0 the build backend is meson-python, which only copies the files +named in `license-files` and has no implicit LICEN[CS]E*/AUTHORS* fallback +(setuptools, used up to 1.20.0, did). With the legacy `license = { text = }` +table and no `license-files`, the wheel carries no LICENSE at all. + +pyproject-metadata only accepts `license-files` next to an SPDX expression, +so `LGPL-3.0` (a deprecated identifier) becomes its replacement +`LGPL-3.0-only`, the same licence. + +Upstream-Status: To upstream [not yet submitted; no fork of seung-lab/fastremap to push from] +--- +diff --git a/pyproject.toml b/pyproject.toml +index 38983ff..e748e79 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -13,7 +13,8 @@ dynamic = ["version"] + description = 'Remap, mask, renumber, unique, and in-place transposition of 3D labeled images. Point cloud too.' + readme = { file = 'README.md', content-type = 'text/markdown' } + requires-python = '>=3.9,<4.0' +-license = { text = 'LGPL-3.0' } ++license = 'LGPL-3.0-only' ++license-files = ['LICENSE', 'AUTHORS'] + authors = [ + { name = 'William Silversmith', email = 'ws9@princeton.edu' }, + ]