2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytest-django,
|
|
|
|
pytest-xdist,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "diskcache";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "5.6.3";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grantjenks";
|
|
|
|
repo = "python-diskcache";
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-1cDpdf+rLaG14TDd1wEHAiYXb69NFTFeOHD1Ib1oOVY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
pytest-django
|
2022-01-13 20:06:32 +00:00
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" tox.ini
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Darwin sandbox causes most tests to fail
|
2024-09-26 11:04:55 +00:00
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
2022-01-13 20:06:32 +00:00
|
|
|
# Very time sensitive, can fail on over subscribed machines
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_incr_update_keyerror"
|
2022-01-13 20:06:32 +00:00
|
|
|
# AssertionError: 'default' is not None
|
|
|
|
"test_decr_version"
|
|
|
|
"test_incr_version"
|
|
|
|
"test_get_or_set"
|
|
|
|
"test_get_many"
|
2022-08-12 12:06:08 +00:00
|
|
|
# see https://github.com/grantjenks/python-diskcache/issues/260
|
|
|
|
"test_cache_write_unpicklable_object"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "diskcache" ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Disk and file backed persistent cache";
|
|
|
|
homepage = "http://www.grantjenks.com/docs/diskcache/";
|
|
|
|
license = licenses.asl20;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|