aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroki Tagato <tagattie@FreeBSD.org>2024-02-12 08:24:55 +0000
committerHiroki Tagato <tagattie@FreeBSD.org>2024-02-12 08:34:14 +0000
commit54cee7bd5a75afc210b1fccec19e9274e81fce44 (patch)
tree9b9144f660692adc643e2f44a4504ee7afe970a0
parentd05d11f6c58eae82ff6cbbb2c916ca99f78520de (diff)
downloadports-54cee7bd5a75afc210b1fccec19e9274e81fce44.tar.gz
ports-54cee7bd5a75afc210b1fccec19e9274e81fce44.zip
misc/py-huggingface-hub: add port: Official Python client for the Huggingface Hub
The huggingface_hub library allows you to interact with the Hugging Face Hub, a platform democratizing open-source Machine Learning for creators and collaborators. Discover pre-trained models and datasets for your projects or play with the thousands of machine learning apps hosted on the Hub. You can also create and share your own models, datasets and demos with the community. The huggingface_hub library provides a simple way to do all these things with Python. WWW: https://github.com/huggingface/huggingface_hub
-rw-r--r--misc/Makefile1
-rw-r--r--misc/py-huggingface-hub/Makefile36
-rw-r--r--misc/py-huggingface-hub/distinfo3
-rw-r--r--misc/py-huggingface-hub/pkg-descr7
4 files changed, 47 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 7c358530f4bb..20142149858b 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -426,6 +426,7 @@
SUBDIR += py-hist
SUBDIR += py-histoprint
SUBDIR += py-huepy
+ SUBDIR += py-huggingface-hub
SUBDIR += py-icoextract
SUBDIR += py-instructor
SUBDIR += py-ipyfastscape
diff --git a/misc/py-huggingface-hub/Makefile b/misc/py-huggingface-hub/Makefile
new file mode 100644
index 000000000000..37e4a961d49c
--- /dev/null
+++ b/misc/py-huggingface-hub/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= huggingface-hub
+DISTVERSION= 0.20.3
+CATEGORIES= misc python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME:S/-/_/}-${DISTVERSION}
+
+MAINTAINER= tagattie@FreeBSD.org
+COMMENT= Official Python client for the Huggingface Hub
+WWW= https://github.com/huggingface/huggingface_hub
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}filelock>0:sysutils/py-filelock@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}fsspec>=2023.5.0:devel/py-fsspec@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tqdm>=4.42.1:misc/py-tqdm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}yaml>=5.1:devel/py-yaml@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.7.4.3:devel/py-typing-extensions@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}packaging>=20.9:devel/py-packaging@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent distutils
+
+NO_ARCH= yes
+
+PORTDOCS= README.md
+
+OPTIONS_DEFINE= DOCS
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/misc/py-huggingface-hub/distinfo b/misc/py-huggingface-hub/distinfo
new file mode 100644
index 000000000000..6e84f7940d87
--- /dev/null
+++ b/misc/py-huggingface-hub/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1707700513
+SHA256 (huggingface_hub-0.20.3.tar.gz) = 94e7f8e074475fbc67d6a71957b678e1b4a74ff1b64a644fd6cbb83da962d05d
+SIZE (huggingface_hub-0.20.3.tar.gz) = 287635
diff --git a/misc/py-huggingface-hub/pkg-descr b/misc/py-huggingface-hub/pkg-descr
new file mode 100644
index 000000000000..c2b470c0d3b4
--- /dev/null
+++ b/misc/py-huggingface-hub/pkg-descr
@@ -0,0 +1,7 @@
+The huggingface_hub library allows you to interact with the Hugging
+Face Hub, a platform democratizing open-source Machine Learning for
+creators and collaborators. Discover pre-trained models and datasets
+for your projects or play with the thousands of machine learning apps
+hosted on the Hub. You can also create and share your own models,
+datasets and demos with the community. The huggingface_hub library
+provides a simple way to do all these things with Python.