1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7}:
8
9buildPythonPackage rec {
10 pname = "boltons";
11 version = "24.0.0";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "mahmoud";
18 repo = "boltons";
19 rev = "refs/tags/${version}";
20 hash = "sha256-Ie5CPT2u/2/hAIhDzXT6CPzJwmbgt3B6q3oxqKYb27o=";
21 };
22
23 nativeCheckInputs = [ pytestCheckHook ];
24
25 # Tests bind to localhost
26 __darwinAllowLocalNetworking = true;
27
28 pythonImportsCheck = [ "boltons" ];
29
30 meta = with lib; {
31 description = "Constructs, recipes, and snippets extending the Python standard library";
32 longDescription = ''
33 Boltons is a set of over 200 BSD-licensed, pure-Python utilities
34 in the same spirit as - and yet conspicuously missing from - the
35 standard library, including:
36
37 - Atomic file saving, bolted on with fileutils
38 - A highly-optimized OrderedMultiDict, in dictutils
39 - Two types of PriorityQueue, in queueutils
40 - Chunked and windowed iteration, in iterutils
41 - Recursive data structure iteration and merging, with iterutils.remap
42 - Exponential backoff functionality, including jitter, through
43 iterutils.backoff
44 - A full-featured TracebackInfo type, for representing stack
45 traces, in tbutils
46 '';
47 homepage = "https://github.com/mahmoud/boltons";
48 changelog = "https://github.com/mahmoud/boltons/blob/${version}/CHANGELOG.md";
49 license = licenses.bsd3;
50 maintainers = with maintainers; [ twey ];
51 };
52}