2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, cython
|
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, matplotlib
|
|
|
|
, mock
|
|
|
|
, numpy
|
|
|
|
, pillow
|
2022-06-16 17:23:12 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
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";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.9.1.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amueller";
|
2023-03-04 12:14:45 +00:00
|
|
|
repo = "word_cloud";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-Tcle9otT1eBN/RzajwKZDUq8xX0Lhi2t74OvhUrvHZE=";
|
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" ""
|
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
preCheck = ''
|
|
|
|
cd test
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"wordcloud"
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|