From 54b18b4e60eebd4116fca232f98b10bf3d898a16 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Thu, 29 Feb 2024 00:54:45 +0000 Subject: [PATCH] python3Packages.gradio: 4.9.1 -> 4.19.2, gradio-client: 0.7.3 -> 0.10.1 --- pkgs/development/python-modules/gradio/client.nix | 7 +++---- pkgs/development/python-modules/gradio/default.nix | 14 +++++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/gradio/client.nix b/pkgs/development/python-modules/gradio/client.nix index 1d7223e6a248..8ad76a907581 100644 --- a/pkgs/development/python-modules/gradio/client.nix +++ b/pkgs/development/python-modules/gradio/client.nix @@ -27,7 +27,7 @@ buildPythonPackage rec { pname = "gradio-client"; - version = "0.7.3"; + version = "0.10.1"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -36,10 +36,9 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "gradio-app"; repo = "gradio"; - #rev = "refs/tags/v${gradio.version}"; - rev = "dc131b64f05062447643217819ca630e483a11df"; # v4.9.1 is not tagged... + rev = "refs/tags/gradio_client@${version}"; sparseCheckout = [ "client/python" ]; - hash = "sha256-Zp1Zl53Va0pyyZEHDUpnldi4dtH2uss7PZQD+Le8+cA="; + hash = "sha256-cRsYqNMmzuybJI823lpUOmNcTdcTO8dJkp3cpjATZQU="; }; prePatch = '' cd client/python diff --git a/pkgs/development/python-modules/gradio/default.nix b/pkgs/development/python-modules/gradio/default.nix index bead2da9dfd7..c87c41631291 100644 --- a/pkgs/development/python-modules/gradio/default.nix +++ b/pkgs/development/python-modules/gradio/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { pname = "gradio"; - version = "4.9.1"; + version = "4.19.2"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -66,7 +66,7 @@ buildPythonPackage rec { # and upstream has stopped tagging releases since 3.41.0 src = fetchPypi { inherit pname version; - hash = "sha256-KosxlmU5pYvuy5zysscuWM25IGXin7RLGEM9V2xPQrU="; + hash = "sha256-b+WBW7Tfru0fx0Ijv/2R2nChtGMVivjF4D0BuwkGih0="; }; # fix packaging.ParserSyntaxError, which can't handle comments @@ -81,6 +81,12 @@ buildPythonPackage rec { "tomlkit" ]; + pythonRemoveDeps = [ + # our package is presented as a binary, not a python lib - and + # this isn't a real runtime dependency + "ruff" + ]; + nativeBuildInputs = [ pythonRelaxDepsHook hatchling @@ -164,6 +170,9 @@ buildPythonPackage rec { # shap is too often broken in nixpkgs "test_shapley_text" + + # fails without network + "test_download_if_url_correct_parse" ]; disabledTestPaths = [ # 100% touches network @@ -193,7 +202,6 @@ buildPythonPackage rec { gradio-pdf = null; })).overridePythonAttrs (old: { pname = old.pname + "-sans-client"; - nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pythonRelaxDepsHook ]; pythonRemoveDeps = (old.pythonRemoveDeps or []) ++ [ "gradio-client" ]; doInstallCheck = false; doCheck = false;