2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
fetchPypi,
|
|
|
|
matplotlib,
|
|
|
|
numpy,
|
|
|
|
pillow,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
2022-06-16 17:23:12 +00:00
|
|
|
pname = "wordcloud";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.9.3";
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-qapzjWPtZ0pA8Mwxrbg/TKX8GV8Dpq/24BDR9YB9HFg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov --cov-report xml --tb=short" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ cython ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2022-06-16 17:23:12 +00:00
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
preCheck = ''
|
|
|
|
cd test
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "wordcloud" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Don't tests CLI
|
|
|
|
"test_cli_as_executable"
|
2024-01-02 11:29:13 +00:00
|
|
|
# OSError: invalid ppem value
|
|
|
|
"test_recolor_too_small"
|
|
|
|
"test_coloring_black_works"
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "Word cloud generator in Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "wordcloud_cli";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/amueller/word_cloud";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/amueller/word_cloud/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jm2dev ];
|
|
|
|
};
|
|
|
|
}
|