2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aiohttp-retry,
|
|
|
|
aiounittest,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
django,
|
|
|
|
fetchFromGitHub,
|
|
|
|
mock,
|
|
|
|
multidict,
|
|
|
|
pyngrok,
|
|
|
|
pyjwt,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
2021-02-13 14:23:35 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "twilio";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "9.0.5";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2021-04-12 18:23:04 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twilio";
|
|
|
|
repo = "twilio-python";
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-q7tY44L8KA29HeoLBJf75Xp3IZSiT5DOkhtZ+7BD7Hg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-07-15 17:15:38 +00:00
|
|
|
aiohttp
|
|
|
|
aiohttp-retry
|
2021-04-12 18:23:04 +00:00
|
|
|
pyjwt
|
2023-07-15 17:15:38 +00:00
|
|
|
pyngrok
|
2021-04-12 18:23:04 +00:00
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# aiounittest is not supported on 3.12
|
|
|
|
doCheck = pythonOlder "3.12";
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
aiounittest
|
2022-10-21 18:38:19 +00:00
|
|
|
cryptography
|
2022-09-22 12:36:57 +00:00
|
|
|
django
|
2021-04-12 18:23:04 +00:00
|
|
|
mock
|
2022-09-22 12:36:57 +00:00
|
|
|
multidict
|
2022-04-15 01:41:22 +00:00
|
|
|
pytestCheckHook
|
2021-04-12 18:23:04 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_set_default_user_agent"
|
|
|
|
"test_set_user_agent_extensions"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests require API token
|
|
|
|
"tests/cluster/test_webhook.py"
|
|
|
|
"tests/cluster/test_cluster.py"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "twilio" ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Twilio API client and TwiML generator";
|
|
|
|
homepage = "https://github.com/twilio/twilio-python/";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/twilio/twilio-python/blob/${version}/CHANGES.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|