nixpkgs/pkgs/development/python-modules/vcrpy/default.nix
Frederik Rietdijk ced21f5e1a pythonPackages: remove name attribute`
The `buildPython*` function computes name from `pname` and `version`.
This change removes `name` attribute from all expressions in
`pkgs/development/python-modules`.

While at it, some other minor changes were made as well, such as
replacing `fetchurl` calls with `fetchPypi`.
2018-06-23 18:14:26 +02:00

50 lines
883 B
Nix

{ buildPythonPackage
, lib
, six
, fetchPypi
, pyyaml
, mock
, contextlib2
, wrapt
, pytest
, httpbin
, pytest-httpbin
, yarl
, pythonOlder
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "vcrpy";
version = "1.12.0";
src = fetchPypi {
inherit pname version;
sha256 = "13c6a835a6dc1ac96d7e6cae03587525eb260d7a46c6e5dd7a25416655eecb3a";
};
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;
};
}