1{ fetchPypi
2, lib
3, fetchpatch
4, buildPythonPackage
5, isPy3k
6, appdirs
7, attrs
8, cached-property
9, defusedxml
10, isodate
11, lxml
12, requests
13, requests_toolbelt
14, six
15, pytz
16, tornado
17, aiohttp
18# test dependencies
19, freezegun
20, mock
21, pretend
22, pytest
23, pytestcov
24, requests-mock
25, aioresponses
26}:
27
28buildPythonPackage rec {
29 pname = "zeep";
30 version = "3.4.0";
31
32 src = fetchPypi {
33 inherit pname version;
34 sha256 = "0e98669cfeb60756231ae185498f9ae21b30b2681786b8de58ed34c3b93e41dd";
35 };
36
37 patches = [
38 ( fetchpatch {
39 url = "https://github.com/mvantellingen/python-zeep/pull/1006/commits/ba7edd6bf2b31023b31e8f17c161e1d6d5af3d29.patch";
40 sha256 = "1j0jd5hmh457im9sbawaqf6pnfy36fhr9wqdim8wk5da9ixr0ajs";
41 })
42 ];
43
44 propagatedBuildInputs = [
45 appdirs
46 attrs
47 cached-property
48 defusedxml
49 isodate
50 lxml
51 requests
52 requests_toolbelt
53 six
54 pytz
55
56 # optional requirements
57 tornado
58 ] ++ lib.optional isPy3k aiohttp;
59
60 checkInputs = [
61 freezegun
62 mock
63 pretend
64 pytestcov
65 pytest
66 requests-mock
67 ] ++ lib.optional isPy3k aioresponses;
68
69 checkPhase = ''
70 runHook preCheck
71 # fix compatibility with pytest 4
72 substituteInPlace tests/conftest.py \
73 --replace 'request.node.get_marker("requests")' 'request.node.get_closest_marker("requests")'
74 # ignored tests requires xmlsec python module
75 HOME=$(mktemp -d) pytest tests --ignore tests/test_wsse_signature.py
76 runHook postCheck
77 '';
78
79 meta = with lib; {
80 homepage = "http://docs.python-zeep.org";
81 license = licenses.mit;
82 description = "A modern/fast Python SOAP client based on lxml / requests";
83 maintainers = with maintainers; [ rvl ];
84 };
85}