depot/third_party/nixpkgs/pkgs/development/python-modules/threadpoolctl/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

38 lines
832 B
Nix

{ lib
, buildPythonPackage
, isPy27
, fetchFromGitHub
, flit
, pytest
, pytestcov
, numpy
, scipy
}:
buildPythonPackage rec {
pname = "threadpoolctl";
version = "2.0.0";
disabled = isPy27;
format = "flit";
src = fetchFromGitHub {
owner = "joblib";
repo = pname;
rev = version;
sha256 = "16z4n82f004i4l1jw6qrzazda1m6v2yjnpqlp71ipa8mzy9kw7dw";
};
checkInputs = [ pytest pytestcov numpy scipy ];
checkPhase = "pytest tests -k 'not test_nested_prange_blas'";
# cython doesn't get run on the tests when added to nativeBuildInputs, breaking this test
meta = with lib; {
homepage = "https://github.com/joblib/threadpoolctl";
description = "Helpers to limit number of threads used in native libraries";
license = licenses.bsd3;
maintainers = with maintainers; [ bcdarwin ];
};
}