2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "multidict";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "6.0.5";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-9+MBB17a9QUA8LNBVDxBGU2N865cr0cC8glfPKc92No=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace-fail "-p pytest_cov" ""
|
|
|
|
sed -i '/--cov/d' pytest.ini
|
|
|
|
# `python3 -I -c "import multidict"` fails with ModuleNotFoundError
|
|
|
|
substituteInPlace tests/test_circular_imports.py \
|
|
|
|
--replace-fail '"-I",' ""
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2024-01-13 08:15:51 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
preCheck = ''
|
|
|
|
# import from $out
|
|
|
|
rm -r multidict
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [ "multidict" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/aio-libs/multidict/blob/v${version}/CHANGES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Multidict implementation";
|
|
|
|
homepage = "https://github.com/aio-libs/multidict/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|