depot/third_party/nixpkgs/pkgs/development/python-modules/async-lru/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

43 lines
845 B
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, pytestCheckHook
, pytest-asyncio
}:
buildPythonPackage rec {
pname = "async-lru";
version = "1.0.3";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "aio-libs";
repo = "async-lru";
rev = "v${version}";
hash = "sha256-98ZPFSOFRnymTCfCG9OuajfxXAWyCrByyJEHhpPVPbM=";
};
postPatch = ''
sed -i -e '/^addopts/d' -e '/^filterwarnings/,+2d' setup.cfg
'';
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
];
pytestFlagsArray = [
"--asyncio-mode=strict"
];
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 ];
};
}