depot/third_party/nixpkgs/pkgs/development/python-modules/wordcloud/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

71 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, cython
, fetchFromGitHub
, matplotlib
, mock
, numpy
, pillow
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "wordcloud";
version = "1.9.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "amueller";
repo = "word_cloud";
rev = "refs/tags/${version}";
hash = "sha256-UbryGiu1AW6Razbf4BJIKGKKhG6JOeZUGb1k0w8f8XA=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace " --cov --cov-report xml --tb=short" ""
'';
nativeBuildInputs = [
cython
];
propagatedBuildInputs = [
matplotlib
numpy
pillow
];
nativeCheckInputs = [
mock
pytestCheckHook
];
preCheck = ''
cd test
'';
pythonImportsCheck = [
"wordcloud"
];
disabledTests = [
# Don't tests CLI
"test_cli_as_executable"
# OSError: invalid ppem value
"test_recolor_too_small"
"test_coloring_black_works"
];
meta = with lib; {
description = "Word cloud generator in Python";
mainProgram = "wordcloud_cli";
homepage = "https://github.com/amueller/word_cloud";
changelog = "https://github.com/amueller/word_cloud/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ jm2dev ];
};
}