summary refs log tree commit diff
path: root/pkgs/development/python-modules/gql/default.nix
blob: 3df5f4c8458d34e21b7b2db690428c90a9ac0693 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{ lib
, aiofiles
, aiohttp
, botocore
, buildPythonPackage
, fetchFromGitHub
, graphql-core
, mock
, parse
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, requests
, requests-toolbelt
, urllib3
, vcrpy
, websockets
, yarl
}:

buildPythonPackage rec {
  pname = "gql";
  version = "3.0.0";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "graphql-python";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-c2OVBOIwQlwyqET8Q22O65VtWduVzQjYOhkE8GpD6LQ=";
  };

  propagatedBuildInputs = [
    aiohttp
    botocore
    graphql-core
    requests
    requests-toolbelt
    urllib3
    websockets
    yarl
  ];

  checkInputs = [
    aiofiles
    mock
    parse
    pytest-asyncio
    pytestCheckHook
    vcrpy
  ];

  disabledTests = [
    # Tests requires network access
    "test_execute_result_error"
    "test_http_transport"
  ];

  disabledTestPaths = [
    # Exclude linter tests
    "gql-checker/tests/test_flake8_linter.py"
    "gql-checker/tests/test_pylama_linter.py"
  ];

  pythonImportsCheck = [
    "gql"
  ];

  meta = with lib; {
    description = "GraphQL client in Python";
    homepage = "https://github.com/graphql-python/gql";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}