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

49 lines
873 B
Nix
Raw Normal View History

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