From e1c7d5776f090ac68451be7a271c19371dc85a2b Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 31 May 2023 18:36:02 +0900 Subject: [PATCH] python3Packages.cacheyou: init at 23.3 --- .../python-modules/cacheyou/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/cacheyou/default.nix diff --git a/pkgs/development/python-modules/cacheyou/default.nix b/pkgs/development/python-modules/cacheyou/default.nix new file mode 100644 index 000000000000..375beadd4f6d --- /dev/null +++ b/pkgs/development/python-modules/cacheyou/default.nix @@ -0,0 +1,62 @@ +{ lib +, buildPythonPackage +, cherrypy +, fetchPypi +, filelock +, msgpack +, pdm-backend +, pytestCheckHook +, pythonOlder +, redis +, requests +}: + +buildPythonPackage rec { + pname = "cacheyou"; + version = "23.3"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + __darwinAllowLocalNetworking = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-fkCPFfSXj+oiR3NLMIYh919/4Wm0YWeVGccuioXWHV0="; + }; + + nativeBuildInputs = [ + pdm-backend + ]; + + propagatedBuildInputs = [ + msgpack + requests + ]; + + passthru.optional-dependencies = { + filecache = [ + filelock + ]; + redis = [ + redis + ]; + }; + + nativeCheckInputs = [ + cherrypy + pytestCheckHook + ] ++ passthru.optional-dependencies.filecache; + + pythonImportsCheck = [ + "cacheyou" + ]; + + meta = { + description = "The httplib2 caching algorithms packaged up for use with requests"; + homepage = "https://github.com/frostming/cacheyou"; + changelog = "https://github.com/frostming/cacheyou/releases/tag/${version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ natsukium ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7fef6b0d2445..f8f33ad8dd26 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1579,6 +1579,8 @@ self: super: with self; { cachey = callPackage ../development/python-modules/cachey { }; + cacheyou = callPackage ../development/python-modules/cacheyou { }; + cachy = callPackage ../development/python-modules/cachy { }; cadquery = callPackage ../development/python-modules/cadquery {