aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/update.py
diff options
context:
space:
mode:
authorSimon Sawicki <contact@grub4k.xyz>2024-04-29 00:19:25 +0200
committerGitHub <noreply@github.com>2024-04-28 22:19:25 +0000
commitac817bc83efd939dca3e40c4b527d0ccfc77172b (patch)
tree5c3a46117f018866d45076f6b9b55a13330bdbd9 /yt_dlp/update.py
parent1a366403d9c26b992faa77e00f4d02ead57559e3 (diff)
[build] Migrate `linux_exe` to static musl builds (#9811)
Authored by: Grub4K, bashonly Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Diffstat (limited to 'yt_dlp/update.py')
-rw-r--r--yt_dlp/update.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yt_dlp/update.py b/yt_dlp/update.py
index f47cbc5b2..ca70f69a7 100644
--- a/yt_dlp/update.py
+++ b/yt_dlp/update.py
@@ -69,6 +69,10 @@ def _get_variant_and_executable_path():
# Ref: https://en.wikipedia.org/wiki/Uname#Examples
if machine[1:] in ('x86', 'x86_64', 'amd64', 'i386', 'i686'):
machine = '_x86' if platform.architecture()[0][:2] == '32' else ''
+ # sys.executable returns a /tmp/ path for staticx builds (linux_static)
+ # Ref: https://staticx.readthedocs.io/en/latest/usage.html#run-time-information
+ if static_exe_path := os.getenv('STATICX_PROG_PATH'):
+ path = static_exe_path
return f'{remove_end(sys.platform, "32")}{machine}_exe', path
path = os.path.dirname(__file__)