Files
nixpkgs/pkgs/development/python-modules/numcodecs/default.nix
Wolfgang Walther 6af5508cbc python3Packages.numcodecs: avoid bash eval in pytestFlagsArray
We can just cd to $out to let the tests run from that folder
automatically. Additionally we get better test output, because the
/nix/store component is missing from file names.
2024-11-09 18:11:37 +01:00

71 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
python,
pythonOlder,
# build-system
setuptools,
setuptools-scm,
cython,
py-cpuinfo,
# dependencies
numpy,
# tests
msgpack,
pytestCheckHook,
importlib-metadata,
}:
buildPythonPackage rec {
pname = "numcodecs";
version = "0.13.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-o883iB3wiY86nA1Ed9+IEz/oUYW//le6MbzC+iB3Cbw=";
};
build-system = [
setuptools
setuptools-scm
cython
py-cpuinfo
];
dependencies = [ numpy ];
optional-dependencies = {
msgpack = [ msgpack ];
# zfpy = [ zfpy ];
};
preBuild = lib.optionalString (stdenv.hostPlatform.isx86 && !stdenv.hostPlatform.avx2Support) ''
export DISABLE_NUMCODECS_AVX2=1
'';
nativeCheckInputs = [
pytestCheckHook
msgpack
importlib-metadata
];
# https://github.com/NixOS/nixpkgs/issues/255262
preCheck = "pushd $out";
postCheck = "popd";
meta = {
homepage = "https://github.com/zarr-developers/numcodecs";
license = lib.licenses.mit;
description = "Buffer compression and transformation codecs for use in data storage and communication applications";
maintainers = with lib.maintainers; [ doronbehar ];
};
}