python312Packages.gradio: 5.11.0 -> 5.20.0 (#382974)

authored by Gaétan Lepage and committed by GitHub 2ffed2bc 172dc331

+118 -71
+10 -7
pkgs/development/python-modules/gradio-pdf/default.nix
··· 1 { 2 lib, 3 buildPythonPackage, 4 - fetchPypi, 5 hatch-fancy-pypi-readme, 6 hatch-requirements-txt, 7 hatchling, ··· 9 gradio-client, 10 }: 11 12 - buildPythonPackage rec { 13 pname = "gradio-pdf"; 14 - version = "0.0.19"; 15 pyproject = true; 16 17 - src = fetchPypi { 18 - pname = "gradio_pdf"; 19 - inherit version; 20 - hash = "sha256-UVHNyKU2cl/0HZqntnyBOFmgeIJ6UjJejEqKqFIPdoo="; 21 }; 22 23 build-system = [
··· 1 { 2 lib, 3 buildPythonPackage, 4 + fetchFromGitHub, 5 hatch-fancy-pypi-readme, 6 hatch-requirements-txt, 7 hatchling, ··· 9 gradio-client, 10 }: 11 12 + buildPythonPackage { 13 pname = "gradio-pdf"; 14 + version = "0.0.22"; 15 pyproject = true; 16 17 + src = fetchFromGitHub { 18 + owner = "freddyaboulton"; 19 + repo = "gradio-pdf"; 20 + # No source release on Pypi 21 + # No tags on GitHub 22 + rev = "8833e9cd419d2a5eeff98e3ae8cbe690913bcfce"; 23 + hash = "sha256-z9rfVnH2qANDp2ukUGSogADbwqQQzCkB7Cp/04UtEpM="; 24 }; 25 26 build-system = [
+20 -20
pkgs/development/python-modules/gradio/client.nix
··· 4 buildPythonPackage, 5 fetchFromGitHub, 6 nix-update-script, 7 - pythonOlder, 8 - # pyproject 9 hatchling, 10 hatch-requirements-txt, 11 hatch-fancy-pypi-readme, 12 - # runtime 13 setuptools, 14 fsspec, 15 httpx, ··· 17 packaging, 18 typing-extensions, 19 websockets, 20 - # checkInputs 21 - pytestCheckHook, 22 - pytest-asyncio, 23 pydub, 24 rich, 25 - tomlkit, 26 - gradio, 27 safehttpx, 28 }: 29 30 buildPythonPackage rec { 31 pname = "gradio-client"; 32 - version = "1.5.3"; 33 pyproject = true; 34 - 35 - disabled = pythonOlder "3.8"; 36 37 # no tests on pypi 38 src = fetchFromGitHub { ··· 41 # not to be confused with @gradio/client@${version} 42 tag = "gradio_client@${version}"; 43 sparseCheckout = [ "client/python" ]; 44 - hash = "sha256-u4GQYtCeAMDqRRbZGtjfqIHwuHyxUpw6kRE75SJMALg="; 45 }; 46 - prePatch = '' 47 - cd client/python 48 - ''; 49 50 # upstream adds upper constraints because they can, not because the need to 51 # https://github.com/gradio-app/gradio/pull/4885 ··· 71 ]; 72 73 nativeCheckInputs = [ 74 pytestCheckHook 75 - pytest-asyncio 76 - pydub 77 rich 78 - tomlkit 79 safehttpx 80 - gradio.sans-reverse-dependencies 81 ]; 82 # ensuring we don't propagate this intermediate build 83 disallowedReferences = [ gradio.sans-reverse-dependencies ]; 84 85 # Add a pytest hook skipping tests that access network, marking them as "Expected fail" (xfail). 86 preCheck = '' 87 - export HOME=$TMPDIR 88 cat ${./conftest-skip-network-errors.py} >> test/conftest.py 89 ''; 90
··· 4 buildPythonPackage, 5 fetchFromGitHub, 6 nix-update-script, 7 + 8 + # build-system 9 hatchling, 10 hatch-requirements-txt, 11 hatch-fancy-pypi-readme, 12 + 13 + # dependencies 14 setuptools, 15 fsspec, 16 httpx, ··· 18 packaging, 19 typing-extensions, 20 websockets, 21 + 22 + # tests 23 + gradio, 24 pydub, 25 + pytest-asyncio, 26 + pytestCheckHook, 27 rich, 28 safehttpx, 29 + tomlkit, 30 + writableTmpDirAsHomeHook, 31 }: 32 33 buildPythonPackage rec { 34 pname = "gradio-client"; 35 + version = "1.7.2"; 36 pyproject = true; 37 38 # no tests on pypi 39 src = fetchFromGitHub { ··· 42 # not to be confused with @gradio/client@${version} 43 tag = "gradio_client@${version}"; 44 sparseCheckout = [ "client/python" ]; 45 + hash = "sha256-9hEls6f3aBNg7W2RGhu68mJSGlUScpNqMGsdHxTGyRY="; 46 }; 47 + 48 + sourceRoot = "${src.name}/client/python"; 49 50 # upstream adds upper constraints because they can, not because the need to 51 # https://github.com/gradio-app/gradio/pull/4885 ··· 71 ]; 72 73 nativeCheckInputs = [ 74 + gradio.sans-reverse-dependencies 75 + pydub 76 + pytest-asyncio 77 pytestCheckHook 78 rich 79 safehttpx 80 + tomlkit 81 + writableTmpDirAsHomeHook 82 ]; 83 # ensuring we don't propagate this intermediate build 84 disallowedReferences = [ gradio.sans-reverse-dependencies ]; 85 86 # Add a pytest hook skipping tests that access network, marking them as "Expected fail" (xfail). 87 preCheck = '' 88 cat ${./conftest-skip-network-errors.py} >> test/conftest.py 89 ''; 90
+45 -44
pkgs/development/python-modules/gradio/default.nix
··· 2 lib, 3 stdenv, 4 buildPythonPackage, 5 - fetchPypi, 6 fetchFromGitHub, 7 - fetchpatch, 8 - pythonOlder, 9 writeShellScriptBin, 10 gradio, 11 12 - # pyproject 13 hatchling, 14 hatch-requirements-txt, 15 hatch-fancy-pypi-readme, ··· 19 nodejs, 20 pnpm_9, 21 22 - # runtime 23 setuptools, 24 aiofiles, 25 anyio, ··· 27 fastapi, 28 ffmpy, 29 gradio-client, 30 httpx, 31 huggingface-hub, 32 importlib-resources, ··· 53 authlib, 54 itsdangerous, 55 56 - # check 57 pytestCheckHook, 58 hypothesis, 59 altair, ··· 68 tqdm, 69 transformers, 70 vega-datasets, 71 }: 72 73 buildPythonPackage rec { 74 pname = "gradio"; 75 - version = "5.11.0"; 76 pyproject = true; 77 78 - disabled = pythonOlder "3.7"; 79 - 80 - # unfortunately no fetchPypi due to https://github.com/gradio-app/gradio/pull/9778 81 src = fetchFromGitHub { 82 owner = "gradio-app"; 83 repo = "gradio"; 84 tag = "gradio@${version}"; 85 - hash = "sha256-HW0J7oSkCo4DIHpU4LUoBZ2jmmrv5Xd64floA4uyo5A="; 86 }; 87 88 pnpmDeps = pnpm_9.fetchDeps { 89 inherit pname version src; 90 - hash = "sha256-9fAkP2zV3OfyROdtvmS94ujpkGmlB0wGOaWS13LgJTM="; 91 - }; 92 - 93 - # fix packaging.ParserSyntaxError, which can't handle comments 94 - postPatch = '' 95 - sed -i -e "s/ #.*$//g" requirements*.txt 96 - ''; 97 98 pythonRelaxDeps = [ 99 - "tomlkit" 100 "aiofiles" 101 "markupsafe" 102 - "pillow" 103 ]; 104 105 pythonRemoveDeps = [ 106 - # our package is presented as a binary, not a python lib - and 107 # this isn't a real runtime dependency 108 "ruff" 109 ]; ··· 128 fastapi 129 ffmpy 130 gradio-client 131 httpx 132 huggingface-hub 133 importlib-resources ··· 156 itsdangerous 157 ]; 158 159 - nativeCheckInputs = [ 160 - pytestCheckHook 161 - hypothesis 162 - altair 163 - boto3 164 - gradio-pdf 165 - ffmpeg 166 - ipython 167 - pytest-asyncio 168 - respx 169 - scikit-image 170 - # shap is needed as well, but breaks too often 171 - torch 172 - tqdm 173 - transformers 174 - vega-datasets 175 176 - # mock calls to `shutil.which(...)` 177 - (writeShellScriptBin "npm" "false") 178 - ] ++ optional-dependencies.oauth ++ pydantic.optional-dependencies.email; 179 180 preBuild = '' 181 pnpm build ··· 191 # We additionally xfail FileNotFoundError, since the gradio devs often fail to upload test assets to pypi. 192 preCheck = 193 '' 194 - export HOME=$TMPDIR 195 cat ${./conftest-skip-network-errors.py} >> test/conftest.py 196 '' 197 + lib.optionalString stdenv.hostPlatform.isDarwin '' 198 - # OSError: [Errno 24] Too many open files 199 ulimit -n 4096 200 ''; 201 ··· 250 "test_get_executable_path" 251 ] 252 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 253 # flaky on darwin (depend on port availability) 254 "test_all_status_messages" 255 "test_async_generators" ··· 316 ]; 317 318 # check the binary works outside the build env 319 - doInstallCheck = true; 320 - postInstallCheck = '' 321 env --ignore-environment $out/bin/gradio environment >/dev/null 322 ''; 323
··· 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 writeShellScriptBin, 7 gradio, 8 9 + # build-system 10 hatchling, 11 hatch-requirements-txt, 12 hatch-fancy-pypi-readme, ··· 16 nodejs, 17 pnpm_9, 18 19 + # dependencies 20 setuptools, 21 aiofiles, 22 anyio, ··· 24 fastapi, 25 ffmpy, 26 gradio-client, 27 + groovy, 28 httpx, 29 huggingface-hub, 30 importlib-resources, ··· 51 authlib, 52 itsdangerous, 53 54 + # tests 55 pytestCheckHook, 56 hypothesis, 57 altair, ··· 66 tqdm, 67 transformers, 68 vega-datasets, 69 + writableTmpDirAsHomeHook, 70 }: 71 72 buildPythonPackage rec { 73 pname = "gradio"; 74 + version = "5.20.0"; 75 pyproject = true; 76 77 src = fetchFromGitHub { 78 owner = "gradio-app"; 79 repo = "gradio"; 80 tag = "gradio@${version}"; 81 + hash = "sha256-gAAyhsnc1LUcAvlUC5hftsWN1kSiRWqcQ4iKGpSIL+U="; 82 }; 83 84 pnpmDeps = pnpm_9.fetchDeps { 85 inherit pname version src; 86 + hash = "sha256-y0Bdupn19gEtwatc6Q3KD7aekXDk0xrq04LaG7gxMFI="; 87 + }; 88 89 pythonRelaxDeps = [ 90 "aiofiles" 91 "markupsafe" 92 ]; 93 94 pythonRemoveDeps = [ 95 # this isn't a real runtime dependency 96 "ruff" 97 ]; ··· 116 fastapi 117 ffmpy 118 gradio-client 119 + groovy 120 httpx 121 huggingface-hub 122 importlib-resources ··· 145 itsdangerous 146 ]; 147 148 + nativeCheckInputs = 149 + [ 150 + pytestCheckHook 151 + hypothesis 152 + altair 153 + boto3 154 + gradio-pdf 155 + ffmpeg 156 + ipython 157 + pytest-asyncio 158 + respx 159 + scikit-image 160 + # shap is needed as well, but breaks too often 161 + torch 162 + tqdm 163 + transformers 164 + vega-datasets 165 166 + # mock calls to `shutil.which(...)` 167 + (writeShellScriptBin "npm" "false") 168 + writableTmpDirAsHomeHook 169 + ] 170 + ++ optional-dependencies.oauth 171 + ++ pydantic.optional-dependencies.email; 172 173 preBuild = '' 174 pnpm build ··· 184 # We additionally xfail FileNotFoundError, since the gradio devs often fail to upload test assets to pypi. 185 preCheck = 186 '' 187 cat ${./conftest-skip-network-errors.py} >> test/conftest.py 188 '' 189 + # OSError: [Errno 24] Too many open files 190 + lib.optionalString stdenv.hostPlatform.isDarwin '' 191 ulimit -n 4096 192 ''; 193 ··· 242 "test_get_executable_path" 243 ] 244 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 245 + # TypeError: argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'NoneType' 246 + "test_component_example_values" 247 + "test_component_functions" 248 + "test_public_request_pass" 249 + 250 + # Failed: DID NOT RAISE <class 'ValueError'> 251 + # test.conftest.NixNetworkAccessDeniedError 252 + "test_private_request_fail" 253 + "test_theme_builder_launches" 254 + 255 # flaky on darwin (depend on port availability) 256 "test_all_status_messages" 257 "test_async_generators" ··· 318 ]; 319 320 # check the binary works outside the build env 321 + postCheck = '' 322 env --ignore-environment $out/bin/gradio environment >/dev/null 323 ''; 324
+41
pkgs/development/python-modules/groovy/default.nix
···
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchPypi, 5 + hatchling, 6 + gradio, 7 + pytestCheckHook, 8 + }: 9 + 10 + buildPythonPackage rec { 11 + pname = "groovy"; 12 + version = "0.1.2"; 13 + pyproject = true; 14 + 15 + src = fetchPypi { 16 + inherit pname version; 17 + hash = "sha256-JcHcCbP51+KSRYqnYsa+uW6gNwcb9ekX/IH7eNIjEIM="; 18 + }; 19 + 20 + build-system = [ 21 + hatchling 22 + ]; 23 + 24 + pythonImportsCheck = [ "groovy" ]; 25 + 26 + nativeCheckInputs = [ 27 + gradio 28 + pytestCheckHook 29 + ]; 30 + 31 + # Attempts to load a cert file 32 + # FileNotFoundError: [Errno 2] No such file or directory 33 + doCheck = false; 34 + 35 + meta = { 36 + description = "Small Python library created to help developers protect their applications from Server Side Request Forgery (SSRF) attacks"; 37 + homepage = "https://pypi.org/project/groovy"; 38 + license = lib.licenses.asl20; 39 + maintainers = with lib.maintainers; [ GaetanLepage ]; 40 + }; 41 + }
+2
pkgs/top-level/python-packages.nix
··· 5724 5725 groestlcoin-hash = callPackage ../development/python-modules/groestlcoin-hash { }; 5726 5727 grpc-google-iam-v1 = callPackage ../development/python-modules/grpc-google-iam-v1 { }; 5728 5729 grpc-interceptor = callPackage ../development/python-modules/grpc-interceptor { };
··· 5724 5725 groestlcoin-hash = callPackage ../development/python-modules/groestlcoin-hash { }; 5726 5727 + groovy = callPackage ../development/python-modules/groovy { }; 5728 + 5729 grpc-google-iam-v1 = callPackage ../development/python-modules/grpc-google-iam-v1 { }; 5730 5731 grpc-interceptor = callPackage ../development/python-modules/grpc-interceptor { };