depot/third_party/nixpkgs/pkgs/development/python-modules/async-lru/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

46 lines
935 B
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, typing-extensions
, pytestCheckHook
, pytest-asyncio
}:
buildPythonPackage rec {
pname = "async-lru";
version = "2.0.4";
disabled = pythonOlder "3.8";
format = "setuptools";
src = fetchFromGitHub {
owner = "aio-libs";
repo = "async-lru";
rev = "refs/tags/v${version}";
hash = "sha256-S2sOkgtS+YdMtVP7UHD3+oR8Fem8roLhhgVVfh33PcM=";
};
propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [
typing-extensions
];
postPatch = ''
sed -i -e '/^addopts/d' -e '/^filterwarnings/,+2d' setup.cfg
'';
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
];
pythonImportsCheck = [ "async_lru" ];
meta = with lib; {
description = "Simple lru cache for asyncio";
homepage = "https://github.com/wikibusiness/async_lru";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}