aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2026-07-07 17:05:37 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2026-07-07 21:49:16 +0000
commit3e6fa4bf67aaff9718a4efb744c5a2c9af128193 (patch)
tree9d3111624054b55459fba7454f76ed7e92bee152
parent3ce1a316b4b0eddf91ce471c32a366df9ae18bf9 (diff)
misc/py-modelscope-hub: New port: Python client to connect with ModelScope Hub
-rw-r--r--misc/Makefile1
-rw-r--r--misc/py-modelscope-hub/Makefile28
-rw-r--r--misc/py-modelscope-hub/distinfo3
-rw-r--r--misc/py-modelscope-hub/files/patch-pyproject.toml11
-rw-r--r--misc/py-modelscope-hub/pkg-descr18
5 files changed, 61 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index b292cd9935d1..3728dcc48d47 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -564,6 +564,7 @@
SUBDIR += py-mmsegmentation
SUBDIR += py-model-hosting-container-standards
SUBDIR += py-modelscope
+ SUBDIR += py-modelscope-hub
SUBDIR += py-molequeue
SUBDIR += py-napari
SUBDIR += py-napari-svg
diff --git a/misc/py-modelscope-hub/Makefile b/misc/py-modelscope-hub/Makefile
new file mode 100644
index 000000000000..6ee7a1fbe6d4
--- /dev/null
+++ b/misc/py-modelscope-hub/Makefile
@@ -0,0 +1,28 @@
+PORTNAME= modelscope-hub
+DISTVERSION= 0.1.7
+CATEGORIES= misc python # machine-learning
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Python client to connect with ModelScope Hub
+WWW= https://www.modelscope.cn/home \
+ https://github.com/modelscope/modelscope
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}filelock>=3.9:sysutils/py-filelock@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}requests>=2.28:www/py-requests@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tqdm>=4.64.0:misc/py-tqdm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}urllib3>=1.26:net/py-urllib3@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= pep517 concurrent autoplist
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/misc/py-modelscope-hub/distinfo b/misc/py-modelscope-hub/distinfo
new file mode 100644
index 000000000000..d231c934429a
--- /dev/null
+++ b/misc/py-modelscope-hub/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1783443497
+SHA256 (modelscope_hub-0.1.7.tar.gz) = b78730f3923cf13d5fbc56c6224a5ba617bf111a562fe3808c03e34c3c07840f
+SIZE (modelscope_hub-0.1.7.tar.gz) = 126616
diff --git a/misc/py-modelscope-hub/files/patch-pyproject.toml b/misc/py-modelscope-hub/files/patch-pyproject.toml
new file mode 100644
index 000000000000..645ce018575c
--- /dev/null
+++ b/misc/py-modelscope-hub/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+--- pyproject.toml.orig 2026-07-07 17:04:02 UTC
++++ pyproject.toml
+@@ -39,7 +39,7 @@ ms = "modelscope_hub.cli.main:run_cmd"
+ ms = "modelscope_hub.cli.main:run_cmd"
+
+ [build-system]
+-requires = ["setuptools>=68.0"]
++requires = ["setuptools"]
+ build-backend = "setuptools.build_meta"
+
+ [tool.setuptools.packages.find]
diff --git a/misc/py-modelscope-hub/pkg-descr b/misc/py-modelscope-hub/pkg-descr
new file mode 100644
index 000000000000..828815ee31cd
--- /dev/null
+++ b/misc/py-modelscope-hub/pkg-descr
@@ -0,0 +1,18 @@
+modelscope-hub connects your code to the ModelScope ecosystem - models,
+datasets, Studio spaces, skills, and MCP servers - through a single
+HubApi class or the ms CLI.
+
+Features:
+* Unified repo interface — one set of methods for models, datasets,
+ studios, skills, and MCP servers
+* OpenAPI-first - built on the ModelScope OpenAPI surface with transparent
+ legacy fallback
+* Production-grade downloads - HTTP Range resume, parallel range download
+ for large files, per-file retry with backoff, SHA256 integrity checks,
+ file lock for multiprocess safety, offline mode, progress callbacks,
+ and intra-cloud acceleration
+* Full lifecycle CLI - download, upload, deploy, manage secrets, inspect
+ cache - all from the terminal
+* Deep ecosystem integration - seamless access to 100K+ models and datasets on
+ ModelScope Hub; works with the modelscope training framework, Studio
+ deployment platform, and MCP server infrastructure