2021-03-20 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonOlder
|
2021-03-20 04:20:00 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "boltons";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "24.0.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mahmoud";
|
|
|
|
repo = "boltons";
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Ie5CPT2u/2/hAIhDzXT6CPzJwmbgt3B6q3oxqKYb27o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# Tests bind to localhost
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"boltons"
|
2021-03-20 04:20:00 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-01-13 20:06:32 +00:00
|
|
|
description = "Constructs, recipes, and snippets extending the Python standard library";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
2022-01-13 20:06:32 +00:00
|
|
|
Boltons is a set of over 200 BSD-licensed, pure-Python utilities
|
|
|
|
in the same spirit as - and yet conspicuously missing from - the
|
2020-04-24 23:36:52 +00:00
|
|
|
standard library, including:
|
|
|
|
|
|
|
|
- Atomic file saving, bolted on with fileutils
|
|
|
|
- A highly-optimized OrderedMultiDict, in dictutils
|
|
|
|
- Two types of PriorityQueue, in queueutils
|
|
|
|
- Chunked and windowed iteration, in iterutils
|
|
|
|
- Recursive data structure iteration and merging, with iterutils.remap
|
|
|
|
- Exponential backoff functionality, including jitter, through
|
|
|
|
iterutils.backoff
|
|
|
|
- A full-featured TracebackInfo type, for representing stack
|
|
|
|
traces, in tbutils
|
|
|
|
'';
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://github.com/mahmoud/boltons";
|
|
|
|
changelog = "https://github.com/mahmoud/boltons/blob/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ twey ];
|
|
|
|
};
|
|
|
|
}
|