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 packaging,
15 platformdirs,
16 pretend,
17 pytest-asyncio,
18 pytest-httpx,
19 pytestCheckHook,
20 pythonOlder,
21 pytz,
22 requests,
23 requests-toolbelt,
24 requests-file,
25 requests-mock,
26 setuptools,
27 xmlsec,
28}:
29
30buildPythonPackage rec {
31 pname = "zeep";
32 version = "4.3.1";
33 pyproject = true;
34
35 disabled = pythonOlder "3.6";
36
37 src = fetchFromGitHub {
38 owner = "mvantellingen";
39 repo = "python-zeep";
40 tag = version;
41 hash = "sha256-Bt0QqzJMKPXV91hZYETy9DKoQAELUWlYIh8w/IFTE8E=";
42 };
43
44 patches = [ ./httpx-compat.patch ];
45
46 build-system = [ setuptools ];
47
48 dependencies = [
49 attrs
50 defusedxml
51 isodate
52 lxml
53 packaging
54 platformdirs
55 pytz
56 requests
57 requests-file
58 requests-toolbelt
59 ];
60
61 optional-dependencies = {
62 async = [ httpx ];
63 xmlsec = [ xmlsec ];
64 };
65
66 pythonImportsCheck = [ "zeep" ];
67
68 nativeCheckInputs = [
69 aiohttp
70 aioresponses
71 freezegun
72 mock
73 pretend
74 pytest-asyncio
75 pytest-httpx
76 pytestCheckHook
77 requests-mock
78 ]
79 ++ lib.flatten (builtins.attrValues optional-dependencies);
80
81 disabledTests = [
82 # Failed: External connections not allowed during tests.
83 "test_has_expired"
84 "test_has_not_expired"
85 "test_memory_cache_timeout"
86 "test_bytes_like_password_digest"
87 "test_password_digest"
88 ];
89
90 preCheck = ''
91 export HOME=$TMPDIR
92 '';
93
94 meta = with lib; {
95 changelog = "https://github.com/mvantellingen/python-zeep/releases/tag/${version}";
96 description = "Python SOAP client";
97 homepage = "http://docs.python-zeep.org";
98 license = licenses.mit;
99 };
100}