git: f836820133ad - main - textproc/py-tika-client: New port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 18 Feb 2024 12:06:40 UTC
The branch main has been updated by grembo: URL: https://cgit.FreeBSD.org/ports/commit/?id=f836820133ad81b454de23c0a90025facede7307 commit f836820133ad81b454de23c0a90025facede7307 Author: Michael Gmelin <grembo@FreeBSD.org> AuthorDate: 2024-02-12 13:51:31 +0000 Commit: Michael Gmelin <grembo@FreeBSD.org> CommitDate: 2024-02-18 12:04:00 +0000 textproc/py-tika-client: New port Python REST client for Apache Tika server --- textproc/Makefile | 1 + textproc/py-tika-client/Makefile | 30 ++++++++++++++++++++++++++++++ textproc/py-tika-client/distinfo | 3 +++ textproc/py-tika-client/pkg-descr | 13 +++++++++++++ 4 files changed, 47 insertions(+) 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)