File: hook-awscli.py

package info (click to toggle)
awscli 2.31.35-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156,692 kB
  • sloc: python: 213,816; xml: 14,082; makefile: 189; sh: 178; javascript: 8
file content (34 lines) | stat: -rw-r--r-- 999 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from PyInstaller.utils import hooks

hiddenimports = [
    'docutils',
    'urllib',
    'httplib',
    'html.parser',
    'configparser',
    'xml.etree',
    'pipes',
    'colorama',
    'awscli.handlers',
    # NOTE: This can be removed once this hidden import issue related to
    # setuptools and PyInstaller is resolved:
    # https://github.com/pypa/setuptools/issues/1963
    'pkg_resources.py2_warn',
]

imports_for_legacy_plugins = hooks.collect_submodules(
    'http'
) + hooks.collect_submodules('logging')
hiddenimports += imports_for_legacy_plugins

alias_packages_plugins = hooks.collect_submodules(
    'awscli.botocore'
) + hooks.collect_submodules('awscli.s3transfer')
hiddenimports += alias_packages_plugins

datas = hooks.collect_data_files('awscli')
# prompt_toolkit uses its own metadata to determine
# its version. So we need to bundle the package
# metadata to avoid runtime errors.
# https://github.com/aws/aws-cli/issues/9453
datas += hooks.copy_metadata('prompt_toolkit')