python311Packages.gradio: 4.20.1 -> 4.22.0

This commit is contained in:
Peder Bergebakken Sundt 2024-03-22 20:33:30 +01:00
parent f1bb72c481
commit 3937a5d979

View File

@ -16,6 +16,7 @@
, setuptools , setuptools
, aiofiles , aiofiles
, altair , altair
, diffusers
, fastapi , fastapi
, ffmpy , ffmpy
, gradio-client , gradio-client
@ -40,6 +41,10 @@
, typer , typer
, tomlkit , tomlkit
# oauth
, authlib
, itsdangerous
# check # check
, pytestCheckHook , pytestCheckHook
, boto3 , boto3
@ -57,7 +62,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "gradio"; pname = "gradio";
version = "4.20.1"; version = "4.22.0";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -66,7 +71,7 @@ buildPythonPackage rec {
# and upstream has stopped tagging releases since 3.41.0 # and upstream has stopped tagging releases since 3.41.0
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-nvuIpOFib09FJGfkX0TDfb2LV/eDn3EybsFp5A3lzas="; hash = "sha256-nhrT509xB3+R+HF6TF5AQGnfufT6iNmzjxZgcVL7fBo=";
}; };
# fix packaging.ParserSyntaxError, which can't handle comments # fix packaging.ParserSyntaxError, which can't handle comments
@ -98,6 +103,7 @@ buildPythonPackage rec {
setuptools # needed for 'pkg_resources' setuptools # needed for 'pkg_resources'
aiofiles aiofiles
altair altair
diffusers
fastapi fastapi
ffmpy ffmpy
gradio-client gradio-client
@ -123,6 +129,11 @@ buildPythonPackage rec {
tomlkit tomlkit
] ++ typer.passthru.optional-dependencies.all; ] ++ typer.passthru.optional-dependencies.all;
passthru.optional-dependencies.oauth = [
authlib
itsdangerous
];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook
boto3 boto3
@ -138,9 +149,11 @@ buildPythonPackage rec {
transformers transformers
vega-datasets vega-datasets
# mock npm to make `shutil.which("npm")` pass # mock calls to `shutil.which(...)`
(writeShellScriptBin "npm" "false") (writeShellScriptBin "npm" "false")
] ++ pydantic.passthru.optional-dependencies.email; ]
++ passthru.optional-dependencies.oauth
++ pydantic.passthru.optional-dependencies.email;
# Add a pytest hook skipping tests that access network, marking them as "Expected fail" (xfail). # Add a pytest hook skipping tests that access network, marking them as "Expected fail" (xfail).
# We additionally xfail FileNotFoundError, since the gradio devs often fail to upload test assets to pypi. # We additionally xfail FileNotFoundError, since the gradio devs often fail to upload test assets to pypi.
@ -173,6 +186,9 @@ buildPythonPackage rec {
# fails without network # fails without network
"test_download_if_url_correct_parse" "test_download_if_url_correct_parse"
# tests if pip and other tools are installed
"test_get_executable_path"
]; ];
disabledTestPaths = [ disabledTestPaths = [
# 100% touches network # 100% touches network
@ -196,19 +212,17 @@ buildPythonPackage rec {
# Cyclic dependencies are fun! # Cyclic dependencies are fun!
# This is gradio without gradio-client and gradio-pdf # This is gradio without gradio-client and gradio-pdf
passthru = { passthru.sans-reverse-dependencies = (gradio.override (old: {
sans-reverse-dependencies = (gradio.override (old: {
gradio-client = null; gradio-client = null;
gradio-pdf = null; gradio-pdf = null;
})).overridePythonAttrs (old: { })).overridePythonAttrs (old: {
pname = old.pname + "-sans-client"; pname = old.pname + "-sans-reverse-dependencies";
pythonRemoveDeps = (old.pythonRemoveDeps or []) ++ [ "gradio-client" ]; pythonRemoveDeps = (old.pythonRemoveDeps or []) ++ [ "gradio-client" ];
doInstallCheck = false; doInstallCheck = false;
doCheck = false; doCheck = false;
pythonImportsCheck = null; pythonImportsCheck = null;
dontCheckRuntimeDeps = true; dontCheckRuntimeDeps = true;
}); });
};
meta = with lib; { meta = with lib; {
homepage = "https://www.gradio.app/"; homepage = "https://www.gradio.app/";