From fc99f9b29b04460e0d4ea947e6490c05abd4257f Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Fri, 5 Sep 2025 17:59:22 -0400 Subject: [PATCH] [no ci] Create hook-googleapiclient.model.py --- src/tools/hooks/hook-googleapiclient.model.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/tools/hooks/hook-googleapiclient.model.py diff --git a/src/tools/hooks/hook-googleapiclient.model.py b/src/tools/hooks/hook-googleapiclient.model.py new file mode 100644 index 00000000..fed43cd4 --- /dev/null +++ b/src/tools/hooks/hook-googleapiclient.model.py @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------ +# Copyright (c) 2021 PyInstaller Development Team. +# +# This file is distributed under the terms of the GNU General Public +# License (version 2.0 or later). +# +# The full license is available in LICENSE, distributed with +# this software. +# +# SPDX-License-Identifier: GPL-2.0-or-later +# ------------------------------------------------------------------ + +from PyInstaller.utils.hooks import copy_metadata +from PyInstaller.utils.hooks import collect_data_files + +# googleapiclient.model queries the library version via +# pkg_resources.get_distribution("google-api-python-client").version, +# so we need to collect that package's metadata +datas = copy_metadata('google_api_python_client') +# we don't want these cached discovery files and they make the binary HUUUGEEEE +#datas += collect_data_files('googleapiclient.discovery_cache', excludes=['*.txt', '**/__pycache__'])