Skip to content

Commit 719e120

Browse files
authored
Ignore platforms other than Linux for ffmpeg (#4410)
* Fix ffmpeg version * Ignore platforms other than Linux for ffmpeg * Removed unnecessary changes
1 parent 921b6be commit 719e120

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ def get_extensions():
351351

352352
ffmpeg_exe = distutils.spawn.find_executable('ffmpeg')
353353
has_ffmpeg = ffmpeg_exe is not None
354+
if sys.platform != 'linux':
355+
has_ffmpeg = False
354356
if has_ffmpeg:
355357
try:
356358
# this splits on both dots and spaces as the output format differs across versions / platforms
@@ -360,7 +362,7 @@ def get_extensions():
360362
if StrictVersion(ffmpeg_version) >= StrictVersion('4.3'):
361363
print(f'ffmpeg {ffmpeg_version} not supported yet, please use ffmpeg 4.2.')
362364
has_ffmpeg = False
363-
except (IndexError, ValueError):
365+
except (subprocess.CalledProcessError, IndexError, ValueError):
364366
print('Error fetching ffmpeg version, ignoring ffmpeg.')
365367
has_ffmpeg = False
366368

0 commit comments

Comments
 (0)