-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathhook-black.py
29 lines (27 loc) · 1.01 KB
/
hook-black.py
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
# ------------------------------------------------------------------
# Copyright (c) 2025 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 collect_submodules, collect_data_files
# These are all imported from cythonized extensions.
hiddenimports = [
'json',
'platform',
'click',
'mypy_extensions',
'pathspec',
'_black_version',
'platformdirs',
*collect_submodules('black'),
# blib2to3.pytree, blib2to3.pygen, various submodules from blib2to3.pgen2; best to just collect all submodules.
*collect_submodules('blib2to3'),
]
# Ensure that `black/resources/black.schema.json` is collected, in case someone tries to call `black.schema.get_schema`.
datas = collect_data_files('black')