From 96cf6d46ec02cc9be262c3d59a4e677021279666 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 27 Nov 2023 08:48:29 +0100 Subject: [PATCH 1/2] python311Packages.av: refactor --- .../development/python-modules/av/default.nix | 121 ++++++++---------- 1 file changed, 53 insertions(+), 68 deletions(-) diff --git a/pkgs/development/python-modules/av/default.nix b/pkgs/development/python-modules/av/default.nix index e80f521efb2b..71aa615c8e63 100644 --- a/pkgs/development/python-modules/av/default.nix +++ b/pkgs/development/python-modules/av/default.nix @@ -1,34 +1,28 @@ { lib -, buildPythonPackage -, fetchFromGitHub -, pythonOlder , stdenv - -# build +, buildPythonPackage , cython -, pkg-config -, setuptools - -# runtime +, fetchFromGitHub , ffmpeg_5-headless - -# tests , numpy , pillow +, pkg-config , pytestCheckHook +, pythonOlder +, setuptools }: buildPythonPackage rec { pname = "av"; version = "10.0.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "mikeboers"; repo = "PyAV"; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-XcHP8RwC2iwD64Jc7SS+t9OxjFTsz3FbrnjMgJnN7Ak="; }; @@ -53,64 +47,54 @@ buildPythonPackage rec { pytestCheckHook ]; - pytestFlagsArray = [ - # Tests that want to download FATE data - # https://github.com/PyAV-Org/PyAV/issues/955 - "--deselect=tests/test_audiofifo.py::TestAudioFifo::test_data" - "--deselect=tests/test_codec_context.py::TestCodecContext::test_codec_tag" - "--deselect=tests/test_codec_context.py::TestCodecContext::test_parse" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_aac" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_dnxhd" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_dvvideo" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_h264" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_mjpeg" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_mp2" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_mpeg1video" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_mpeg4" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_pcm_s24le" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_png" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_tiff" - "--deselect=tests/test_codec_context.py::TestEncoding::test_encoding_xvid" - "--deselect=tests/test_decode.py::TestDecode::test_decode_audio_sample_count" - "--deselect=tests/test_decode.py::TestDecode::test_decoded_motion_vectors" - "--deselect=tests/test_decode.py::TestDecode::test_decoded_motion_vectors_no_flag" - "--deselect=tests/test_decode.py::TestDecode::test_decoded_time_base" - "--deselect=tests/test_decode.py::TestDecode::test_decoded_video_frame_count" - "--deselect=tests/test_encode.py::TestBasicAudioEncoding::test_transcode" - "--deselect=tests/test_file_probing.py::TestAudioProbe::test_container_probing" - "--deselect=tests/test_file_probing.py::TestAudioProbe::test_stream_probing" - "--deselect=tests/test_file_probing.py::TestDataProbe::test_container_probing" - "--deselect=tests/test_file_probing.py::TestDataProbe::test_stream_probing" - "--deselect=tests/test_file_probing.py::TestSubtitleProbe::test_container_probing" - "--deselect=tests/test_file_probing.py::TestSubtitleProbe::test_stream_probing" - "--deselect=tests/test_file_probing.py::TestVideoProbe::test_container_probing" - "--deselect=tests/test_file_probing.py::TestVideoProbe::test_stream_probing" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_buffer" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_buffer_no_see" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_file" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_pipe_readonly" - "--deselect=tests/test_python_io.py::TestPythonIO::test_reading_from_write_readonl" - "--deselect=tests/test_seek.py::TestSeek::test_decode_half" - "--deselect=tests/test_seek.py::TestSeek::test_seek_end" - "--deselect=tests/test_seek.py::TestSeek::test_seek_float" - "--deselect=tests/test_seek.py::TestSeek::test_seek_int64" - "--deselect=tests/test_seek.py::TestSeek::test_seek_middle" - "--deselect=tests/test_seek.py::TestSeek::test_seek_start" - "--deselect=tests/test_seek.py::TestSeek::test_stream_seek" - "--deselect=tests/test_streams.py::TestStreams::test_selection" - "--deselect=tests/test_streams.py::TestStreams::test_stream_tuples" - "--deselect=tests/test_subtitles.py::TestSubtitle::test_movtext" - "--deselect=tests/test_subtitles.py::TestSubtitle::test_vobsub" - "--deselect=tests/test_videoframe.py::TestVideoFrameImage::test_roundtrip" - ] ++ lib.optionals (stdenv.isDarwin) [ - # Segmentation Faults - "--deselect=tests/test_encode.py::TestBasicVideoEncoding::test_encoding_with_pts" - "--deselect=tests/test_pyav.py::test_bayer_write" - ]; - disabledTests = [ # urlopen fails during DNS resolution "test_writing_to_custom_io" + "test_decode_close_then_use" + # Tests that want to download FATE data, https://github.com/PyAV-Org/PyAV/issues/955 + "test_vobsub" + "test_transcode" + "test_stream_tuples" + "test_stream_seek" + "test_stream_probing" + "test_seek_start" + "test_seek_middle" + "test_seek_int64" + "test_seek_float" + "test_seek_end" + "test_roundtrip" + "test_reading_from_write_readonl" + "test_reading_from_pipe_readonly" + "test_reading_from_file" + "test_reading_from_buffer" + "test_reading_from_buffer_no_see" + "test_parse" + "test_movtext" + "test_encoding_xvid" + "test_encoding_tiff" + "test_encoding_png" + "test_encoding_pcm_s24le" + "test_encoding_mpeg4" + "test_encoding_mpeg1video" + "test_encoding_mp2" + "test_encoding_mjpeg" + "test_encoding_h264" + "test_encoding_dvvideo" + "test_encoding_dnxhd" + "test_encoding_aac" + "test_decoded_video_frame_count" + "test_decoded_time_base" + "test_decoded_motion_vectors" + "test_decode_half" + "test_decode_audio_sample_count" + "test_data" + "test_container_probing" + "test_codec_tag" + "test_selection" + ] ++ lib.optionals (stdenv.isDarwin) [ + # Segmentation Faults + "test_encoding_with_pts" + "test_bayer_write" ]; disabledTestPaths = [ @@ -148,6 +132,7 @@ buildPythonPackage rec { meta = with lib; { description = "Pythonic bindings for FFmpeg/Libav"; homepage = "https://github.com/mikeboers/PyAV/"; + changelog = "https://github.com/PyAV-Org/PyAV/blob/v${version}/CHANGELOG.rst"; license = licenses.bsd2; maintainers = with maintainers; [ ]; }; From 5060ca27fee9aa2b448682926c8755054e68bd74 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 27 Nov 2023 08:50:42 +0100 Subject: [PATCH 2/2] python311Packages.av: 10.0.0 -> 11.0.0 Diff: https://github.com/mikeboers/PyAV/compare/refs/tags/v10.0.0...v11.0.0 Changelog: https://github.com/PyAV-Org/PyAV/blob/v11.0.0/CHANGELOG.rst --- pkgs/development/python-modules/av/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/av/default.nix b/pkgs/development/python-modules/av/default.nix index 71aa615c8e63..605fb0c66df3 100644 --- a/pkgs/development/python-modules/av/default.nix +++ b/pkgs/development/python-modules/av/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "av"; - version = "10.0.0"; + version = "11.0.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "mikeboers"; repo = "PyAV"; rev = "refs/tags/v${version}"; - hash = "sha256-XcHP8RwC2iwD64Jc7SS+t9OxjFTsz3FbrnjMgJnN7Ak="; + hash = "sha256-pCKP+4ZmZCJcG7/Qy9H6aS4svQdgaRA9S1QVNWFYhSQ="; }; nativeBuildInputs = [