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