Skip to content

Commit f2adac5

Browse files
numcodecs: Add version 0.17.0 (#1998)
1 parent 72cdfeb commit f2adac5

3 files changed

Lines changed: 82 additions & 3 deletions

File tree

‎.github/workflows/build-numcodecs.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,24 @@ jobs:
8989
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
9090
# Repeats upstream's [tool.cibuildwheel] environment, which this replaces.
9191
# numpy resolves from our registry; the patch dirties the tree, so pin the
92-
# version setuptools_scm would otherwise derive from git.
92+
# version setuptools_scm would otherwise derive from git. numcodecs' own
93+
# meson.build calls setuptools_scm.get_version() without dist_name (see
94+
# src/numcodecs/_build_utils/gitversion.py), so only the unsuffixed
95+
# SETUPTOOLS_SCM_PRETEND_VERSION is honored, not the _FOR_NUMCODECS form.
9396
CIBW_ENVIRONMENT: >-
9497
DISABLE_NUMCODECS_AVX2=1
95-
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_NUMCODECS=${{ env.NUMCODECS_VERSION }}
98+
SETUPTOOLS_SCM_PRETEND_VERSION=${{ env.NUMCODECS_VERSION }}
9699
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
97100
PIP_ONLY_BINARY=numpy
98101
# test_zstd shells out to the zstd CLI, which the manylinux image lacks;
99102
# its availability check raises instead of skipping when it is missing.
100103
CIBW_BEFORE_TEST_LINUX: dnf -y install zstd
101104
CIBW_TEST_EXTRAS: test,test_extras,msgpack
102105
# Upstream's wheel job only imports numcodecs; run the bundled suite instead.
103-
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
106+
# Since 0.17.0 the suite lives in a top-level tests/ dir, not inside the
107+
# package, so it must be staged and run directly rather than via --pyargs.
108+
CIBW_TEST_SOURCES: tests pyproject.toml
109+
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
104110

105111
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
106112
with:

‎docs/packages/numcodecs.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ versions:
1515
- filename: numcodecs-0.16.5-cp314-cp314-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl
1616
sha256: d333930a34921a6fb2ed47670e36d5e7980f6600ad8ac7ba4fcc32aabea8f3c4
1717
requires-python: '>=3.11'
18+
- version: 0.17.0
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
From 549b17d44763dd0f767330f41635fa99f2344490 Mon Sep 17 00:00:00 2001
2+
From: Ludovic Henry <git@ludovic.dev>
3+
Date: Fri, 28 Aug 2026 05:01:05 +0200
4+
Subject: [PATCH] package the vendored Zstandard licence with the wheels
5+
6+
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]
7+
8+
numcodecs compiles the Zstandard sources that c-blosc vendors under
9+
c-blosc/internal-complibs/zstd-1.5.6 into both numcodecs.zstd and
10+
numcodecs.blosc, but that directory carries no licence text: c-blosc
11+
strips it when vendoring, and its own LICENSES directory covers only
12+
bitshuffle, fastlz, lz4, snappy, stdint and zlib/zlib-ng. The wheel's
13+
license-files list globs exactly those, so every published numcodecs
14+
wheel redistributes Zstandard in binary form without the copyright
15+
notice its BSD-3-Clause licence requires to travel with it.
16+
17+
Add zstd 1.5.6's own LICENSE at the project root and list it, so it
18+
lands in dist-info/licenses beside the others.
19+
---
20+
LICENSE.zstd | 30 ++++++++++++++++++++++++++++++
21+
pyproject.toml | 1 +
22+
2 files changed, 31 insertions(+)
23+
create mode 100644 LICENSE.zstd
24+
25+
diff --git a/LICENSE.zstd b/LICENSE.zstd
26+
new file mode 100644
27+
index 0000000..7580028
28+
--- /dev/null
29+
+++ b/LICENSE.zstd
30+
@@ -0,0 +1,30 @@
31+
+BSD License
32+
+
33+
+For Zstandard software
34+
+
35+
+Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
36+
+
37+
+Redistribution and use in source and binary forms, with or without modification,
38+
+are permitted provided that the following conditions are met:
39+
+
40+
+ * Redistributions of source code must retain the above copyright notice, this
41+
+ list of conditions and the following disclaimer.
42+
+
43+
+ * Redistributions in binary form must reproduce the above copyright notice,
44+
+ this list of conditions and the following disclaimer in the documentation
45+
+ and/or other materials provided with the distribution.
46+
+
47+
+ * Neither the name Facebook, nor Meta, nor the names of its contributors may
48+
+ be used to endorse or promote products derived from this software without
49+
+ specific prior written permission.
50+
+
51+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
52+
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53+
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
54+
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
55+
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
56+
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
57+
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
58+
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59+
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
60+
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61+
diff --git a/pyproject.toml b/pyproject.toml
62+
index 185ecc3..e6ff30e 100644
63+
--- a/pyproject.toml
64+
+++ b/pyproject.toml
65+
@@ -36,6 +36,7 @@ maintainers = [
66+
license = "MIT"
67+
license-files = [
68+
"LICENSE.txt",
69+
+ "LICENSE.zstd",
70+
"c-blosc/LICENSE.txt",
71+
"c-blosc/LICENSES/*",
72+
]

0 commit comments

Comments
 (0)