c7cb07f092
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{ lib
|
|
, fetchPypi
|
|
, buildPythonPackage
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "multidict";
|
|
version = "6.0.5";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-9+MBB17a9QUA8LNBVDxBGU2N865cr0cC8glfPKc92No=";
|
|
};
|
|
|
|
postPatch = ''
|
|
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",' ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
preCheck = ''
|
|
# import from $out
|
|
rm -r multidict
|
|
'';
|
|
|
|
pythonImportsCheck = [ "multidict" ];
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/aio-libs/multidict/blob/v${version}/CHANGES.rst";
|
|
description = "Multidict implementation";
|
|
homepage = "https://github.com/aio-libs/multidict/";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|