aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gmelin <grembo@FreeBSD.org>2024-02-12 13:51:31 +0000
committerMichael Gmelin <grembo@FreeBSD.org>2024-02-18 12:04:00 +0000
commitf836820133ad81b454de23c0a90025facede7307 (patch)
treede49d25efaa6e28e9329fe2be4fb8d0b688facd3
parent2dde972e0c66c104b180430e3dcb6c076680e16b (diff)
textproc/py-tika-client: New port
Python REST client for Apache Tika server
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/py-tika-client/Makefile30
-rw-r--r--textproc/py-tika-client/distinfo3
-rw-r--r--textproc/py-tika-client/pkg-descr13
4 files changed, 47 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index 0ec3d9f9c2e7..0991355f8e09 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1616,6 +1616,7 @@
SUBDIR += py-textual
SUBDIR += py-textwrap3
SUBDIR += py-three-merge
+ SUBDIR += py-tika-client
SUBDIR += py-tiktoken
SUBDIR += py-tinycss
SUBDIR += py-tinycss2
diff --git a/textproc/py-tika-client/Makefile b/textproc/py-tika-client/Makefile
new file mode 100644
index 000000000000..0082c43bb631
--- /dev/null
+++ b/textproc/py-tika-client/Makefile
@@ -0,0 +1,30 @@
+PORTNAME= tika-client
+PORTVERSION= 0.5.0
+CATEGORIES= textproc python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION}
+
+MAINTAINER= grembo@FreeBSD.org
+COMMENT= Python REST client for Apache Tika server
+WWW= https://github.com/stumpylog/tika-client
+
+LICENSE= MPL20
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}httpx>=0.26:www/py-httpx@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-httpx>=0:devel/py-pytest-httpx@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist pep517
+
+TEST_ENV= PYTHONPATH=${WRKSRC}/src
+
+NO_ARCH= yes
+
+do-test:
+ cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts=
+
+.include <bsd.port.mk>
diff --git a/textproc/py-tika-client/distinfo b/textproc/py-tika-client/distinfo
new file mode 100644
index 000000000000..27014a468d2b
--- /dev/null
+++ b/textproc/py-tika-client/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1707592397
+SHA256 (tika_client-0.5.0.tar.gz) = f719fbf20f9ef47d12132b38c5848024b260e79c5f0b9ae5ff95c0b2fe3ba350
+SIZE (tika_client-0.5.0.tar.gz) = 2170597
diff --git a/textproc/py-tika-client/pkg-descr b/textproc/py-tika-client/pkg-descr
new file mode 100644
index 000000000000..be18a7c15ddd
--- /dev/null
+++ b/textproc/py-tika-client/pkg-descr
@@ -0,0 +1,13 @@
+Tika Rest Client, simplified: No need to worry about XML or JSON responses,
+downloading a Tika jar file or Python 2. Support for Tika 2+ only.
+
+Full support for type hinting
+
+Nearly full test coverage run against an actual Tika server for multiple
+Python and PyPy versions
+
+Uses HTTP multipart/form-data to stream files to the server (instead of
+reading into memory)
+
+Optional compression for parsing from a file content already in a buffer (as
+opposed to a file)