blob: cae0b10ea6907bc8723c4a8900ff53d2eefb012d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ lib
, buildPythonPackage
, fetchpatch
, fetchPypi
, pythonAtLeast
, pythonOlder
# native
, flit-core
# propagates
, typing-extensions
# tests
, python
}:
buildPythonPackage rec {
pname = "aioitertools";
version = "0.8.0";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "8b02facfbc9b0f1867739949a223f3d3267ed8663691cc95abd94e2c1d8c2b46";
};
patches = lib.optionals (pythonAtLeast "3.10") [
(fetchpatch {
# Fix TypeError: wait() got an unexpected keyword argument 'loop'
# See https://github.com/omnilib/aioitertools/issues/84
url = "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/python-aioitertools/trunk/python310.patch";
sha256 = "sha256-F10sduGaLBcxEoP83N/lGpZIlzkM2JTnQnhHKFwc7P0=";
})
];
nativeBuildInputs = [
flit-core
];
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
typing-extensions
];
pythonImportsCheck = [
"aioitertools"
];
checkPhase = ''
${python.interpreter} -m unittest discover
'';
meta = with lib; {
description = "Implementation of itertools, builtins, and more for AsyncIO and mixed-type iterables.";
license = licenses.mit;
homepage = "https://pypi.org/project/aioitertools/";
maintainers = with maintainers; [ teh ];
};
}
|