nixpkgs/pkgs/development/python-modules/vcrpy/default.nix

49 lines
874 B
Nix
Raw Normal View History

2017-04-27 07:29:59 +01:00
{ buildPythonPackage
, lib
2017-05-01 08:11:52 +01:00
, six
, fetchPypi
2017-04-27 07:29:59 +01:00
, pyyaml
, mock
, contextlib2
, wrapt
2017-05-01 08:11:52 +01:00
, pytest
2017-04-27 07:29:59 +01:00
, pytest-httpbin
, yarl
2017-05-01 08:11:52 +01:00
, pythonOlder
, pythonAtLeast
2017-04-27 07:29:59 +01:00
}:
2017-04-25 11:41:28 +01:00
2017-04-27 07:29:59 +01:00
buildPythonPackage rec {
2017-05-01 08:11:52 +01:00
pname = "vcrpy";
2020-06-06 07:47:36 +01:00
version = "4.0.2";
2017-04-25 11:41:28 +01:00
2017-05-01 08:11:52 +01:00
src = fetchPypi {
inherit pname version;
2020-06-06 07:47:36 +01:00
sha256 = "9740c5b1b63626ec55cefb415259a2c77ce00751e97b0f7f214037baaf13c7bf";
2017-04-25 11:41:28 +01:00
};
2017-05-01 08:11:52 +01:00
checkInputs = [
pytest
2017-04-25 11:41:28 +01:00
pytest-httpbin
];
2017-05-01 08:11:52 +01:00
propagatedBuildInputs = [
pyyaml
wrapt
six
]
++ lib.optionals (pythonOlder "3.3") [ contextlib2 mock ]
++ lib.optionals (pythonAtLeast "3.4") [ yarl ];
2017-04-27 07:29:59 +01:00
checkPhase = ''
2017-05-01 08:11:52 +01:00
py.test --ignore=tests/integration -k "not TestVCRConnection"
2017-04-27 07:29:59 +01:00
'';
2017-04-25 11:41:28 +01:00
meta = with lib; {
description = "Automatically mock your HTTP interactions to simplify and speed up testing";
homepage = "https://github.com/kevin1024/vcrpy";
2017-04-25 11:41:28 +01:00
license = licenses.mit;
};
}