diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2025-07-04 01:11:49 +0200 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-04 10:52:50 +0100 |
| commit | e7d5d3fb50a7605978c28dc6233a5a94afa14569 (patch) | |
| tree | 60942ea0be23484211f00d72a2609ee1f6998f2f /gnu | |
| parent | d063e42cf953af4bc27fd26442855f7d42d019f3 (diff) | |
gnu: python-av: Download testdata to support tests.
* gnu/packages/python-xyz.scm (python-av-testdata): New variable.
(python-av)[arguments]{test-flags}: Adapt field.
{phases}: Add phase 'pre-check.
Change-Id: I0d84aafc05a5b1aec6b3905f99783fea2d45a676
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 136 |
1 files changed, 61 insertions, 75 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7dc93ec3233..4780af5112f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm | |||
| @@ -309,6 +309,7 @@ | |||
| 309 | #:use-module (guix git-download) | 309 | #:use-module (guix git-download) |
| 310 | #:use-module (guix gexp) | 310 | #:use-module (guix gexp) |
| 311 | #:use-module (guix utils) | 311 | #:use-module (guix utils) |
| 312 | #:use-module (ice-9 match) | ||
| 312 | #:use-module (srfi srfi-1) | 313 | #:use-module (srfi srfi-1) |
| 313 | #:use-module (srfi srfi-26)) | 314 | #:use-module (srfi srfi-26)) |
| 314 | 315 | ||
| @@ -12611,6 +12612,57 @@ converting, and viewing many of the proprietary file formats used to store | |||
| 12611 | experimental data and metadata at the Laboratory for Fluorescence Dynamics.") | 12612 | experimental data and metadata at the Laboratory for Fluorescence Dynamics.") |
| 12612 | (license license:bsd-3))) | 12613 | (license license:bsd-3))) |
| 12613 | 12614 | ||
| 12615 | ;; ~8Mo of test files. | ||
| 12616 | (define python-av-testdata | ||
| 12617 | (file-union | ||
| 12618 | "python-av-testdata" | ||
| 12619 | (cons* | ||
| 12620 | (let ((file "pexels/time-lapse-video-of-night-sky-857195.mp4")) | ||
| 12621 | `(,(string-append "pyav-curated/" file) | ||
| 12622 | ,(origin | ||
| 12623 | (method url-fetch) | ||
| 12624 | (uri (string-append "https://pyav.org/datasets/" file)) | ||
| 12625 | (sha256 | ||
| 12626 | (base32 "10fjs2gyha88gzv7pv3njv0fimv61ihz39p1556qazm90xbknzgb"))))) | ||
| 12627 | (map | ||
| 12628 | (match-lambda | ||
| 12629 | ((file . hash) | ||
| 12630 | (list (string-append "fate-suite/" file) | ||
| 12631 | (origin | ||
| 12632 | (method url-fetch) | ||
| 12633 | (uri (string-append "http://fate.ffmpeg.org/fate-suite/" file)) | ||
| 12634 | (sha256 (base32 hash)))))) | ||
| 12635 | '(("aac/latm_stereo_to_51.ts" . | ||
| 12636 | "05h8389i944gb7f2y9c7848vqn8xz1mnm602fwala85npj4z8p4m") | ||
| 12637 | ("amv/MTV_high_res_320x240_sample_Penguin_Joke_MTV_from_WMV.amv" . | ||
| 12638 | "1hiifhdmd0ygzny5mplqdxl3dh9g95384ilkr4ccwv5l9y7hrmiv") | ||
| 12639 | ("audio-reference/chorusnoise_2ch_44kHz_s16.wav" . | ||
| 12640 | "06xybcnv7max9mmj6f1fw8rwz2aawhcyx2wgj1gmn1142kk431ra") | ||
| 12641 | ("h264/interlaced_crop.mp4" . | ||
| 12642 | "04bcmwd6scqn63y6p8i5srbjh9jq1sc95q6vy7srwfhzwxl9cma9") | ||
| 12643 | ("hap/HAPQA_NoSnappy_127x1.mov" . | ||
| 12644 | "1kvf8xs5v29sjqk2p07arl2hlp9z7hb1lb4202v4iqiwva1jmiaq") | ||
| 12645 | ("mkv/codec_delay_opus.mkv" . | ||
| 12646 | "0ll3qnmxnkhqxbh6s2a3clbkbhw5bsbfw6mh6kxdsa463iyyka8r") | ||
| 12647 | ("mov/displaymatrix.mov" . | ||
| 12648 | "1d4jp93hdyfhasxhqmx8lliwsa2w1kv2jj1qh6fqs74aqb6kzb82") | ||
| 12649 | ("mov/mov-1elist-ends-last-bframe.mov" . | ||
| 12650 | "04lyjsm8zncw9aac7vmkc2h45dcyb6y8643s3pg3rgzgcgqkq3nn") | ||
| 12651 | ("mov/white_zombie_scrunch-part.mov" . | ||
| 12652 | "07wg7mxa799z8dcvnbbrr9f0b5l6r42bd7d414isk3kc3jw0z6ka") | ||
| 12653 | ("mpeg2/mpeg2_field_encoding.ts" . | ||
| 12654 | "1f3waj8jhp6v655hnqpxi2bx3b36976vdjmr74hjr7jv2hx3724n") | ||
| 12655 | ("mxf/track_01_v02.mxf" . | ||
| 12656 | "04gpbma4kxvhn4dr1sh2k4pq2kbpmnmk2s2bdhq081jzap2983q1") | ||
| 12657 | ("png1/55c99e750a5fd6_50314226.png" . | ||
| 12658 | "05rha9vdix0wfibrhpaknh9fzj0cv84q6d2ypxq1wc0y328fc068") | ||
| 12659 | ("qtrle/aletrek-rle.mov" . | ||
| 12660 | "1n6ksjrqrb7gnbvzhj58y5z5jx6bmpgg7lxwzvnbfg9f9ib2yxdr") | ||
| 12661 | ("sub/MovText_capability_tester.mp4" . | ||
| 12662 | "07znmm4bhnp5f40yksnpf7ws94yflsbv169ydkga6rdby6ys2sv3") | ||
| 12663 | ("sub/vobsub.sub" . | ||
| 12664 | "12rwhnv1k7mngvyq026f2xd9dpd9mxmwg82sa9p5r8z54hrw8sjz")))))) | ||
| 12665 | |||
| 12614 | (define-public python-av | 12666 | (define-public python-av |
| 12615 | (package | 12667 | (package |
| 12616 | (name "python-av") | 12668 | (name "python-av") |
| @@ -12626,87 +12678,21 @@ experimental data and metadata at the Laboratory for Fluorescence Dynamics.") | |||
| 12626 | (list | 12678 | (list |
| 12627 | #:test-flags | 12679 | #:test-flags |
| 12628 | #~(list | 12680 | #~(list |
| 12629 | ;; Tests require outbound access to download data samples from | ||
| 12630 | ;; http://fate.ffmpeg.org/fate-suite: | ||
| 12631 | ;; | ||
| 12632 | ;; E urllib.error.URLError: <urlopen error [Errno -3] | ||
| 12633 | ;; Temporary failure in name resolution> | ||
| 12634 | ;; | ||
| 12635 | "--ignore=tests/test_doctests.py" | ||
| 12636 | "--ignore=tests/test_timeout.py" | ||
| 12637 | ;; See: <https://github.com/PyAV-Org/PyAV/issues/1942>. | ||
| 12638 | "-k" (string-join | 12681 | "-k" (string-join |
| 12639 | (list "not test_bits_per_coded_sample" | 12682 | (list "not test_pts_assertion_same_rate" |
| 12640 | "test_codec_delay" | 12683 | "test_writing_to_custom_io_dash") |
| 12641 | "test_codec_tag" | ||
| 12642 | "test_container_probing" | ||
| 12643 | "test_data" | ||
| 12644 | "test_decode_audio_sample_count" | ||
| 12645 | "test_decode_close_then_use" | ||
| 12646 | "test_decode_half" | ||
| 12647 | "test_decoded_motion_vectors" | ||
| 12648 | "test_decoded_motion_vectors_no_flag" | ||
| 12649 | "test_decoded_time_base" | ||
| 12650 | "test_decoded_video_frame_count" | ||
| 12651 | "test_encoding_aac" | ||
| 12652 | "test_encoding_dnxhd" | ||
| 12653 | "test_encoding_dvvideo" | ||
| 12654 | "test_encoding_h264" | ||
| 12655 | "test_encoding_mjpeg" | ||
| 12656 | "test_encoding_mp2" | ||
| 12657 | "test_encoding_mpeg1video" | ||
| 12658 | "test_encoding_mpeg4" | ||
| 12659 | "test_encoding_pcm_s24le" | ||
| 12660 | "test_encoding_png" | ||
| 12661 | "test_encoding_tiff" | ||
| 12662 | "test_encoding_xvid" | ||
| 12663 | "test_filter_flush" | ||
| 12664 | "test_filter_h264_mp4toannexb" | ||
| 12665 | "test_filter_output_parameters" | ||
| 12666 | "test_flush_decoded_video_frame_count" | ||
| 12667 | "test_is_corrupt" | ||
| 12668 | "test_is_discard" | ||
| 12669 | "test_is_disposable" | ||
| 12670 | "test_is_keyframe" | ||
| 12671 | "test_movtext" | ||
| 12672 | "test_noside_data" | ||
| 12673 | "test_opaque" | ||
| 12674 | "test_parse" | ||
| 12675 | "test_path_input" | ||
| 12676 | "test_path_output" | ||
| 12677 | "test_penguin_joke" | ||
| 12678 | "test_pts_assertion_same_rate" | ||
| 12679 | "test_reading_from_buffer" | ||
| 12680 | "test_reading_from_buffer_no_seek" | ||
| 12681 | "test_reading_from_file" | ||
| 12682 | "test_reading_from_pipe_readonly" | ||
| 12683 | "test_reading_from_write_readonly" | ||
| 12684 | "test_roundtrip" | ||
| 12685 | "test_seek_end" | ||
| 12686 | "test_seek_float" | ||
| 12687 | "test_seek_int64" | ||
| 12688 | "test_seek_middle" | ||
| 12689 | "test_seek_start" | ||
| 12690 | "test_selection" | ||
| 12691 | "test_set_duration" | ||
| 12692 | "test_side_data" | ||
| 12693 | "test_sky_timelapse" | ||
| 12694 | "test_str_input" | ||
| 12695 | "test_str_output" | ||
| 12696 | "test_stream_probing" | ||
| 12697 | "test_stream_seek" | ||
| 12698 | "test_stream_tuples" | ||
| 12699 | "test_subtitle_flush" | ||
| 12700 | "test_transcode" | ||
| 12701 | "test_vobsub" | ||
| 12702 | "test_writing_to_custom_io_dash" | ||
| 12703 | "test_writing_to_custom_io_image2") | ||
| 12704 | " and not ")) | 12684 | " and not ")) |
| 12705 | #:phases | 12685 | #:phases |
| 12706 | #~(modify-phases %standard-phases | 12686 | #~(modify-phases %standard-phases |
| 12707 | (add-before 'check 'build-extensions | 12687 | (add-before 'check 'build-extensions |
| 12708 | (lambda _ | 12688 | (lambda _ |
| 12709 | (invoke "python" "setup.py" "build_ext" "--inplace")))))) | 12689 | (invoke "python" "setup.py" "build_ext" "--inplace"))) |
| 12690 | (add-before 'check 'pre-check | ||
| 12691 | (lambda _ | ||
| 12692 | (setenv "PYAV_TESTDATA_DIR" #+python-av-testdata) | ||
| 12693 | (substitute* "tests/common.py" | ||
| 12694 | (("^os\\.environ\\[\"PYAV_TESTDATA_DIR\"\\] = asset\\(\\)") | ||
| 12695 | "os.environ.setdefault(\"PYAV_TESTDATA_DIR\", asset())"))))))) | ||
| 12710 | (native-inputs | 12696 | (native-inputs |
| 12711 | (list pkg-config | 12697 | (list pkg-config |
| 12712 | python-cython | 12698 | python-cython |
