2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cherrypy,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flit-core,
|
|
|
|
filelock,
|
|
|
|
mock,
|
|
|
|
msgpack,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
redis,
|
|
|
|
requests,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "cachecontrol";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.14.0";
|
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ionrock";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "cachecontrol";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-myyqiUGna+5S2GJGnwZTOfLh49NhjfHAvpUB49dQbgY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ flit-core ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
msgpack
|
|
|
|
requests
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
filecache = [ filelock ];
|
|
|
|
redis = [ redis ];
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
cherrypy
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
requests
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "cachecontrol" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Httplib2 caching for requests";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "doesitcache";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/ionrock/cachecontrol";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/psf/cachecontrol/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|