mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 02:42:30 +00:00
Fix bug in 5200976949
This commit is contained in:
parent
956f1cf805
commit
d08e1e6875
10
pyinst.py
10
pyinst.py
@ -6,11 +6,10 @@
|
|||||||
|
|
||||||
from PyInstaller.__main__ import run as run_pyinstaller
|
from PyInstaller.__main__ import run as run_pyinstaller
|
||||||
|
|
||||||
OS_NAME, MACHINE = sys.platform, platform.machine()
|
OS_NAME, MACHINE, ARCH = sys.platform, platform.machine(), platform.architecture()[0][:2]
|
||||||
if MACHINE in ('x86_64', 'amd64'):
|
if MACHINE in ('x86_64', 'AMD64') or ('i' in MACHINE and '86' in MACHINE):
|
||||||
MACHINE = ''
|
# NB: Windows x86 has MACHINE = AMD64 irrespective of bitness
|
||||||
elif 'i' in MACHINE and '86' in MACHINE:
|
MACHINE = 'x86' if ARCH == '32' else ''
|
||||||
MACHINE = 'x86'
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -51,7 +50,6 @@ def parse_options():
|
|||||||
# Compatibility with older arguments
|
# Compatibility with older arguments
|
||||||
opts = sys.argv[1:]
|
opts = sys.argv[1:]
|
||||||
if opts[0:1] in (['32'], ['64']):
|
if opts[0:1] in (['32'], ['64']):
|
||||||
ARCH = platform.architecture()[0][:2]
|
|
||||||
if ARCH != opts[0]:
|
if ARCH != opts[0]:
|
||||||
raise Exception(f'{opts[0]}bit executable cannot be built on a {ARCH}bit system')
|
raise Exception(f'{opts[0]}bit executable cannot be built on a {ARCH}bit system')
|
||||||
opts = opts[1:]
|
opts = opts[1:]
|
||||||
|
Loading…
Reference in New Issue
Block a user