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