Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / threadpoolctl / default.nix
blob54d7fa1282931e29f8bce7c2e6facb87123d4158
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , flit-core
6 , pytestCheckHook
7 , numpy
8 , scipy
9 }:
11 buildPythonPackage rec {
12   pname = "threadpoolctl";
13   version = "3.1.0";
15   disabled = pythonOlder "3.6";
16   format = "pyproject";
18   src = fetchFromGitHub {
19     owner = "joblib";
20     repo = pname;
21     rev = version;
22     hash = "sha256-/qt7cgFbvpc1BLZC7a4S0RToqSggKXAqF1Xr6xOqzw8=";
23   };
25   nativeBuildInputs = [
26     flit-core
27   ];
29   nativeCheckInputs = [
30     pytestCheckHook
31     numpy
32     scipy
33   ];
35   disabledTests = [
36     # accepts a limited set of cpu models based on project
37     # developers' hardware
38     "test_architecture"
39     # https://github.com/joblib/threadpoolctl/issues/128
40     "test_command_line_command_flag"
41     "test_command_line_import_flag"
42     "test_controller_info_actualized"
43     "test_set_threadpool_limits_by_api"
44     "test_set_threadpool_limits_no_limit"
45     "test_threadpool_limits_by_prefix"
46     "test_threadpool_limits_function_with_side_effect"
47     "test_threadpool_limits_manual_restore"
48   ];
50   pythonImportsCheck = [
51     "threadpoolctl"
52   ];
54   meta = with lib; {
55     homepage = "https://github.com/joblib/threadpoolctl";
56     description = "Helpers to limit number of threads used in native libraries";
57     license = licenses.bsd3;
58     maintainers = with maintainers; [ bcdarwin ];
59   };