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