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