mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-08 18:45:17 +00:00
[build] Migrate py2exe builds to win_exe (#11256)
This commit removes py2exe support Closes #10087 Authored by: bashonly
This commit is contained in:
@@ -103,7 +103,6 @@ def current_git_head():
|
||||
|
||||
_FILE_SUFFIXES = {
|
||||
'zip': '',
|
||||
'py2exe': '_min.exe',
|
||||
'win_exe': '.exe',
|
||||
'win_x86_exe': '_x86.exe',
|
||||
'darwin_exe': '_macos',
|
||||
@@ -117,6 +116,7 @@ _NON_UPDATEABLE_REASONS = {
|
||||
**{variant: None for variant in _FILE_SUFFIXES}, # Updatable
|
||||
**{variant: f'Auto-update is not supported for unpackaged {name} executable; Re-download the latest release'
|
||||
for variant, name in {'win32_dir': 'Windows', 'darwin_dir': 'MacOS', 'linux_dir': 'Linux'}.items()},
|
||||
'py2exe': 'py2exe is no longer supported by yt-dlp; This executable cannot be updated',
|
||||
'source': 'You cannot update when running from source code; Use git to pull the latest changes',
|
||||
'unknown': 'You installed yt-dlp from a manual build or with a package manager; Use that to update',
|
||||
'other': 'You are using an unofficial build of yt-dlp; Build the executable again',
|
||||
@@ -152,15 +152,10 @@ def _get_system_deprecation():
|
||||
variant = detect_variant()
|
||||
|
||||
# Temporary until Windows builds use 3.9, which will drop support for Win7 and 2008ServerR2
|
||||
if variant in ('win_exe', 'win_x86_exe', 'py2exe'):
|
||||
if variant in ('win_exe', 'win_x86_exe'):
|
||||
platform_name = platform.platform()
|
||||
if any(platform_name.startswith(f'Windows-{name}') for name in ('7', '2008ServerR2')):
|
||||
return EXE_MSG_TMPL.format('Windows 7/Server 2008 R2', 'issues/10086', STOP_MSG)
|
||||
elif variant == 'py2exe':
|
||||
return EXE_MSG_TMPL.format(
|
||||
'py2exe builds (yt-dlp_min.exe)', 'issues/10087',
|
||||
'In a future update you will be migrated to the PyInstaller-bundled executable. '
|
||||
'This will be done automatically; no action is required on your part')
|
||||
return None
|
||||
|
||||
# Temporary until aarch64/armv7l build flow is bumped to Ubuntu 20.04 and Python 3.9
|
||||
@@ -525,7 +520,7 @@ class Updater:
|
||||
return os.rename(old_filename, self.filename)
|
||||
|
||||
variant = detect_variant()
|
||||
if variant.startswith('win') or variant == 'py2exe':
|
||||
if variant.startswith('win'):
|
||||
atexit.register(Popen, f'ping 127.0.0.1 -n 5 -w 1000 & del /F "{old_filename}"',
|
||||
shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
elif old_filename:
|
||||
|
||||
Reference in New Issue
Block a user