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

86 lines
1.7 KiB
Nix
Raw Normal View History

{ fetchPypi
, lib
2019-09-13 17:05:12 +01:00
, fetchpatch
, buildPythonPackage
, isPy3k
, appdirs
, attrs
, cached-property
, defusedxml
, isodate
, lxml
, requests
, requests_toolbelt
, six
, pytz
, tornado
, aiohttp
# test dependencies
, freezegun
, mock
, pretend
, pytest
, pytestcov
, requests-mock
, aioresponses
}:
buildPythonPackage rec {
pname = "zeep";
2019-06-16 18:13:41 +01:00
version = "3.4.0";
src = fetchPypi {
inherit pname version;
2019-06-16 18:13:41 +01:00
sha256 = "0e98669cfeb60756231ae185498f9ae21b30b2681786b8de58ed34c3b93e41dd";
};
2019-09-13 17:05:12 +01:00
patches = [
( fetchpatch {
url = "https://github.com/mvantellingen/python-zeep/pull/1006/commits/ba7edd6bf2b31023b31e8f17c161e1d6d5af3d29.patch";
sha256 = "1j0jd5hmh457im9sbawaqf6pnfy36fhr9wqdim8wk5da9ixr0ajs";
})
];
propagatedBuildInputs = [
appdirs
attrs
cached-property
defusedxml
isodate
lxml
requests
requests_toolbelt
six
pytz
# optional requirements
2017-10-25 19:04:35 +01:00
tornado
] ++ lib.optional isPy3k aiohttp;
2017-10-25 19:04:35 +01:00
checkInputs = [
freezegun
mock
pretend
pytestcov
pytest
requests-mock
] ++ lib.optional isPy3k aioresponses;
checkPhase = ''
runHook preCheck
# fix compatibility with pytest 4
substituteInPlace tests/conftest.py \
--replace 'request.node.get_marker("requests")' 'request.node.get_closest_marker("requests")'
# ignored tests requires xmlsec python module
HOME=$(mktemp -d) pytest tests --ignore tests/test_wsse_signature.py
runHook postCheck
'';
meta = with lib; {
homepage = "http://docs.python-zeep.org";
license = licenses.mit;
description = "A modern/fast Python SOAP client based on lxml / requests";
maintainers = with maintainers; [ rvl ];
};
}