Skip to content

Commit

Permalink
Add hook for graphql_query
Browse files Browse the repository at this point in the history
  • Loading branch information
M0Rf30 committed May 11, 2023
1 parent e226049 commit cf80875
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/579.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add hook for ``graphql_query``
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fiona==1.9.3; sys_platform != 'win32'
folium==0.14.0
ffpyplayer==4.5.0
geopandas==0.13.0; python_version >= '3.8' and sys_platform != 'win32'
graphql-query==1.0.3
python-gitlab==3.14.0
h5py==3.8.0; python_version >= '3.7'
humanize==4.6.0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2023, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
"""
PyInstaller hook file for graphql_query. Tested with version 1.0.3.
"""

from PyInstaller.utils.hooks import collect_data_files

datas = collect_data_files('graphql_query.templates')
8 changes: 8 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,14 @@ def test_gitlab(pyi_builder):
import gitlab
""")

@importorskip('graphql_query')
def test_graphql_query(pyi_builder):
pyi_builder.test_source("""
from graphql_query import Operation, Query
hero = Query(name="hero", fields=["name"])
operation = Operation(type="query", queries=[hero])
print(operation.render())
""")

@importorskip('shapely')
def test_shapely(pyi_builder):
Expand Down

0 comments on commit cf80875

Please sign in to comment.