forked from pool/python-av
* Add support for FFmpeg 6.0, drop support for FFmpeg < 5.0.
* Add support for Python 3.12, drop support for Python < 3.8.
* Add support for the ENCODER_FLUSH encoder flag
* Add VideoFrame ndarray operations for yuv444p/yuvj444p formats
* Add setters for AVFrame.dts, AVPacket.is_keyframe and
AVPacket.is_corrupt (:issue:`1179`).
* Fix build using Cython 3 (:issue:`1140`).
* Populate new streams with codec parameters (:issue:`1044`).
* Explicitly set python_requires to avoid installing on
incompatible Python (:issue:`1057`).
* Make AudioFifo.__repr__ safe before the first frame
* Guard input container members against use after closes
- restrict to older Cython bindings version
* Fix setting CodecContext.extradata (:issue:`801`).
- Avoid infinite timeout in :func:`av.open` (:issue:`589`).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-av?expand=0&rev=29
96 lines
2.9 KiB
RPMSpec
96 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package python-av
|
|
#
|
|
# Copyright (c) 2023 SUSE LLC
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-av
|
|
Version: 11.0.0
|
|
Release: 0
|
|
Summary: Python bindings for FFmpeg's libraries
|
|
License: BSD-3-Clause
|
|
URL: https://github.com/PyAV-Org/PyAV
|
|
Source: https://files.pythonhosted.org/packages/source/a/av/av-%{version}.tar.gz
|
|
BuildRequires: %{python_module Cython}
|
|
BuildRequires: %{python_module devel >= 3.8}
|
|
BuildRequires: %{python_module numpy}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: (libavutil-devel >= 4.3 with libavutil-devel < 5)
|
|
BuildRequires: pkgconfig(libavdevice)
|
|
BuildRequires: pkgconfig(libavfilter)
|
|
BuildRequires: pkgconfig(libavutil)
|
|
Requires: python-numpy
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
%python_subpackages
|
|
|
|
%description
|
|
Pythonic bindings for FFmpeg's libraries.
|
|
|
|
%prep
|
|
%autosetup -p1 -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
|
|
|
|
%install
|
|
%python_install
|
|
%python_clone -a %{buildroot}%{_bindir}/pyav
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
%post
|
|
%python_install_alternative pyav
|
|
|
|
%postun
|
|
%python_uninstall_alternative pyav
|
|
|
|
%check
|
|
mv av .av
|
|
# Skipping tests requiring mpeg4 codec
|
|
export disabled_tests="test_video_default_options or \
|
|
test_decode_video_corrupt or \
|
|
test_encoding_with_pts or \
|
|
test_decoder_extradata or \
|
|
test_decoder_timebase or \
|
|
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)"
|
|
mv .av av
|
|
|
|
%files %{python_files}
|
|
%license LICENSE.txt
|
|
%doc README.md
|
|
%python_alternative %{_bindir}/pyav
|
|
%{python_sitearch}/av
|
|
%{python_sitearch}/av-%{version}-py%{python_version}.egg-info
|
|
|
|
%changelog
|