python3Packages.ffmpy: relax uv constraint

This commit is contained in:
Martin Weinelt
2026-02-15 20:35:51 +01:00
parent 97b2e48de0
commit bee33e6854
@@ -21,20 +21,23 @@ buildPythonPackage rec {
hash = "sha256-TDE/r6qoWpkIU47+FPLqWgZAJd9FxSbZthhLh9g4evo=";
};
postPatch =
# Default to store ffmpeg.
''
substituteInPlace ffmpy/ffmpy.py \
--replace-fail \
'executable: str = "ffmpeg",' \
'executable: str = "${lib.getExe ffmpeg-headless}",'
''
# The tests test a mock that does not behave like ffmpeg. If we default to the nix-store ffmpeg they fail.
+ ''
for fname in tests/*.py; do
echo >>"$fname" 'FFmpeg.__init__.__defaults__ = ("ffmpeg", *FFmpeg.__init__.__defaults__[1:])'
done
'';
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "uv_build>=0.7.9,<0.10.0" uv_build
''
# Default to store ffmpeg.
+ ''
substituteInPlace ffmpy/ffmpy.py \
--replace-fail \
'executable: str = "ffmpeg",' \
'executable: str = "${lib.getExe ffmpeg-headless}",'
''
# The tests test a mock that does not behave like ffmpeg. If we default to the nix-store ffmpeg they fail.
+ ''
for fname in tests/*.py; do
echo >>"$fname" 'FFmpeg.__init__.__defaults__ = ("ffmpeg", *FFmpeg.__init__.__defaults__[1:])'
done
'';
pythonImportsCheck = [ "ffmpy" ];