2 %define pname gst-python
3 Summary: GStreamer Python 3 bindings
4 Summary(pl.UTF-8): Wiązania języka Python 3 do GStreamera
5 Name: python3-gstreamer
9 Group: Libraries/Python
10 Source0: https://gstreamer.freedesktop.org/src/gst-python/%{pname}-%{version}.tar.xz
11 # Source0-md5: 9d3c538fbc7ce459ce7a1c35692f8ed9
12 Patch0: %{name}-nosegv.patch
13 URL: https://gstreamer.freedesktop.org/modules/gst-python.html
14 BuildRequires: gstreamer-devel >= %{gst_ver}
15 BuildRequires: meson >= 0.59.0
16 BuildRequires: ninja >= 1.5
17 BuildRequires: pkgconfig >= 1:0.9.0
18 BuildRequires: python3-devel >= 1:3.3
19 BuildRequires: python3-pygobject3-devel >= 3.8
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.736
22 BuildRequires: tar >= 1:1.22
24 Requires: gstreamer >= %{gst_ver}
25 Requires: python3-pygobject3 >= 3.8
26 Obsoletes: python-gstreamer-devel < 1
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 GStreamer Python 3 bindings.
32 %description -l pl.UTF-8
33 Wiązania języka Python 3 do GStreamera.
35 %package -n gstreamer-python3
36 Summary: GStreamer plugin to load plugins written in Python 3
37 Summary(pl.UTF-8): Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 3
39 Requires: %{name} = %{version}-%{release}
40 # gstreamer 1.18+ doesn't support python2 anymore
41 Obsoletes: gstreamer-python < 1.18
43 %description -n gstreamer-python3
44 GStreamer plugin to load plugins written in Python 3.
46 %description -n gstreamer-python3 -l pl.UTF-8
47 Wtyczka GStreamera do wczytywania wtyczek napisanych w Pythonie 3.
50 %setup -q -n %{pname}-%{version}
55 --default-library=shared \
56 -Dpygi-overrides-dir=%{py3_sitedir}/gi/overrides
61 rm -rf $RPM_BUILD_ROOT
63 %ninja_install -C build
65 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
66 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
68 install -d $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/python
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
75 %doc AUTHORS ChangeLog NEWS RELEASE TODO
76 %attr(755,root,root) %{py3_sitedir}/gi/overrides/_gi_gst.cpython-*.so
77 %{py3_sitedir}/gi/overrides/Gst.py
78 %{py3_sitedir}/gi/overrides/GstAudio.py
79 %{py3_sitedir}/gi/overrides/GstPbutils.py
80 %{py3_sitedir}/gi/overrides/GstVideo.py
81 %{py3_sitedir}/gi/overrides/__pycache__/Gst.*.py[co]
82 %{py3_sitedir}/gi/overrides/__pycache__/GstAudio.*.py[co]
83 %{py3_sitedir}/gi/overrides/__pycache__/GstPbutils.*.py[co]
84 %{py3_sitedir}/gi/overrides/__pycache__/GstVideo.*.py[co]
86 %files -n gstreamer-python3
87 %defattr(644,root,root,755)
88 %attr(755,root,root) %{_libdir}/gstreamer-1.0/libgstpython.so
89 %dir %{_libdir}/gstreamer-1.0/python