depot/third_party/nixpkgs/pkgs/development/python-modules/cashews/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

70 lines
1.3 KiB
Nix

{
bitarray,
buildPythonPackage,
dill,
diskcache,
fetchFromGitHub,
hiredis,
hypothesis,
lib,
pytest,
pytest-asyncio,
pytest-cov-stub,
pytest-rerunfailures,
pytestCheckHook,
redis,
setuptools,
xxhash,
}:
buildPythonPackage rec {
pname = "cashews";
version = "7.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "Krukov";
repo = "cashews";
rev = "refs/tags/${version}";
hash = "sha256-7T9M8ioeTjW7OmcHyxZ6awNfp9kVU8Hi+Lgy17jXxK4=";
};
build-system = [ setuptools ];
passthru.optional-dependencies = {
dill = [ dill ];
diskcache = [ diskcache ];
redis = [ redis ];
speedup = [
bitarray
hiredis
xxhash
];
};
nativeCheckInputs = [
hypothesis
pytest
pytest-asyncio
pytest-cov-stub
pytest-rerunfailures
pytestCheckHook
];
disabledTests = [
# these tests require too many dependencies
"redis"
"diskcache"
"integration"
];
pythonImportsCheck = [ "cashews" ];
meta = {
description = "Cache tools with async power";
homepage = "https://github.com/Krukov/cashews/";
changelog = "https://github.com/Krukov/cashews/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ moraxyc ];
};
}