nixpkgs/pkgs/development/python2-modules/vcrpy/default.nix
Frederik Rietdijk ae18d68b6b python2.pkgs: move expressions into python2-modules/ folder
Another step in further separating python2 from python3.
2022-01-16 10:00:16 +01:00

49 lines
874 B
Nix

{ buildPythonPackage
, lib
, six
, fetchPypi
, pyyaml
, mock
, contextlib2
, wrapt
, pytest
, pytest-httpbin
, yarl
, pythonOlder
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "vcrpy";
version = "3.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "21168d5ae14263a833d4b71acfd8278d8841114f24be1b4ab4a5719d0c7f07bc";
};
checkInputs = [
pytest
pytest-httpbin
];
propagatedBuildInputs = [
pyyaml
wrapt
six
]
++ lib.optionals (pythonOlder "3.3") [ contextlib2 mock ]
++ lib.optionals (pythonAtLeast "3.4") [ yarl ];
checkPhase = ''
py.test --ignore=tests/integration -k "not TestVCRConnection"
'';
meta = with lib; {
description = "Automatically mock your HTTP interactions to simplify and speed up testing";
homepage = "https://github.com/kevin1024/vcrpy";
license = licenses.mit;
};
}