1{ lib
2, fetchPypi
3, buildPythonPackage
4, fetchpatch
5, networkx
6, pandas
7, scipy
8, numpy }:
9
10buildPythonPackage rec {
11 pname = "python-louvain";
12 version = "0.16";
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-t7ot9QAv0o0+54mklTK6rRH+ZI5PIRfPB5jnUgodpWs=";
17 };
18
19 patches = [
20 # Fix test_karate
21 (fetchpatch {
22 name = "fix-karate-test-networkx-2.7.patch";
23 url = "https://github.com/taynaud/python-louvain/pull/95/commits/c95d767e72f580cb15319fe08d72d87c9976640b.patch";
24 hash = "sha256-9oJ9YvKl2sI8oGhfyauNS+HT4kXsDt0L8S2owluWdj0=";
25 })
26 ];
27
28 propagatedBuildInputs = [ networkx numpy ];
29
30 pythonImportsCheck = [ "community" ];
31
32 nativeCheckInputs = [ pandas scipy ];
33
34 meta = with lib; {
35 homepage = "https://github.com/taynaud/python-louvain";
36 description = "Louvain Community Detection";
37 license = licenses.bsd3;
38 maintainers = with maintainers; [ ];
39 };
40}