git: 135f989ff0e2 - main - misc/py-hf-doc-builder: New port: Doc building utility for Hugging Face related projects

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 17 Aug 2025 20:48:51 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=135f989ff0e2d8aa4561c980ef6ef6787c5546ed

commit 135f989ff0e2d8aa4561c980ef6ef6787c5546ed
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-08-17 20:48:21 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-08-17 20:48:49 +0000

    misc/py-hf-doc-builder: New port: Doc building utility for Hugging Face related projects
---
 misc/Makefile                               |  1 +
 misc/py-hf-doc-builder/Makefile             | 28 ++++++++++++++++++++++++++++
 misc/py-hf-doc-builder/distinfo             |  3 +++
 misc/py-hf-doc-builder/files/patch-setup.py | 18 ++++++++++++++++++
 misc/py-hf-doc-builder/pkg-descr            |  2 ++
 5 files changed, 52 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index 58ef922599a5..4d3466e4b671 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -448,6 +448,7 @@
     SUBDIR += py-google-ai-generativelanguage
     SUBDIR += py-gpiozero
     SUBDIR += py-halo
+    SUBDIR += py-hf-doc-builder
     SUBDIR += py-hf-xet
     SUBDIR += py-hist
     SUBDIR += py-histoprint
diff --git a/misc/py-hf-doc-builder/Makefile b/misc/py-hf-doc-builder/Makefile
new file mode 100644
index 000000000000..2bbd5f6ad2d0
--- /dev/null
+++ b/misc/py-hf-doc-builder/Makefile
@@ -0,0 +1,28 @@
+PORTNAME=	hf-doc-builder
+DISTVERSION=	0.5.0
+CATEGORIES=	misc python # machine-learning
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Doc building utility for Hugging Face related projects
+WWW=		https://github.com/huggingface/doc-builder
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}gitpython>0:devel/py-gitpython@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}huggingface-hub>0:misc/py-huggingface-hub@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}meilisearch>0.34.1:textproc/py-meilisearch@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}nbformat>0:devel/py-nbformat@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyyaml>0:devel/py-pyyaml@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tqdm>0:misc/py-tqdm@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	distutils autoplist pytest
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/misc/py-hf-doc-builder/distinfo b/misc/py-hf-doc-builder/distinfo
new file mode 100644
index 000000000000..0f3778957cf2
--- /dev/null
+++ b/misc/py-hf-doc-builder/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1755462500
+SHA256 (hf-doc-builder-0.5.0.tar.gz) = e557660f76d1d90ac79e96d7b17642eca83f16a0a89ceabde180f0437d28179b
+SIZE (hf-doc-builder-0.5.0.tar.gz) = 152415
diff --git a/misc/py-hf-doc-builder/files/patch-setup.py b/misc/py-hf-doc-builder/files/patch-setup.py
new file mode 100644
index 000000000000..65c42e23e65f
--- /dev/null
+++ b/misc/py-hf-doc-builder/files/patch-setup.py
@@ -0,0 +1,18 @@
+--- setup.py.orig	2025-08-17 20:33:32 UTC
++++ setup.py
+@@ -3,7 +3,7 @@ from setuptools import find_packages, setup
+ 
+ from setuptools import find_packages, setup
+ 
+-install_requires = ["black", "GitPython", "tqdm", "pyyaml", "packaging", "nbformat", "huggingface_hub"]
++install_requires = ["GitPython", "tqdm", "pyyaml", "packaging", "nbformat", "huggingface_hub"]
+ 
+ extras = {}
+ 
+@@ -62,4 +62,4 @@ setup(
+ #      twine upload dist/* -r pypi
+ # 9. Add release notes to the tag in github once everything is looking hunky-dory.
+ # 10. Go back to the main branch and update the version in __init__.py, setup.py to the new version ".dev" and push to
+-#     main.
+\ No newline at end of file
++#     main.
diff --git a/misc/py-hf-doc-builder/pkg-descr b/misc/py-hf-doc-builder/pkg-descr
new file mode 100644
index 000000000000..9e754b98f1cf
--- /dev/null
+++ b/misc/py-hf-doc-builder/pkg-descr
@@ -0,0 +1,2 @@
+hf-doc-builder is a package used to build the documentation
+of Hugging Face repos.