diff options
| author | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
|---|---|---|
| committer | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
| commit | 4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch) | |
| tree | e2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/imageio-ffmpeg/ffmpeg-path.patch | |
| parent | jq: fix build with structured-attrs on darwin (diff) | |
| parent | Merge pull request #123802 from superherointj/package-virtmanager-bugfix (diff) | |
| download | nixpkgs-origin/structured-attrs.tar.gz | |
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/imageio-ffmpeg/ffmpeg-path.patch')
| -rw-r--r-- | pkgs/development/python-modules/imageio-ffmpeg/ffmpeg-path.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/imageio-ffmpeg/ffmpeg-path.patch b/pkgs/development/python-modules/imageio-ffmpeg/ffmpeg-path.patch new file mode 100644 index 000000000000..d193ec199f9b --- /dev/null +++ b/pkgs/development/python-modules/imageio-ffmpeg/ffmpeg-path.patch @@ -0,0 +1,39 @@ +diff --git a/imageio_ffmpeg/_utils.py b/imageio_ffmpeg/_utils.py +index 1399cfd..c0eb9be 100644 +--- a/imageio_ffmpeg/_utils.py ++++ b/imageio_ffmpeg/_utils.py +@@ -23,33 +23,7 @@ def get_ffmpeg_exe(): + if exe: + return exe + +- plat = get_platform() +- +- # 2. Try from here +- bin_dir = resource_filename("imageio_ffmpeg", "binaries") +- exe = os.path.join(bin_dir, FNAME_PER_PLATFORM.get(plat, "")) +- if exe and os.path.isfile(exe) and _is_valid_exe(exe): +- return exe +- +- # 3. Try binary from conda package +- # (installed e.g. via `conda install ffmpeg -c conda-forge`) +- if plat.startswith("win"): +- exe = os.path.join(sys.prefix, "Library", "bin", "ffmpeg.exe") +- else: +- exe = os.path.join(sys.prefix, "bin", "ffmpeg") +- if exe and os.path.isfile(exe) and _is_valid_exe(exe): +- return exe +- +- # 4. Try system ffmpeg command +- exe = "ffmpeg" +- if _is_valid_exe(exe): +- return exe +- +- # Nothing was found +- raise RuntimeError( +- "No ffmpeg exe could be found. Install ffmpeg on your system, " +- "or set the IMAGEIO_FFMPEG_EXE environment variable." +- ) ++ return '@ffmpeg@' + + + def _popen_kwargs(prevent_sigint=False): |
