2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-django
|
2022-01-13 20:06:32 +00:00
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "diskcache";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "5.4.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "grantjenks";
|
|
|
|
repo = "python-diskcache";
|
|
|
|
rev = "v${version}";
|
2022-01-13 20:06:32 +00:00
|
|
|
hash = "sha256-c/k8mx/T4RkseDobJ2gtcuom0A6Ewyw4aP2Bk9pxV+o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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
|
2021-02-05 17:12:51 +00:00
|
|
|
doCheck = !stdenv.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
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"diskcache"
|
|
|
|
];
|
|
|
|
|
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;
|
2022-01-13 20:06:32 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|