Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 cairocffi, 5 cython, 6 fetchPypi, 7 igraph, 8 leidenalg, 9 pandas, 10 poetry-core, 11 pytestCheckHook, 12 pythonOlder, 13 scipy, 14 setuptools, 15 spacy, 16 spacy-lookups-data, 17 en_core_web_sm, 18 toolz, 19 tqdm, 20 wasabi, 21}: 22 23buildPythonPackage rec { 24 pname = "textnets"; 25 version = "0.9.4"; 26 format = "pyproject"; 27 28 disabled = pythonOlder "3.8"; 29 30 src = fetchPypi { 31 inherit pname version; 32 hash = "sha256-4154ytzo1QpwhKA1BkVMss9fNIkysnClW/yfSVlX33M="; 33 }; 34 35 nativeBuildInputs = [ 36 cython 37 poetry-core 38 setuptools 39 ]; 40 41 pythonRelaxDeps = [ 42 "igraph" 43 "leidenalg" 44 ]; 45 46 propagatedBuildInputs = [ 47 cairocffi 48 igraph 49 leidenalg 50 pandas 51 scipy 52 spacy 53 spacy-lookups-data 54 toolz 55 tqdm 56 wasabi 57 ]; 58 59 nativeCheckInputs = [ 60 pytestCheckHook 61 en_core_web_sm 62 ]; 63 64 pythonImportsCheck = [ "textnets" ]; 65 66 # Enables the package to find the cythonized .so files during testing. See #255262 67 preCheck = '' 68 rm -r textnets 69 ''; 70 71 disabledTests = [ 72 # Test fails: Throws a UserWarning asking the user to install `textnets[fca]`. 73 "test_context" 74 ]; 75 76 meta = with lib; { 77 description = "Text analysis with networks"; 78 homepage = "https://textnets.readthedocs.io"; 79 changelog = "https://github.com/jboynyc/textnets/blob/v${version}/HISTORY.rst"; 80 license = licenses.gpl3Only; 81 maintainers = with maintainers; [ jboy ]; 82 }; 83}