1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 jaraco-classes,
7 more-itertools,
8 pytestCheckHook,
9 setuptools-scm,
10 setuptools,
11 pythonOlder,
12}:
13
14buildPythonPackage rec {
15 pname = "jaraco-functools";
16 version = "4.1.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchPypi {
22 pname = "jaraco_functools";
23 inherit version;
24 hash = "sha256-cPfg4q4HZJjiElYjJegFIE/Akte0wX4OhslZ4klwGp0=";
25 };
26
27 build-system = [
28 setuptools
29 setuptools-scm
30 ];
31
32 dependencies = [ more-itertools ];
33
34 nativeCheckInputs = [
35 jaraco-classes
36 pytestCheckHook
37 ];
38
39 # test is flaky on darwin
40 disabledTests = if stdenv.hostPlatform.isDarwin then [ "test_function_throttled" ] else null;
41
42 pythonNamespaces = [ "jaraco" ];
43
44 pythonImportsCheck = [ "jaraco.functools" ];
45
46 meta = with lib; {
47 description = "Additional functools in the spirit of stdlib's functools";
48 homepage = "https://github.com/jaraco/jaraco.functools";
49 changelog = "https://github.com/jaraco/jaraco.functools/blob/v${version}/NEWS.rst";
50 license = licenses.mit;
51 maintainers = [ ];
52 };
53}