nixpkgs/pkgs/development/python-modules/numexpr/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

57 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
numpy,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "numexpr";
version = "2.14.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-S+ALEIbHt6XDLjFVgSK3uAJD/gmFebFwln2oPzFStIs=";
};
build-system = [
setuptools
numpy
];
dependencies = [ numpy ];
preBuild = ''
# Remove existing site.cfg, use the one we built for numpy
ln -s ${numpy.cfg} site.cfg
'';
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
pushd $out
'';
postCheck = ''
popd
'';
disabledTests = [
# fails on computers with more than 8 threads
# https://github.com/pydata/numexpr/issues/479
"test_numexpr_max_threads_empty_string"
"test_omp_num_threads_empty_string"
];
pythonImportsCheck = [ "numexpr" ];
meta = {
description = "Fast numerical array expression evaluator for NumPy";
homepage = "https://github.com/pydata/numexpr";
license = lib.licenses.mit;
maintainers = [ ];
};
}