depot/third_party/nixpkgs/pkgs/development/python-modules/leidenalg/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

54 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, ddt
, fetchPypi
, igraph
, igraph-c
, pythonOlder
, setuptools-scm
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "leidenalg";
version = "0.10.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-RXrZaYKoC9XGVxifQt/rd+6807dEoRDlosFhjS64C0c=";
};
postPatch = ''
substituteInPlace ./setup.py \
--replace "[\"/usr/include/igraph\", \"/usr/local/include/igraph\"]" \
"[\"${igraph-c.dev}/include/igraph\"]"
rm -r vendor
'';
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
igraph
igraph-c
];
checkInputs = [
ddt
unittestCheckHook
];
pythonImportsCheck = [ "leidenalg" ];
meta = with lib; {
description = "Implementation of the Leiden algorithm for various quality functions to be used with igraph in Python";
homepage = "https://leidenalg.readthedocs.io";
license = licenses.gpl3Only;
maintainers = with maintainers; [ jboy ];
};
}