From ff89da0ee6a89d60865c601b3eb27489f4fd79ef Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 25 Mar 2023 04:20:00 +0000 Subject: [PATCH] python310Packages.jupyter-cache: fix build Relax dependency on SQLAlchemy. --- .../python-modules/jupyter-cache/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/jupyter-cache/default.nix b/pkgs/development/python-modules/jupyter-cache/default.nix index 7cf7fab7889d..593fb90720b2 100644 --- a/pkgs/development/python-modules/jupyter-cache/default.nix +++ b/pkgs/development/python-modules/jupyter-cache/default.nix @@ -10,11 +10,14 @@ , sqlalchemy , tabulate , pythonOlder +, setuptools +, pythonRelaxDepsHook }: buildPythonPackage rec { pname = "jupyter-cache"; version = "0.5.0"; + format = "pyproject"; disabled = pythonOlder "3.7"; @@ -23,10 +26,10 @@ buildPythonPackage rec { sha256 = "87408030a4c8c14fe3f8fe62e6ceeb24c84e544c7ced20bfee45968053d07801"; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "nbclient>=0.2,<0.6" "nbclient" - ''; + nativeBuildInputs = [ + setuptools + pythonRelaxDepsHook + ]; propagatedBuildInputs = [ attrs @@ -39,6 +42,11 @@ buildPythonPackage rec { tabulate ]; + pythonRelaxDeps = [ + "nbclient" + "sqlalchemy" # See https://github.com/executablebooks/jupyter-cache/pull/93 + ]; + pythonImportsCheck = [ "jupyter_cache" ]; meta = with lib; {