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