[ie/twitter:spaces] Support video spaces (#10789)
[yt-dlp3.git] / bundle / py2exe.py
blob5b7f4883bcee56c76bcbc0f474ba03c5c379c0eb
1 #!/usr/bin/env python3
3 # Allow execution from anywhere
4 import os
5 import sys
7 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
9 import warnings
11 from py2exe import freeze
13 from devscripts.utils import read_version
15 VERSION = read_version()
18 def main():
19 warnings.warn(
20 'py2exe builds do not support pycryptodomex and needs VC++14 to run. '
21 'It is recommended to run "pyinst.py" to build using pyinstaller instead')
23 freeze(
24 console=[{
25 'script': './yt_dlp/__main__.py',
26 'dest_base': 'yt-dlp',
27 'icon_resources': [(1, 'devscripts/logo.ico')],
28 }],
29 version_info={
30 'version': VERSION,
31 'description': 'A feature-rich command-line audio/video downloader',
32 'comments': 'Official repository: <https://github.com/yt-dlp/yt-dlp>',
33 'product_name': 'yt-dlp',
34 'product_version': VERSION,
36 options={
37 'bundle_files': 0,
38 'compressed': 1,
39 'optimize': 2,
40 'dist_dir': './dist',
41 'excludes': [
42 # py2exe cannot import Crypto
43 'Crypto',
44 'Cryptodome',
45 # requests >=2.32.0 breaks py2exe builds due to certifi dependency
46 'requests',
47 'urllib3',
49 'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'],
50 # Modules that are only imported dynamically must be added here
51 'includes': ['yt_dlp.compat._legacy', 'yt_dlp.compat._deprecated',
52 'yt_dlp.utils._legacy', 'yt_dlp.utils._deprecated'],
54 zipfile=None,
58 if __name__ == '__main__':
59 main()