Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / imageio-ffmpeg / ffmpeg-path.patch
blob33e2f9695d80e4c227bd40f3b50095f5a7154d5f
1 diff --git a/imageio_ffmpeg/_utils.py b/imageio_ffmpeg/_utils.py
2 index 6387834..e5e312d 100644
3 --- a/imageio_ffmpeg/_utils.py
4 +++ b/imageio_ffmpeg/_utils.py
5 @@ -38,29 +38,7 @@ def get_ffmpeg_exe():
7 @lru_cache()
8 def _get_ffmpeg_exe():
9 - plat = get_platform()
11 - # 2. Try from here
12 - bin_dir = resource_filename("imageio_ffmpeg", "binaries")
13 - exe = os.path.join(bin_dir, FNAME_PER_PLATFORM.get(plat, ""))
14 - if exe and os.path.isfile(exe) and _is_valid_exe(exe):
15 - return exe
17 - # 3. Try binary from conda package
18 - # (installed e.g. via `conda install ffmpeg -c conda-forge`)
19 - if plat.startswith("win"):
20 - exe = os.path.join(sys.prefix, "Library", "bin", "ffmpeg.exe")
21 - else:
22 - exe = os.path.join(sys.prefix, "bin", "ffmpeg")
23 - if exe and os.path.isfile(exe) and _is_valid_exe(exe):
24 - return exe
26 - # 4. Try system ffmpeg command
27 - exe = "ffmpeg"
28 - if _is_valid_exe(exe):
29 - return exe
31 - return None
32 + return "@ffmpeg@"
35 def _popen_kwargs(prevent_sigint=False):