diff --git a/.github/workflows/build-numcodecs.yml b/.github/workflows/build-numcodecs.yml index fa3dd35ccb0..0ced68c0c44 100644 --- a/.github/workflows/build-numcodecs.yml +++ b/.github/workflows/build-numcodecs.yml @@ -89,10 +89,13 @@ jobs: CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }} # Repeats upstream's [tool.cibuildwheel] environment, which this replaces. # numpy resolves from our registry; the patch dirties the tree, so pin the - # version setuptools_scm would otherwise derive from git. + # version setuptools_scm would otherwise derive from git. numcodecs' own + # meson.build calls setuptools_scm.get_version() without dist_name (see + # src/numcodecs/_build_utils/gitversion.py), so only the unsuffixed + # SETUPTOOLS_SCM_PRETEND_VERSION is honored, not the _FOR_NUMCODECS form. CIBW_ENVIRONMENT: >- DISABLE_NUMCODECS_AVX2=1 - SETUPTOOLS_SCM_PRETEND_VERSION_FOR_NUMCODECS=${{ env.NUMCODECS_VERSION }} + SETUPTOOLS_SCM_PRETEND_VERSION=${{ env.NUMCODECS_VERSION }} PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ PIP_ONLY_BINARY=numpy # test_zstd shells out to the zstd CLI, which the manylinux image lacks; @@ -100,7 +103,10 @@ jobs: CIBW_BEFORE_TEST_LINUX: dnf -y install zstd CIBW_TEST_EXTRAS: test,test_extras,msgpack # Upstream's wheel job only imports numcodecs; run the bundled suite instead. - CIBW_TEST_COMMAND: python -c "import importlib.metadata as md, numcodecs.blosc, numcodecs.zstd, numcodecs.lz4, numcodecs.vlen, numcodecs.compat_ext, numcodecs._shuffle, numcodecs.fletcher32, numcodecs.jenkins as j; assert j.__file__.endswith('.so'), j.__file__; assert any(str(p).endswith('.dist-info/licenses/LICENSE.zstd') for p in md.files('numcodecs'))" && python -m pytest --pyargs numcodecs -q + # Since 0.17.0 the suite lives in a top-level tests/ dir, not inside the + # package, so it must be staged and run directly rather than via --pyargs. + CIBW_TEST_SOURCES: tests pyproject.toml + CIBW_TEST_COMMAND: python -c "import importlib.metadata as md, numcodecs.blosc, numcodecs.zstd, numcodecs.lz4, numcodecs.vlen, numcodecs.compat_ext, numcodecs._shuffle, numcodecs.fletcher32, numcodecs.jenkins as j; assert j.__file__.endswith('.so'), j.__file__; assert any(str(p).endswith('.dist-info/licenses/LICENSE.zstd') for p in md.files('numcodecs'))" && python -m pytest tests -q - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: diff --git a/docs/packages/numcodecs.yaml b/docs/packages/numcodecs.yaml index baab5913d47..5e4a0a3db0d 100644 --- a/docs/packages/numcodecs.yaml +++ b/docs/packages/numcodecs.yaml @@ -15,3 +15,4 @@ versions: - filename: numcodecs-0.16.5-cp314-cp314-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl sha256: d333930a34921a6fb2ed47670e36d5e7980f6600ad8ac7ba4fcc32aabea8f3c4 requires-python: '>=3.11' +- version: 0.17.0 diff --git a/patches/numcodecs/0.17.0/0001-package-the-vendored-Zstandard-licence-with-the-whee.patch b/patches/numcodecs/0.17.0/0001-package-the-vendored-Zstandard-licence-with-the-whee.patch new file mode 100644 index 00000000000..1eed299064e --- /dev/null +++ b/patches/numcodecs/0.17.0/0001-package-the-vendored-Zstandard-licence-with-the-whee.patch @@ -0,0 +1,72 @@ +From 549b17d44763dd0f767330f41635fa99f2344490 Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Fri, 28 Aug 2026 05:01:05 +0200 +Subject: [PATCH] package the vendored Zstandard licence with the wheels + +Upstream-Status: To upstream [not yet submitted; the same gap exists in every numcodecs wheel on PyPI, so it needs a maintainer discussion rather than a drive-by PR] + +numcodecs compiles the Zstandard sources that c-blosc vendors under +c-blosc/internal-complibs/zstd-1.5.6 into both numcodecs.zstd and +numcodecs.blosc, but that directory carries no licence text: c-blosc +strips it when vendoring, and its own LICENSES directory covers only +bitshuffle, fastlz, lz4, snappy, stdint and zlib/zlib-ng. The wheel's +license-files list globs exactly those, so every published numcodecs +wheel redistributes Zstandard in binary form without the copyright +notice its BSD-3-Clause licence requires to travel with it. + +Add zstd 1.5.6's own LICENSE at the project root and list it, so it +lands in dist-info/licenses beside the others. +--- + LICENSE.zstd | 30 ++++++++++++++++++++++++++++++ + pyproject.toml | 1 + + 2 files changed, 31 insertions(+) + create mode 100644 LICENSE.zstd + +diff --git a/LICENSE.zstd b/LICENSE.zstd +new file mode 100644 +index 0000000..7580028 +--- /dev/null ++++ b/LICENSE.zstd +@@ -0,0 +1,30 @@ ++BSD License ++ ++For Zstandard software ++ ++Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. ++ ++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 Facebook, nor Meta, 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 COPYRIGHT HOLDER 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. +diff --git a/pyproject.toml b/pyproject.toml +index 185ecc3..e6ff30e 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -36,6 +36,7 @@ maintainers = [ + license = "MIT" + license-files = [ + "LICENSE.txt", ++ "LICENSE.zstd", + "c-blosc/LICENSE.txt", + "c-blosc/LICENSES/*", + ]