2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, aiofiles
|
|
|
|
, aiohttp
|
2022-09-30 11:47:45 +00:00
|
|
|
, backoff
|
2022-01-13 20:06:32 +00:00
|
|
|
, botocore
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, graphql-core
|
|
|
|
, mock
|
|
|
|
, parse
|
|
|
|
, pytest-asyncio
|
2022-09-30 11:47:45 +00:00
|
|
|
, pytest-console-scripts
|
2022-01-13 20:06:32 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-toolbelt
|
|
|
|
, urllib3
|
|
|
|
, vcrpy
|
|
|
|
, websockets
|
|
|
|
, yarl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gql";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "3.4.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "graphql-python";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-yr8IyAwZ6y2MPTe6bHRW+CIp19R3ZJWHuqdN5qultnQ=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
backoff
|
2022-01-13 20:06:32 +00:00
|
|
|
graphql-core
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
aiofiles
|
|
|
|
mock
|
|
|
|
parse
|
|
|
|
pytest-asyncio
|
2022-09-30 11:47:45 +00:00
|
|
|
pytest-console-scripts
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
|
|
|
vcrpy
|
2022-11-21 17:40:18 +00:00
|
|
|
] ++ passthru.optional-dependencies.all;
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
all = [
|
|
|
|
aiohttp
|
|
|
|
botocore
|
|
|
|
requests
|
|
|
|
requests-toolbelt
|
|
|
|
urllib3
|
|
|
|
websockets
|
|
|
|
];
|
|
|
|
aiohttp = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
requests = [
|
|
|
|
requests
|
|
|
|
requests-toolbelt
|
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
websockets = [
|
|
|
|
websockets
|
|
|
|
];
|
|
|
|
botocore = [
|
|
|
|
botocore
|
|
|
|
];
|
|
|
|
};
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
2022-11-21 17:40:18 +00:00
|
|
|
"--asyncio-mode=auto"
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
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"
|
2022-12-17 10:02:37 +00:00
|
|
|
# Tests require network access
|
|
|
|
"tests/custom_scalars/test_money.py"
|
|
|
|
"tests/test_aiohttp.py"
|
|
|
|
"tests/test_appsync_http.py"
|
|
|
|
"tests/test_appsync_websockets.py"
|
|
|
|
"tests/test_async_client_validation.py"
|
|
|
|
"tests/test_graphqlws_exceptions.py"
|
|
|
|
"tests/test_graphqlws_subscription.py"
|
|
|
|
"tests/test_phoenix_channel_exceptions.py"
|
|
|
|
"tests/test_phoenix_channel_exceptions.py"
|
|
|
|
"tests/test_phoenix_channel_query.py"
|
|
|
|
"tests/test_phoenix_channel_subscription.py"
|
|
|
|
"tests/test_requests.py"
|
|
|
|
"tests/test_websocket_exceptions.py"
|
|
|
|
"tests/test_websocket_query.py"
|
|
|
|
"tests/test_websocket_subscription.py"
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"gql"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "GraphQL client in Python";
|
|
|
|
homepage = "https://github.com/graphql-python/gql";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/graphql-python/gql/releases/tag/v${version}";
|
2022-01-13 20:06:32 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|