2021-03-20 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2021-03-20 04:20:00 +00:00
|
|
|
, igraph
|
|
|
|
, texttable
|
2024-02-29 20:09:43 +00:00
|
|
|
, cairocffi
|
|
|
|
, matplotlib
|
|
|
|
, plotly
|
|
|
|
, pytestCheckHook
|
2021-03-20 04:20:00 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "igraph";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.11.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "igraph";
|
|
|
|
repo = "python-igraph";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-nfXCAjTKxtslVk17h60+v/JQusQTmaTRCPvvFG4/OPk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
rm -r vendor
|
|
|
|
'';
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2024-02-29 20:09:43 +00:00
|
|
|
setuptools
|
2021-03-20 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
igraph
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
texttable
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
cairo = [ cairocffi ];
|
|
|
|
matplotlib = [ matplotlib ];
|
|
|
|
plotly = [ plotly ];
|
|
|
|
plotting = [ cairocffi ];
|
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
# NB: We want to use our igraph, not vendored igraph, but even with
|
|
|
|
# pkg-config on the PATH, their custom setup.py still needs to be explicitly
|
|
|
|
# told to do it. ~ C.
|
2024-02-29 20:09:43 +00:00
|
|
|
env.IGRAPH_USE_PKG_CONFIG = true;
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"testAuthorityScore"
|
|
|
|
"test_labels"
|
2022-11-21 17:40:18 +00:00
|
|
|
];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "igraph" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "High performance graph data structures and algorithms";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "igraph";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://igraph.org/python/";
|
2022-04-27 09:35:20 +00:00
|
|
|
changelog = "https://github.com/igraph/python-igraph/blob/${src.rev}/CHANGELOG.md";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|