2019-04-16 10:04:47 +00:00
|
|
|
#
|
2019-04-16 10:23:58 +00:00
|
|
|
# spec file for package python-av
|
2019-04-16 10:04:47 +00:00
|
|
|
#
|
2023-03-29 07:30:29 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-04-16 10:04:47 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2019-04-16 10:23:58 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2019-04-16 10:04:47 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2020-06-24 01:30:22 +00:00
|
|
|
%define skip_python2 1
|
2019-04-16 10:04:47 +00:00
|
|
|
Name: python-av
|
2022-11-30 16:25:09 +00:00
|
|
|
Version: 10.0.0
|
2019-04-16 10:04:47 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Python bindings for FFmpeg's libraries
|
|
|
|
|
License: BSD-3-Clause
|
2021-02-23 19:00:13 +00:00
|
|
|
URL: https://github.com/PyAV-Org/PyAV
|
2019-04-16 10:23:58 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/a/av/av-%{version}.tar.gz
|
2023-08-13 19:37:15 +00:00
|
|
|
BuildRequires: %{python_module Cython with %python-Cython < 3}
|
2019-04-16 10:04:47 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2020-05-28 07:32:29 +00:00
|
|
|
BuildRequires: %{python_module numpy}
|
2020-08-15 09:15:23 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-04-16 10:04:47 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: fdupes
|
2023-03-29 07:30:29 +00:00
|
|
|
BuildRequires: libavutil-devel < 5
|
2020-08-15 09:15:23 +00:00
|
|
|
BuildRequires: libavutil-devel >= 4.3
|
2019-04-16 10:23:58 +00:00
|
|
|
BuildRequires: pkgconfig
|
2019-04-16 10:04:47 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-04-16 10:23:58 +00:00
|
|
|
BuildRequires: pkgconfig(libavdevice)
|
|
|
|
|
BuildRequires: pkgconfig(libavfilter)
|
|
|
|
|
BuildRequires: pkgconfig(libavutil)
|
2020-08-15 09:15:23 +00:00
|
|
|
Requires: python-numpy
|
2020-05-28 07:32:29 +00:00
|
|
|
Requires(post): update-alternatives
|
2022-01-11 03:18:02 +00:00
|
|
|
Requires(postun):update-alternatives
|
2019-04-16 10:04:47 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Pythonic bindings for FFmpeg's libraries.
|
|
|
|
|
|
|
|
|
|
%prep
|
2022-08-15 07:14:29 +00:00
|
|
|
%autosetup -p1 -n av-%{version}
|
2019-04-16 10:04:47 +00:00
|
|
|
|
2020-08-15 09:15:23 +00:00
|
|
|
# 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
|
|
|
|
|
|
2019-04-16 10:04:47 +00:00
|
|
|
%build
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
2020-05-28 07:32:29 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyav
|
2019-04-16 10:23:58 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
|
|
2020-05-28 07:32:29 +00:00
|
|
|
%post
|
|
|
|
|
%python_install_alternative pyav
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative pyav
|
|
|
|
|
|
2020-08-15 09:15:23 +00:00
|
|
|
%check
|
|
|
|
|
mv av .av
|
2022-01-11 03:18:02 +00:00
|
|
|
# Skipping tests requiring mpeg4 codec
|
2022-05-03 17:57:44 +00:00
|
|
|
export disabled_tests="test_video_default_options or \
|
|
|
|
|
test_decode_video_corrupt or \
|
|
|
|
|
test_encoding_with_pts or \
|
|
|
|
|
test_decoder_extradata or \
|
2023-03-29 07:30:29 +00:00
|
|
|
test_decoder_timebase or \
|
2022-05-03 17:57:44 +00:00
|
|
|
test_encoder_extradata or \
|
|
|
|
|
test_encoder_pix_fmt or \
|
|
|
|
|
test_default_options or \
|
|
|
|
|
test_stream_probing or \
|
|
|
|
|
test_stream_index or \
|
|
|
|
|
test_codec_mpeg4 or \
|
|
|
|
|
test_codec_tag"
|
|
|
|
|
%pytest_arch tests -k "not ($disabled_tests)"
|
2020-08-15 09:15:23 +00:00
|
|
|
mv .av av
|
|
|
|
|
|
2019-04-16 10:04:47 +00:00
|
|
|
%files %{python_files}
|
|
|
|
|
%license LICENSE.txt
|
2019-04-16 10:23:58 +00:00
|
|
|
%doc README.md
|
2020-05-28 07:32:29 +00:00
|
|
|
%python_alternative %{_bindir}/pyav
|
2019-04-16 10:04:47 +00:00
|
|
|
%{python_sitearch}/av
|
2020-03-14 08:45:20 +00:00
|
|
|
%{python_sitearch}/av-%{version}-py%{python_version}.egg-info
|
2019-04-16 10:04:47 +00:00
|
|
|
|
|
|
|
|
%changelog
|