1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "multidict";
12 version = "6.0.5";
13
14 disabled = pythonOlder "3.7";
15
16 pyproject = true;
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-9+MBB17a9QUA8LNBVDxBGU2N865cr0cC8glfPKc92No=";
21 };
22
23 postPatch = ''
24 substituteInPlace pytest.ini \
25 --replace-fail "-p pytest_cov" ""
26 sed -i '/--cov/d' pytest.ini
27 # `python3 -I -c "import multidict"` fails with ModuleNotFoundError
28 substituteInPlace tests/test_circular_imports.py \
29 --replace-fail '"-I",' ""
30 '';
31
32 nativeBuildInputs = [ setuptools ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 preCheck = ''
37 # import from $out
38 rm -r multidict
39 '';
40
41 pythonImportsCheck = [ "multidict" ];
42
43 meta = with lib; {
44 changelog = "https://github.com/aio-libs/multidict/blob/v${version}/CHANGES.rst";
45 description = "Multidict implementation";
46 homepage = "https://github.com/aio-libs/multidict/";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ dotlambda ];
49 };
50}