python.pkgs.pytest-mock: use 2.0.0 for python 2
This commit is contained in:
parent
535ae9d44e
commit
224d7b129c
40
pkgs/development/python-modules/pytest-mock/2.nix
Normal file
40
pkgs/development/python-modules/pytest-mock/2.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, fetchpatch
|
||||||
|
, isPy3k
|
||||||
|
, pytest
|
||||||
|
, mock
|
||||||
|
, setuptools_scm
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pytest-mock";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "b35eb281e93aafed138db25c8772b95d3756108b601947f89af503f8c629413f";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = lib.optional (!isPy3k) mock;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools_scm
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytest
|
||||||
|
];
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
pytest
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Thin-wrapper around the mock package for easier use with py.test.";
|
||||||
|
homepage = "https://github.com/pytest-dev/pytest-mock";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ nand0p ];
|
||||||
|
};
|
||||||
|
}
|
@ -2527,7 +2527,10 @@ in {
|
|||||||
|
|
||||||
pytest-mpl = callPackage ../development/python-modules/pytest-mpl { };
|
pytest-mpl = callPackage ../development/python-modules/pytest-mpl { };
|
||||||
|
|
||||||
pytest-mock = callPackage ../development/python-modules/pytest-mock { };
|
pytest-mock = if isPy3k then
|
||||||
|
callPackage ../development/python-modules/pytest-mock { }
|
||||||
|
else
|
||||||
|
callPackage ../development/python-modules/pytest-mock/2.nix { };
|
||||||
|
|
||||||
pytest-openfiles = callPackage ../development/python-modules/pytest-openfiles { };
|
pytest-openfiles = callPackage ../development/python-modules/pytest-openfiles { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user