From 5c3da3f7add7454b3ec06976f9e42cbe633f6477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 24 Mar 2021 20:03:47 +0100 Subject: [PATCH] python3Packages.python-igraph: 0.8.3 -> 0.9.1 --- .../python-modules/python-igraph/default.nix | 52 +++++++++++++------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/python-igraph/default.nix b/pkgs/development/python-modules/python-igraph/default.nix index 728d47b1f96..8e90ce5190f 100644 --- a/pkgs/development/python-modules/python-igraph/default.nix +++ b/pkgs/development/python-modules/python-igraph/default.nix @@ -1,32 +1,54 @@ -{ buildPythonPackage, fetchPypi, lib, isPy3k -, pkg-config, igraph -, texttable }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, pkg-config +, igraph +, texttable +, python +}: buildPythonPackage rec { pname = "python-igraph"; - version = "0.8.3"; - disabled = !isPy3k; # fails to build + version = "0.9.1"; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ igraph ]; - propagatedBuildInputs = [ texttable ]; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "e1f27622eddeb2bd5fdcbadb41ef048e884790bb050f9627c086dc609d0f1236"; + src = fetchFromGitHub { + owner = "igraph"; + repo = "python-igraph"; + rev = version; + sha256 = "1ldyzza25zvwh144lw8x856z76s8gfvnbdm56fcmwkvm7aj81npw"; }; + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + igraph + igraph.dev + ]; + + propagatedBuildInputs = [ + texttable + ]; + # 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. setupPyGlobalFlags = [ "--use-pkg-config" ]; - doCheck = !isPy3k; + checkPhase = '' + ${python.interpreter} -m unittest + ''; - meta = { + pythonImportsCheck = [ "igraph" ]; + + meta = with lib; { description = "High performance graph data structures and algorithms"; homepage = "https://igraph.org/python/"; - license = lib.licenses.gpl2; - maintainers = [ lib.maintainers.MostAwesomeDude ]; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ MostAwesomeDude dotlambda ]; }; }