depot/third_party/nixpkgs/pkgs/development/python-modules/multidict/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

50 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 ];
};
}