"""pyinstaller configuration for googleapiclient."""

from PyInstaller.utils.hooks import collect_data_files, copy_metadata

# 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')
datas += collect_data_files('googleapiclient.discovery',
                            excludes=['*.txt', '**/__pycache__'])

"""pyinstaller configuration for googleapiclient."""

from PyInstaller.utils.hooks import collect_data_files, copy_metadata

# 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')
datas += collect_data_files('googleapiclient.discovery',
                            excludes=['*.txt', '**/__pycache__'])

datas += collect_data_files('googleapiclient.discovery_cache',
                            excludes=['*.txt', '**/__pycache__'])

Fix pyinstall-build by including discovery cache documents.
Fix pyinstall-build by including discovery cache documents.

Produced an error related to serviceusage API.

Change-Id: Idf6b83912c3e71e7081ef1b6b0a2836a18723542
GitOrigin-RevId: e38c69cfc7269177570a8aa8c23f8eaa2d32ddd2

  """pyinstaller configuration for googleapiclient."""
  
  from PyInstaller.utils.hooks import collect_data_files, copy_metadata
  
  # 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')
  datas += collect_data_files('googleapiclient.discovery',
                              excludes=['*.txt', '**/__pycache__'])
  
+ datas += collect_data_files('googleapiclient.discovery_cache',
+                             excludes=['*.txt', '**/__pycache__'])
+ 
Fix pyinstall-build by including discovery cache documents.
## Code Before:
"""pyinstaller configuration for googleapiclient."""

from PyInstaller.utils.hooks import collect_data_files, copy_metadata

# 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')
datas += collect_data_files('googleapiclient.discovery',
                            excludes=['*.txt', '**/__pycache__'])

## Instruction:
Fix pyinstall-build by including discovery cache documents.
## Code After:
"""pyinstaller configuration for googleapiclient."""

from PyInstaller.utils.hooks import collect_data_files, copy_metadata

# 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')
datas += collect_data_files('googleapiclient.discovery',
                            excludes=['*.txt', '**/__pycache__'])

datas += collect_data_files('googleapiclient.discovery_cache',
                            excludes=['*.txt', '**/__pycache__'])
