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