From 230c772916890d23b5a6f9583839eb258b06bbacdf99db34e7f5b885ffb12315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 15 Aug 2020 09:15:23 +0000 Subject: [PATCH] Accepting request 826794 from home:jayvdb:py-submit - Add missing runtime dependency on numpy - Require ffmpeg 4.3 - Re-activate test suite, removing nose OBS-URL: https://build.opensuse.org/request/show/826794 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-av?expand=0&rev=14 --- python-av.changes | 7 +++++++ python-av.spec | 20 +++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/python-av.changes b/python-av.changes index cde6dfa..e14daaf 100644 --- a/python-av.changes +++ b/python-av.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Aug 15 08:35:33 UTC 2020 - John Vandenberg + +- Add missing runtime dependency on numpy +- Require ffmpeg 4.3 +- Re-activate test suite, removing nose + ------------------------------------------------------------------- Wed Jun 24 01:24:35 UTC 2020 - Steve Kowalik diff --git a/python-av.spec b/python-av.spec index b85aa2e..13af16b 100644 --- a/python-av.spec +++ b/python-av.spec @@ -27,15 +27,17 @@ URL: https://github.com/mikeboers/PyAV Source: https://files.pythonhosted.org/packages/source/a/av/av-%{version}.tar.gz BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel} -BuildRequires: %{python_module nose} BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes +BuildRequires: libavutil-devel >= 4.3 BuildRequires: pkgconfig BuildRequires: python-rpm-macros BuildRequires: pkgconfig(libavdevice) BuildRequires: pkgconfig(libavfilter) BuildRequires: pkgconfig(libavutil) +Requires: python-numpy Requires: python-setuptools Requires(post): update-alternatives Requires(postun): update-alternatives @@ -47,6 +49,12 @@ Pythonic bindings for FFmpeg's libraries. %prep %setup -q -n av-%{version} +# doctests and timeout require network to setup tests +rm tests/test_doctests.py tests/test_timeout.py + +# All tests using fate_suite require fetching data from http://fate.ffmpeg.org/fate-suite/ +sed -Ei 's/(from .common import .*), fate_suite(, .*)?/\1\2\ndef fate_suite(*a):\n import unittest; raise unittest.SkipTest\n/' tests/test_*.py + %build %python_build @@ -55,16 +63,18 @@ Pythonic bindings for FFmpeg's libraries. %python_clone -a %{buildroot}%{_bindir}/pyav %python_expand %fdupes %{buildroot}%{$python_sitearch} -%check -# Sadly needs full ffmpeg with all the codec support so we have to skip -#%%python_exec setup.py test - %post %python_install_alternative pyav %postun %python_uninstall_alternative pyav +%check +mv av .av +# Skipping 4 tests requiring mpeg4 codec +%pytest_arch tests -k 'not (test_codec_mpeg4 or test_encoding_with_pts or test_stream_index or test_video_default_options)' +mv .av av + %files %{python_files} %license LICENSE.txt %doc README.md