1{ lib 2, buildPythonPackage 3, cython 4, fetchFromGitHub 5, fetchpatch 6, matplotlib 7, mock 8, numpy 9, pillow 10, pytestCheckHook 11, pythonOlder 12}: 13 14buildPythonPackage rec { 15 pname = "wordcloud"; 16 version = "1.8.1"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "amueller"; 23 repo = pname; 24 rev = version; 25 hash = "sha256-4EFQfv+Jn9EngUAyDoJP0yv9zr9Tnbrdwq1YzDacB9Q="; 26 }; 27 28 nativeBuildInputs = [ 29 cython 30 ]; 31 32 propagatedBuildInputs = [ 33 matplotlib 34 numpy 35 pillow 36 ]; 37 38 checkInputs = [ 39 mock 40 pytestCheckHook 41 ]; 42 43 patches = [ 44 (fetchpatch { 45 # https://github.com/amueller/word_cloud/pull/616 46 url = "https://github.com/amueller/word_cloud/commit/858a8ac4b5b08494c1d25d9e0b35dd995151a1e5.patch"; 47 sha256 = "sha256-+aDTMPtOibVwjPrRLxel0y4JFD5ERB2bmJi4zRf/asg="; 48 }) 49 ]; 50 51 postPatch = '' 52 substituteInPlace setup.cfg \ 53 --replace " --cov --cov-report xml --tb=short" "" 54 ''; 55 56 preCheck = '' 57 cd test 58 ''; 59 60 pythonImportsCheck = [ 61 "wordcloud" 62 ]; 63 64 disabledTests = [ 65 # Don't tests CLI 66 "test_cli_as_executable" 67 ]; 68 69 meta = with lib; { 70 description = "Word cloud generator in Python"; 71 homepage = "https://github.com/amueller/word_cloud"; 72 license = licenses.mit; 73 maintainers = with maintainers; [ jm2dev ]; 74 }; 75}