1{ lib 2, buildPythonPackage 3, ddt 4, fetchPypi 5, igraph 6, igraph-c 7, pythonOlder 8, setuptools-scm 9, unittestCheckHook 10}: 11 12buildPythonPackage rec { 13 pname = "leidenalg"; 14 version = "0.9.1"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-flz+O2+A8yuQ9V81xo1KmQsEibEoLPP6usjNpJiJdfM="; 22 }; 23 24 postPatch = '' 25 substituteInPlace ./setup.py \ 26 --replace "[\"/usr/include/igraph\", \"/usr/local/include/igraph\"]" \ 27 "[\"${igraph-c.dev}/include/igraph\"]" 28 29 rm -r vendor 30 ''; 31 32 nativeBuildInputs = [ 33 setuptools-scm 34 ]; 35 36 propagatedBuildInputs = [ 37 igraph 38 igraph-c 39 ]; 40 41 checkInputs = [ 42 ddt 43 unittestCheckHook 44 ]; 45 46 pythonImportsCheck = [ "leidenalg" ]; 47 48 meta = with lib; { 49 description = "Implementation of the Leiden algorithm for various quality functions to be used with igraph in Python"; 50 homepage = "https://leidenalg.readthedocs.io"; 51 license = licenses.gpl3Only; 52 maintainers = with maintainers; [ jboy ]; 53 }; 54}