1{
2 lib,
3 aiohttp,
4 aioresponses,
5 attrs,
6 buildPythonPackage,
7 defusedxml,
8 fetchFromGitHub,
9 freezegun,
10 httpx,
11 isodate,
12 lxml,
13 mock,
14 platformdirs,
15 pretend,
16 pytest-asyncio,
17 pytest-httpx,
18 pytestCheckHook,
19 pythonOlder,
20 pytz,
21 requests,
22 requests-toolbelt,
23 requests-file,
24 requests-mock,
25 xmlsec,
26}:
27
28buildPythonPackage rec {
29 pname = "zeep";
30 version = "4.2.1";
31 format = "setuptools";
32
33 disabled = pythonOlder "3.6";
34
35 src = fetchFromGitHub {
36 owner = "mvantellingen";
37 repo = "python-zeep";
38 rev = "refs/tags/${version}";
39 hash = "sha256-8f6kS231gbaZ8qyE8BKMcbnZsm8o2+iBoTlQrs5X+jY=";
40 };
41
42 propagatedBuildInputs = [
43 attrs
44 defusedxml
45 isodate
46 lxml
47 platformdirs
48 pytz
49 requests
50 requests-file
51 requests-toolbelt
52 ];
53
54 passthru.optional-dependencies = {
55 async_require = [ httpx ];
56 xmlsec_require = [ xmlsec ];
57 };
58
59 pythonImportsCheck = [ "zeep" ];
60
61 nativeCheckInputs = [
62 aiohttp
63 aioresponses
64 freezegun
65 mock
66 pretend
67 pytest-asyncio
68 pytest-httpx
69 pytestCheckHook
70 requests-mock
71 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
72
73 disabledTests = [
74 # Failed: External connections not allowed during tests.
75 "test_has_expired"
76 "test_has_not_expired"
77 "test_memory_cache_timeout"
78 "test_bytes_like_password_digest"
79 "test_password_digest"
80 ];
81
82 preCheck = ''
83 export HOME=$TMPDIR
84 '';
85
86 meta = with lib; {
87 changelog = "https://github.com/mvantellingen/python-zeep/releases/tag/${version}";
88 description = "Python SOAP client";
89 homepage = "http://docs.python-zeep.org";
90 license = licenses.mit;
91 };
92}