Delegate CLI script ownership to modelscope-hub (#1780)

This commit is contained in:
Xingjun.Wang
2026-08-19 17:39:43 +08:00
committed by GitHub
parent f0592cb67e
commit fc1b70780b
4 changed files with 98 additions and 9 deletions

View File

@@ -18,14 +18,21 @@ classifiers = [
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
[project.urls]
Homepage = "https://github.com/modelscope/modelscope"
[project.scripts]
modelscope = "modelscope.cli.cli:run_cmd"
ms = "modelscope.cli.cli:run_cmd"
# No [project.scripts] here on purpose: the `modelscope`, `ms`, `modelscope-hub`
# and `ms-hub` console scripts are all owned by the `modelscope-hub`
# distribution that this package depends on. When two distributions declare the
# same script name, upgrading or removing either one can overwrite or delete the
# other's file and leave the user with no CLI at all; OS packagers such as
# FreeBSD pkg reject two ports owning one path outright. This package
# contributes its own commands through the plugin group below instead.
#
# `python -m modelscope.cli.cli` remains available as a direct entry point.
[project.entry-points."modelscope_hub.cli_plugins"]
pipeline = "modelscope.cli.pipeline:PipelineCMD"