diff options
Diffstat (limited to 'pkgs/development/python-modules/gradio/client.nix')
-rw-r--r-- | pkgs/development/python-modules/gradio/client.nix | 83 |
1 files changed, 47 insertions, 36 deletions
diff --git a/pkgs/development/python-modules/gradio/client.nix b/pkgs/development/python-modules/gradio/client.nix index 96c293d399c5..aa869e445c54 100644 --- a/pkgs/development/python-modules/gradio/client.nix +++ b/pkgs/development/python-modules/gradio/client.nix @@ -1,35 +1,35 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, gitUpdater -, pythonOlder -, pythonRelaxDepsHook -# pyproject -, hatchling -, hatch-requirements-txt -, hatch-fancy-pypi-readme -# runtime -, setuptools -, fsspec -, httpx -, huggingface-hub -, packaging -, requests -, typing-extensions -, websockets -# checkInputs -, pytestCheckHook -, pytest-asyncio -, pydub -, rich -, tomlkit -, gradio +{ + lib, + stdenv, + buildPythonPackage, + fetchFromGitHub, + nix-update-script, + pythonOlder, + # pyproject + hatchling, + hatch-requirements-txt, + hatch-fancy-pypi-readme, + # runtime + setuptools, + fsspec, + httpx, + huggingface-hub, + packaging, + typing-extensions, + websockets, + # checkInputs + pytestCheckHook, + pytest-asyncio, + pydub, + rich, + tomlkit, + gradio, }: buildPythonPackage rec { pname = "gradio-client"; - version = "0.14.0"; - format = "pyproject"; + version = "1.4.0"; + pyproject = true; disabled = pythonOlder "3.8"; @@ -37,9 +37,10 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "gradio-app"; repo = "gradio"; - rev = "refs/tags/@gradio/client@${version}"; + # not to be confused with @gradio/client@${version} + rev = "refs/tags/gradio_client@${version}"; sparseCheckout = [ "client/python" ]; - hash = "sha256-7oC/Z3YUiOFZdv/60q7PkfluV77broRkHgWiY9Vim9Y="; + hash = "sha256-pS7yrqBuq/Pe7sEfReAM6OL2qFQVA+vWra36UuhyDkk="; }; prePatch = '' cd client/python @@ -52,11 +53,10 @@ buildPythonPackage rec { "websockets" ]; - nativeBuildInputs = [ + build-system = [ hatchling hatch-requirements-txt hatch-fancy-pypi-readme - pythonRelaxDepsHook ]; dependencies = [ @@ -92,16 +92,27 @@ buildPythonPackage rec { #"-x" "-W" "ignore" # uncomment for debugging help ]; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ + # flaky: OSError: Cannot find empty port in range: 7860-7959 + "test_layout_components_in_output" + "test_layout_and_state_components_in_output" + "test_upstream_exceptions" + "test_httpx_kwargs" + ]; + pythonImportsCheck = [ "gradio_client" ]; __darwinAllowLocalNetworking = true; - passthru.updateScript = gitUpdater { rev-prefix = "@gradio/client@"; }; + passthru.updateScript = nix-update-script { + extraArgs = [ "--version-regex" "gradio_client@(.*)" ]; + }; - meta = with lib; { + meta = { homepage = "https://www.gradio.app/"; + changelog = "https://github.com/gradio-app/gradio/releases/tag/gradio_client@${version}"; description = "Lightweight library to use any Gradio app as an API"; - license = licenses.asl20; - maintainers = with maintainers; [ pbsds ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ pbsds ]; }; } |