1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 requests,
7 httpx,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "telegraph";
13 version = "2.2.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 repo = "telegraph";
20 owner = "python273";
21 tag = "v${version}";
22 hash = "sha256-xARX8lSOftNVYY4InR5vU4OiguCJJJZv/W76G9eLgNY=";
23 };
24
25 propagatedBuildInputs = [ requests ];
26
27 optional-dependencies = {
28 aio = [ httpx ];
29 };
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 enabledTestPaths = [ "tests/" ];
34
35 disabledTests = [ "test_get_page" ];
36
37 pythonImportsCheck = [ "telegraph" ];
38
39 meta = with lib; {
40 description = "Telegraph API wrapper";
41 homepage = "https://github.com/python273/telegraph";
42 changelog = "https://github.com/python273/telegraph/releases/tag/v${version}";
43 license = licenses.mit;
44 maintainers = with maintainers; [ gp2112 ];
45 };
46}