3 # Allow execution from anywhere
7 sys
.path
.insert(0, os
.path
.dirname(os
.path
.dirname(os
.path
.abspath(__file__
))))
11 from py2exe
import freeze
13 from devscripts
.utils
import read_version
15 VERSION
= read_version()
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')
25 'script': './yt_dlp/__main__.py',
26 'dest_base': 'yt-dlp',
27 'icon_resources': [(1, 'devscripts/logo.ico')],
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
,
42 # py2exe cannot import Crypto
45 # requests >=2.32.0 breaks py2exe builds due to certifi dependency
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'],
58 if __name__
== '__main__':