9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
71 lines
1.4 KiB
Nix
71 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, isPy27
|
|
, setuptools
|
|
, setuptools-scm
|
|
, cython
|
|
, entrypoints
|
|
, numpy
|
|
, msgpack
|
|
, py-cpuinfo
|
|
, pytestCheckHook
|
|
, python
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "numcodecs";
|
|
version = "0.11.0";
|
|
format ="pyproject";
|
|
disabled = isPy27;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-bAWLMh3oShcpKZsOrk1lKy5I6hyn+d8NplyxNHDmNes=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
setuptools-scm
|
|
cython
|
|
py-cpuinfo
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
entrypoints
|
|
numpy
|
|
msgpack
|
|
];
|
|
|
|
preBuild = if (stdenv.hostPlatform.isx86 && !stdenv.hostPlatform.avx2Support) then ''
|
|
export DISABLE_NUMCODECS_AVX2=
|
|
'' else null;
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"$out/${python.sitePackages}/numcodecs"
|
|
];
|
|
|
|
disabledTests = [
|
|
"test_backwards_compatibility"
|
|
|
|
"test_encode_decode"
|
|
"test_legacy_codec_broken"
|
|
"test_bytes"
|
|
|
|
# ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (3,) + inhomogeneous part.
|
|
# with numpy 1.24
|
|
"test_non_numpy_inputs"
|
|
];
|
|
|
|
meta = with lib;{
|
|
homepage = "https://github.com/zarr-developers/numcodecs";
|
|
license = licenses.mit;
|
|
description = "Buffer compression and transformation codecs for use in data storage and communication applications";
|
|
maintainers = [ maintainers.costrouc ];
|
|
};
|
|
}
|