about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/python-louvain/default.nix
blob: c6161735d4352dffc97adc659b7e58f043eb38e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ lib
, fetchPypi
, buildPythonPackage
, fetchpatch
, networkx
, pandas
, scipy
, numpy }:

buildPythonPackage rec {
  pname = "python-louvain";
  version = "0.16";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-t7ot9QAv0o0+54mklTK6rRH+ZI5PIRfPB5jnUgodpWs=";
  };

  patches = [
    # Fix test_karate
    (fetchpatch {
      name = "fix-karate-test-networkx-2.7.patch";
      url = "https://github.com/taynaud/python-louvain/pull/95/commits/c95d767e72f580cb15319fe08d72d87c9976640b.patch";
      hash = "sha256-9oJ9YvKl2sI8oGhfyauNS+HT4kXsDt0L8S2owluWdj0=";
    })
  ];

  propagatedBuildInputs = [ networkx numpy ];

  pythonImportsCheck = [ "community" ];

  nativeCheckInputs = [ pandas scipy ];

  meta = with lib; {
    homepage = "https://github.com/taynaud/python-louvain";
    description = "Louvain Community Detection";
    license = licenses.bsd3;
    maintainers = with maintainers; [ ];
  };
}