From 78206eb3ec42eeb83ba13a66cdde412b234b5341 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 30 Mar 2018 12:55:05 +0800 Subject: [PATCH] pythonPackages.linode-api: Enable tests --- .../python-modules/linode-api/default.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/linode-api/default.nix b/pkgs/development/python-modules/linode-api/default.nix index fe269e6f89e..ad6b938c988 100644 --- a/pkgs/development/python-modules/linode-api/default.nix +++ b/pkgs/development/python-modules/linode-api/default.nix @@ -1,17 +1,17 @@ { stdenv, buildPythonPackage, - fetchPypi, + fetchFromGitHub, isPy3k, pythonOlder, lib, requests, future, - enum34 }: + enum34, + mock }: buildPythonPackage rec { pname = "linode-api"; version = "4.1.8b1"; # NOTE: this is a beta, and the API may change in future versions. - name = "${pname}-${version}"; disabled = (pythonOlder "2.7"); @@ -22,11 +22,15 @@ buildPythonPackage rec { sed -i -e '/"enum34",/d' setup.py ''); - doCheck = false; # This library does not have any tests at this point. + doCheck = true; + checkInputs = [ mock ]; - src = fetchPypi { - inherit pname version; - sha256 = "0afwqccbdmdnjc3glvn65qz0pmrbs3fa89z3wig2w4v15608p20s"; + # Sources from Pypi exclude test fixtures + src = fetchFromGitHub { + rev = "v${version}"; + owner = "linode"; + repo = "python-linode-api"; + sha256 = "0qfqn92fr876dncwbkf2vhm90hnf7lwpg80hzwyzyzwz1hcngvjg"; }; meta = {