2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchpatch,
|
|
|
|
networkx,
|
|
|
|
pandas,
|
|
|
|
scipy,
|
|
|
|
numpy,
|
|
|
|
}:
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-louvain";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.16";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
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
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
networkx
|
|
|
|
numpy
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "community" ];
|
|
|
|
|
2024-06-05 15:53:02 +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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "community";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
}
|