1{ lib
2, backports-zoneinfo
3, buildPythonPackage
4, cached-property
5, defusedxml
6, dnspython
7, fetchFromGitHub
8, fetchpatch
9, flake8
10, isodate
11, lxml
12, oauthlib
13, psutil
14, pygments
15, python-dateutil
16, pythonOlder
17, pytz
18, pyyaml
19, requests
20, requests_ntlm
21, requests-oauthlib
22, requests-kerberos
23, requests-mock
24, tzdata
25, tzlocal
26}:
27
28buildPythonPackage rec {
29 pname = "exchangelib";
30 version = "4.7.6";
31 format = "setuptools";
32
33 disabled = pythonOlder "3.7";
34
35 src = fetchFromGitHub {
36 owner = "ecederstrand";
37 repo = pname;
38 rev = "refs/tags/v${version}";
39 hash = "sha256-Oarmdc2PuE4kQ/qUqQhuzdTpIrrMFCK72CrVmoSH1DI=";
40 };
41
42 patches = [
43 (fetchpatch {
44 name = "tests-timezones.patch";
45 url = "https://github.com/ecederstrand/exchangelib/commit/d5d386f54adec8ab02f871332b89e1176c214ba2.diff";
46 hash = "sha256-E3Ys6IDJ/yMsvi+1GKbwckkhbNrc9JLM/+GrPtUz+mY=";
47 })
48 ];
49
50 propagatedBuildInputs = [
51 cached-property
52 defusedxml
53 dnspython
54 isodate
55 lxml
56 oauthlib
57 pygments
58 requests
59 requests_ntlm
60 requests-oauthlib
61 requests-kerberos
62 tzdata
63 tzlocal
64 ] ++ lib.optionals (pythonOlder "3.9") [
65 backports-zoneinfo
66 ];
67
68 checkInputs = [
69 flake8
70 psutil
71 python-dateutil
72 pytz
73 pyyaml
74 requests-mock
75 ];
76
77 pythonImportsCheck = [
78 "exchangelib"
79 ];
80
81 meta = with lib; {
82 description = "Client for Microsoft Exchange Web Services (EWS)";
83 homepage = "https://github.com/ecederstrand/exchangelib";
84 license = licenses.bsd2;
85 maintainers = with maintainers; [ catern ];
86 };
87}