mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
pythonPackages.vcrpy: add python2-compatible expression
This commit is contained in:
parent
8b114a0e86
commit
46abe66ddb
48
pkgs/development/python-modules/vcrpy/3.nix
Normal file
48
pkgs/development/python-modules/vcrpy/3.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ 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;
|
||||
};
|
||||
}
|
||||
|
@ -8363,7 +8363,10 @@ in {
|
||||
|
||||
varint = callPackage ../development/python-modules/varint { };
|
||||
|
||||
vcrpy = callPackage ../development/python-modules/vcrpy { };
|
||||
vcrpy = if isPy27 then
|
||||
callPackage ../development/python-modules/vcrpy/3.nix { }
|
||||
else
|
||||
callPackage ../development/python-modules/vcrpy { };
|
||||
|
||||
vcver = callPackage ../development/python-modules/vcver { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user