From 1d34d2278b3516711dc62d92816998e77149c068 Mon Sep 17 00:00:00 2001 From: Thierry Thomas Date: Sat, 26 Dec 2020 09:24:42 +0000 Subject: [PATCH] Adding WordCloud, a little word cloud generator in Python. --- textproc/Makefile | 1 + textproc/py-wordcloud/Makefile | 51 +++++++++++++++++++++++++++++++++ textproc/py-wordcloud/distinfo | 3 ++ textproc/py-wordcloud/pkg-descr | 3 ++ textproc/py-wordcloud/pkg-plist | 31 ++++++++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 textproc/py-wordcloud/Makefile create mode 100644 textproc/py-wordcloud/distinfo create mode 100644 textproc/py-wordcloud/pkg-descr create mode 100644 textproc/py-wordcloud/pkg-plist diff --git a/textproc/Makefile b/textproc/Makefile index 0eb7b4aee27e..0c131213b25b 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1444,6 +1444,7 @@ SUBDIR += py-ucl SUBDIR += py-ufal.udpipe SUBDIR += py-whoosh + SUBDIR += py-wordcloud SUBDIR += py-wordnet SUBDIR += py-wstools SUBDIR += py-wtf-peewee diff --git a/textproc/py-wordcloud/Makefile b/textproc/py-wordcloud/Makefile new file mode 100644 index 000000000000..4bb7e38f2e08 --- /dev/null +++ b/textproc/py-wordcloud/Makefile @@ -0,0 +1,51 @@ +# Created by: Thierry Thomas +# $FreeBSD$ + +PORTNAME= word_cloud +DISTVERSION= 1.5.0 +CATEGORIES= textproc python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= thierry@FreeBSD.org +COMMENT= Little word cloud generator in Python + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYNUMPY} \ + ${PY_PILLOW} +RUN_DEPENDS= ${PYNUMPY} \ + ${PY_PILLOW} \ + ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pluggy>0:devel/py-pluggy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} + +USE_GITHUB= yes +GH_ACCOUNT= amueller + +USES= python:3.6+ shebangfix +USE_PYTHON= distutils +SHEBANG_FILES= doc/*.sh examples/*.py + +OPTIONS_DEFINE= DOCS EXAMPLES + +PLIST_SUB+= VER=${PORTVERSION} +TEST_TARGET= test +PORTDOCS= * +PORTEXAMPLES= * + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${CP} -R ${WRKSRC}/doc/ ${STAGEDIR}${DOCSDIR} + +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${CP} -R ${WRKSRC}/examples/ ${STAGEDIR}${EXAMPLESDIR} + +do-test: install + ${REINPLACE_CMD} -e 's|--cov --cov-report xml ||' ${WRKSRC}/setup.cfg + ${REINPLACE_CMD} -e 's|"python |"${PYTHON_CMD} |' ${WRKSRC}/test/test_wordcloud_cli.py + (cd ${TEST_WRKSRC} && py.test) + +.include diff --git a/textproc/py-wordcloud/distinfo b/textproc/py-wordcloud/distinfo new file mode 100644 index 000000000000..00ee0d56ff93 --- /dev/null +++ b/textproc/py-wordcloud/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1608913996 +SHA256 (amueller-word_cloud-1.5.0_GH0.tar.gz) = 685f35ded1f8a69736fd6faba20ec153d6aeb4475d8b22d8a04f600036c7c4d2 +SIZE (amueller-word_cloud-1.5.0_GH0.tar.gz) = 25431213 diff --git a/textproc/py-wordcloud/pkg-descr b/textproc/py-wordcloud/pkg-descr new file mode 100644 index 000000000000..c2fb397fbc08 --- /dev/null +++ b/textproc/py-wordcloud/pkg-descr @@ -0,0 +1,3 @@ +WordCloud, a little word cloud generator in Python. + +WWW: https://amueller.github.io/word_cloud/ diff --git a/textproc/py-wordcloud/pkg-plist b/textproc/py-wordcloud/pkg-plist new file mode 100644 index 000000000000..6db3263aaf49 --- /dev/null +++ b/textproc/py-wordcloud/pkg-plist @@ -0,0 +1,31 @@ +bin/wordcloud_cli +%%PYTHON_SITELIBDIR%%/wordcloud-%%VER%%-py%%PYTHON_VER%%.egg-info/PKG-INFO +%%PYTHON_SITELIBDIR%%/wordcloud-%%VER%%-py%%PYTHON_VER%%.egg-info/SOURCES.txt +%%PYTHON_SITELIBDIR%%/wordcloud-%%VER%%-py%%PYTHON_VER%%.egg-info/dependency_links.txt +%%PYTHON_SITELIBDIR%%/wordcloud-%%VER%%-py%%PYTHON_VER%%.egg-info/entry_points.txt +%%PYTHON_SITELIBDIR%%/wordcloud-%%VER%%-py%%PYTHON_VER%%.egg-info/requires.txt +%%PYTHON_SITELIBDIR%%/wordcloud-%%VER%%-py%%PYTHON_VER%%.egg-info/top_level.txt +%%PYTHON_SITELIBDIR%%/wordcloud/DroidSansMono.ttf +%%PYTHON_SITELIBDIR%%/wordcloud/__init__.py +%%PYTHON_SITELIBDIR%%/wordcloud/__main__.py +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/__main__.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/__main__.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/_version.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/_version.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/color_from_image.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/color_from_image.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/tokenization.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/tokenization.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/wordcloud.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/wordcloud.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/wordcloud_cli.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/__pycache__/wordcloud_cli.cpython-%%PYTHON_SUFFIX%%.pyc +%%PYTHON_SITELIBDIR%%/wordcloud/_version.py +%%PYTHON_SITELIBDIR%%/wordcloud/color_from_image.py +%%PYTHON_SITELIBDIR%%/wordcloud/query_integral_image.so +%%PYTHON_SITELIBDIR%%/wordcloud/stopwords +%%PYTHON_SITELIBDIR%%/wordcloud/tokenization.py +%%PYTHON_SITELIBDIR%%/wordcloud/wordcloud.py +%%PYTHON_SITELIBDIR%%/wordcloud/wordcloud_cli.py