Skip to content

Commit

Permalink
Merge pull request #310295 from GaetanLepage/gradio-client
Browse files Browse the repository at this point in the history
python311Packages.gradio-client: 0.14.0 -> 0.16.1, python311Packages.gradio: 4.27.0 -> 4.29.0
  • Loading branch information
drupol authored May 11, 2024
2 parents ac0133c + c207a5e commit acbbc1c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
26 changes: 23 additions & 3 deletions pkgs/development/python-modules/diffusers/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, fetchFromGitHub
, fetchpatch
, writeText
, setuptools
, wheel
Expand Down Expand Up @@ -35,6 +36,7 @@
, sentencepiece
, torchsde
, transformers
, pythonAtLeast
}:

buildPythonPackage rec {
Expand All @@ -51,12 +53,26 @@ buildPythonPackage rec {
hash = "sha256-aRnbU3jN40xaCsoMFyRt1XB+hyIYMJP2b/T1yZho90c=";
};

nativeBuildInputs = [
patches = [
# fix python3.12 build
(fetchpatch { # https://github.com/huggingface/diffusers/pull/7455
name = "001-remove-distutils.patch";
url = "https://github.com/huggingface/diffusers/compare/363699044e365ef977a7646b500402fa585e1b6b...3c67864c5acb30413911730b1ed4a9ad47c0a15c.patch";
hash = "sha256-Qyvyp1GyTVXN+A+lA1r2hf887ubTtaUknbKd4r46NZQ=";
})
(fetchpatch { # https://github.com/huggingface/diffusers/pull/7461
name = "002-fix-removed-distutils.patch";
url = "https://github.com/huggingface/diffusers/commit/efbbbc38e436a1abb1df41a6eccfd6f9f0333f97.patch";
hash = "sha256-scdtpX1RYFFEDHcaMb+gDZSsPafkvnIO/wQlpzrQhLA=";
})
];

build-system = [
setuptools
wheel
];

propagatedBuildInputs = [
dependencies = [
filelock
huggingface-hub
importlib-metadata
Expand Down Expand Up @@ -143,6 +159,10 @@ buildPythonPackage rec {
"test_model_cpu_offload_forward_pass"
# tries to run ruff which we have intentionally removed from nativeCheckInputs
"test_is_copy_consistent"
] ++ lib.optionals (pythonAtLeast "3.12") [

# RuntimeError: Dynamo is not supported on Python 3.12+
"test_from_save_pretrained_dynamo"
];

meta = with lib; {
Expand Down
10 changes: 5 additions & 5 deletions pkgs/development/python-modules/gradio/client.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@

buildPythonPackage rec {
pname = "gradio-client";
version = "0.14.0";
format = "pyproject";
version = "0.16.1";
pyproject = true;

disabled = pythonOlder "3.8";

# no tests on pypi
src = fetchFromGitHub {
owner = "gradio-app";
repo = "gradio";
rev = "refs/tags/@gradio/client@${version}";
rev = "refs/tags/gradio_client@${version}";
sparseCheckout = [ "client/python" ];
hash = "sha256-7oC/Z3YUiOFZdv/60q7PkfluV77broRkHgWiY9Vim9Y=";
hash = "sha256-SVUm9LrjYG0r3U1yOd3rctxVMYlnAOW+Opqy9c3osnw=";
};
prePatch = ''
cd client/python
Expand All @@ -52,7 +52,7 @@ buildPythonPackage rec {
"websockets"
];

nativeBuildInputs = [
build-system = [
hatchling
hatch-requirements-txt
hatch-fancy-pypi-readme
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/gradio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

buildPythonPackage rec {
pname = "gradio";
version = "4.27.0";
version = "4.29.0";
format = "pyproject";

disabled = pythonOlder "3.7";
Expand All @@ -71,7 +71,7 @@ buildPythonPackage rec {
# and upstream has stopped tagging releases since 3.41.0
src = fetchPypi {
inherit pname version;
hash = "sha256-617zutFhS8NGO4+fcALH8aKbk+reGC65DNWKVVKiWEw=";
hash = "sha256-17KT0b9kBO+xLgIgxfpwjETDoRM4aTJPlJv7HjkJXjo=";
};

# fix packaging.ParserSyntaxError, which can't handle comments
Expand Down

0 comments on commit acbbc1c

Please sign in to comment.