1{ lib
2, aiohttp
3, aiohttp-retry
4, aiounittest
5, buildPythonPackage
6, cryptography
7, django
8, fetchFromGitHub
9, mock
10, multidict
11, pyngrok
12, pyjwt
13, pytestCheckHook
14, pythonOlder
15, pytz
16, requests
17}:
18
19buildPythonPackage rec {
20 pname = "twilio";
21 version = "8.10.2";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchFromGitHub {
27 owner = "twilio";
28 repo = "twilio-python";
29 rev = "refs/tags/${version}";
30 hash = "sha256-3Gm1oKhKcTb3c+awMKVQ3qFKkdXC3azR1ECTdw60oCg=";
31 };
32
33 propagatedBuildInputs = [
34 aiohttp
35 aiohttp-retry
36 pyjwt
37 pyngrok
38 pytz
39 requests
40 ];
41
42 nativeCheckInputs = [
43 aiounittest
44 cryptography
45 django
46 mock
47 multidict
48 pytestCheckHook
49 ];
50
51 disabledTests = [
52 # Tests require network access
53 "test_set_default_user_agent"
54 "test_set_user_agent_extensions"
55 ];
56
57 disabledTestPaths = [
58 # Tests require API token
59 "tests/cluster/test_webhook.py"
60 "tests/cluster/test_cluster.py"
61 ];
62
63 pythonImportsCheck = [
64 "twilio"
65 ];
66
67 meta = with lib; {
68 description = "Twilio API client and TwiML generator";
69 homepage = "https://github.com/twilio/twilio-python/";
70 changelog = "https://github.com/twilio/twilio-python/blob/${version}/CHANGES.md";
71 license = licenses.mit;
72 maintainers = with maintainers; [ fab ];
73 };
74}