nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 88 lines 2.1 kB view raw
1{ lib 2, aniso8601 3, buildPythonPackage 4, fetchpatch 5, fetchFromGitHub 6, graphql-core 7, graphql-relay 8, promise 9, pytest-asyncio 10, pytest-benchmark 11, pytest-mock 12, pytestCheckHook 13, pythonAtLeast 14, pythonOlder 15, pytz 16, snapshottest 17}: 18 19buildPythonPackage rec { 20 pname = "graphene"; 21 version = "3.0.0"; 22 format = "setuptools"; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "graphql-python"; 28 repo = "graphene"; 29 rev = "v${version}"; 30 sha256 = "0qgp3nl6afyz6y27bw175hyqppx75pp1vqwl7nvlpwvgwyyc2mnl"; 31 }; 32 33 patches = [ 34 # Fix graphql-core 3.2.0 support 35 (fetchpatch { 36 # https://github.com/graphql-python/graphene/pull/1378 37 url = "https://github.com/graphql-python/graphene/commit/989970f89341ebb949962d13dcabca8a6ccddad4.patch"; 38 hash = "sha256-qRxWTqv5XQN7uFjL2uv9NjTvSLi76/MyFSa4jpkb8to="; 39 }) 40 (fetchpatch { 41 # https://github.com/graphql-python/graphene/pull/1417 42 url = "https://github.com/graphql-python/graphene/commit/4e0e18d1682b7759bdf16499c573f675c7fb51cb.patch"; 43 hash = "sha256-icdTGDabJouQ3hVpcMkkeabNwdoDxdVVAboTOWFbO94="; 44 }) 45 ]; 46 47 propagatedBuildInputs = [ 48 aniso8601 49 graphql-core 50 graphql-relay 51 ]; 52 53 checkInputs = [ 54 promise 55 pytestCheckHook 56 pytest-asyncio 57 pytest-benchmark 58 pytest-mock 59 pytz 60 snapshottest 61 ]; 62 63 pytestFlagsArray = [ 64 "--benchmark-disable" 65 ]; 66 67 disabledTests = [ 68 # Expects different Exeception classes, but receives none of them 69 # https://github.com/graphql-python/graphene/issues/1346 70 "test_unexpected_error" 71 # https://github.com/graphql-python/graphene/pull/1417#issuecomment-1102492138 72 "test_example_end_to_end" 73 ] ++ lib.optionals (pythonAtLeast "3.10") [ 74 "test_objecttype_as_container_extra_args" 75 "test_objecttype_as_container_invalid_kwargs" 76 ]; 77 78 pythonImportsCheck = [ 79 "graphene" 80 ]; 81 82 meta = with lib; { 83 description = "GraphQL Framework for Python"; 84 homepage = "https://github.com/graphql-python/graphene"; 85 license = licenses.mit; 86 maintainers = with maintainers; [ SuperSandro2000 ]; 87 }; 88}