2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-12-06 16:07:01 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, flit-core
|
2020-10-11 12:50:04 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "threadpoolctl";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "3.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joblib";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-/qt7cgFbvpc1BLZC7a4S0RToqSggKXAqF1Xr6xOqzw8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
pytestCheckHook
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# accepts a limited set of cpu models based on project
|
|
|
|
# developers' hardware
|
|
|
|
"test_architecture"
|
2022-10-30 15:09:59 +00:00
|
|
|
# https://github.com/joblib/threadpoolctl/issues/128
|
|
|
|
"test_command_line_command_flag"
|
|
|
|
"test_command_line_import_flag"
|
2022-11-04 12:27:35 +00:00
|
|
|
"test_controller_info_actualized"
|
|
|
|
"test_set_threadpool_limits_by_api"
|
|
|
|
"test_set_threadpool_limits_no_limit"
|
|
|
|
"test_threadpool_limits_by_prefix"
|
|
|
|
"test_threadpool_limits_function_with_side_effect"
|
|
|
|
"test_threadpool_limits_manual_restore"
|
2022-10-30 15:09:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"threadpoolctl"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|