From ef82f49fc04bc7c4e03ea2dcf4ee6fa251a96912 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Thu, 10 Sep 2020 21:16:39 +0100 Subject: [PATCH] pythonPackages.pyjet: fix tests tests are now pytest tests, and not included in the pypi tarball --- .../python-modules/pyjet/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pyjet/default.nix b/pkgs/development/python-modules/pyjet/default.nix index c535ddad108..abf4beaada0 100644 --- a/pkgs/development/python-modules/pyjet/default.nix +++ b/pkgs/development/python-modules/pyjet/default.nix @@ -1,12 +1,15 @@ -{ lib, buildPythonPackage, fetchPypi, cython, nose, numpy }: +{ lib, buildPythonPackage, fetchFromGitHub, cython, pytest, numpy }: buildPythonPackage rec { pname = "pyjet"; version = "1.6.0"; - src = fetchPypi { - inherit pname version; - sha256 = "ab6e63f8a8fd73bbd76ef2a384eea69bc1c201f2ce876faa4151ade6c0b20615"; + # tests not included in pypi tarball + src = fetchFromGitHub { + owner = "scikit-hep"; + repo = pname; + rev = version; + sha256 = "0b68jnbfk2rw9i1nnwsrbrbgkj7r0w1nw0i9f8fah1wmn78k9csv"; }; # fix for python37 @@ -19,7 +22,11 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ numpy ]; - checkInputs = [ nose ]; + checkInputs = [ pytest ]; + checkPhase = '' + mv pyjet _pyjet + pytest tests/ + ''; meta = with lib; { homepage = "https://github.com/scikit-hep/pyjet";