2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchpatch
|
2021-06-28 23:13:55 +00:00
|
|
|
, networkx
|
2022-06-16 17:23:12 +00:00
|
|
|
, pandas
|
|
|
|
, scipy
|
2021-06-28 23:13:55 +00:00
|
|
|
, numpy }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-louvain";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.16";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-t7ot9QAv0o0+54mklTK6rRH+ZI5PIRfPB5jnUgodpWs=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
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";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-9oJ9YvKl2sI8oGhfyauNS+HT4kXsDt0L8S2owluWdj0=";
|
2022-06-16 17:23:12 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [ networkx numpy ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "community" ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pandas scipy ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/taynaud/python-louvain";
|
|
|
|
description = "Louvain Community Detection";
|
|
|
|
license = licenses.bsd3;
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
}
|