aboutsummaryrefslogtreecommitdiff
path: root/textproc/py-tokenizers/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/py-tokenizers/Makefile')
-rw-r--r--textproc/py-tokenizers/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/textproc/py-tokenizers/Makefile b/textproc/py-tokenizers/Makefile
new file mode 100644
index 000000000000..4447eab63c38
--- /dev/null
+++ b/textproc/py-tokenizers/Makefile
@@ -0,0 +1,29 @@
+PORTNAME= tokenizers
+DISTVERSION= 0.15.1
+CATEGORIES= textproc python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
+
+MAINTAINER= tagattie@FreeBSD.org
+COMMENT= Fast state-of-the-art tokenizers optimized for research and production
+WWW= https://github.com/huggingface/tokenizers
+
+LICENSE= APACHE20
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}maturin>=1.0<2.0:devel/py-maturin@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}huggingface-hub>=0.16.4<1.0:misc/py-huggingface-hub@${PY_FLAVOR}
+
+USES= cargo python
+USE_PYTHON= autoplist pep517
+
+CARGO_CARGOTOML=${WRKSRC}/bindings/python/Cargo.toml
+CARGO_CARGOLOCK=${WRKSRC}/bindings/python/Cargo.lock
+CARGO_BUILD= no
+CARGO_INSTALL= no
+CARGO_TEST= no
+
+post-install:
+ @${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -type f -name '*.so' -exec ${STRIP_CMD} {} ';'
+
+.include <bsd.port.mk>