From 6a7e98bfefdc9530f0390f0d780edc5a35266d56 Mon Sep 17 00:00:00 2001 From: Freddy Boulton Date: Wed, 31 Jan 2024 10:33:13 -0800 Subject: [PATCH] Fix hyphen-bug in gradio cc publish (#7229) * Fix hyphen-bug * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot --- .changeset/spicy-rabbits-check.md | 5 +++++ gradio/cli/commands/components/publish.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/spicy-rabbits-check.md diff --git a/.changeset/spicy-rabbits-check.md b/.changeset/spicy-rabbits-check.md new file mode 100644 index 0000000000..e38665f882 --- /dev/null +++ b/.changeset/spicy-rabbits-check.md @@ -0,0 +1,5 @@ +--- +"gradio": patch +--- + +feat:Fix hyphen-bug in gradio cc publish diff --git a/gradio/cli/commands/components/publish.py b/gradio/cli/commands/components/publish.py index c38ec6da9f..5e09f872b6 100644 --- a/gradio/cli/commands/components/publish.py +++ b/gradio/cli/commands/components/publish.py @@ -141,7 +141,7 @@ def _publish( ] wheel_file = max( (p for p in distribution_files if p.suffix == ".whl"), - key=lambda s: semantic_version.Version(str(s).split("-")[1]), + key=lambda s: semantic_version.Version(str(s.name).split("-")[1]), ) if not wheel_file: raise ValueError(