[python-gstreamer1] Add support for writing GStreamer plugins in Python, using upstream patch from bug report.

farnz farnz at fedoraproject.org
Sun Mar 8 21:32:01 UTC 2015


commit 601e7c9be377ab0d529acd5e93b31918d7542dcc
Author: Simon Farnsworth <simon at farnz.org.uk>
Date:   Sun Mar 8 21:31:47 2015 +0000

    Add support for writing GStreamer plugins in Python, using upstream patch from bug report.

 bug738157-name-plugin-by-python-version.patch | 27 +++++++++++++++++++++++++++
 python-gstreamer1.spec                        | 14 ++++++++++----
 2 files changed, 37 insertions(+), 4 deletions(-)
---
diff --git a/bug738157-name-plugin-by-python-version.patch b/bug738157-name-plugin-by-python-version.patch
new file mode 100644
index 0000000..c55e331
--- /dev/null
+++ b/bug738157-name-plugin-by-python-version.patch
@@ -0,0 +1,27 @@
+From 9041d4b4a64cd589560eac545f017ef4620d620d Mon Sep 17 00:00:00 2001
+From: Thibault Saunier <tsaunier at gnome.org>
+Date: Fri, 6 Mar 2015 19:25:57 +0100
+Subject: [PATCH] plugin:  Name differently between python2 and python3
+
+Those are 2 different binaries and thus should have different
+.so names. Just use the $PYTHON_SO for that to happen.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=738157
+---
+ plugin/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugin/Makefile.am b/plugin/Makefile.am
+index 042c2bc..1216c4f 100644
+--- a/plugin/Makefile.am
++++ b/plugin/Makefile.am
+@@ -8,6 +8,6 @@ INCLUDES = $(PYGOBJECT_CFLAGS) $(GST_CFLAGS)\
+ 	$(PYTHON_INCLUDES)
+ 
+ libgstpythonplugin_la_SOURCES = gstpythonplugin.c 
+-libgstpythonplugin_la_LDFLAGS = -avoid-version
++libgstpythonplugin_la_LDFLAGS = -avoid-version -shrext $(PYTHON_SO)
+ libgstpythonplugin_la_LIBADD =  $(PYTHON_LIBS) $(PYGOBJECT_LIBS) $(GST_LIBS)
+ libgstpythonplugin_la_CFLAGS = $(GST_CFLAGS) $(PYGOBJECT_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(PYTHON_INCLUDES)
+-- 
+2.1.0
\ No newline at end of file
diff --git a/python-gstreamer1.spec b/python-gstreamer1.spec
index eb4e092..8705518 100644
--- a/python-gstreamer1.spec
+++ b/python-gstreamer1.spec
@@ -7,13 +7,15 @@
 
 Name:           python-gstreamer1
 Version:        1.4.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Python bindings for GStreamer
 
 Group:          Development/Languages
 License:        LGPLv2+
 URL:            http://gstreamer.freedesktop.org/
 Source:         http://gstreamer.freedesktop.org/src/gst-python/gst-python-%{version}.tar.xz
+# Fix for https://bugzilla.gnome.org/show_bug.cgi?id=738157
+Patch1:         bug738157-name-plugin-by-python-version.patch
 
 Requires:       pygobject3%{?_isa}
 # Not tested against older GStreamer 1.0 versions - it needs 1.4 to build.
@@ -52,6 +54,7 @@ applications that use GStreamer 1.x in Python 3.
 
 %prep
 %setup -q -n gst-python-%{version}
+%patch1 -p1 -b .soname-per-python-ver
 
 %if 0%{?with_python3}
 rm -rf %{py3dir}
@@ -82,20 +85,23 @@ popd
 
 find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
 
-#Can't parallel install Py3 and Py2 versions https://bugzilla.gnome.org/show_bug.cgi?id=738157
-rm -f $RPM_BUILD_ROOT/usr/lib64/gstreamer-1.0/libgstpythonplugin.so $RPM_BUILD_ROOT/usr/lib/gstreamer-1.0/libgstpythonplugin.so
-
 %files
 %doc AUTHORS COPYING ChangeLog NEWS README
 %{python2_sitearch}/gi/overrides/*
+/usr/lib64/gstreamer-1.0/libgstpythonplugin.so
 
 %if 0%{?with_python3}
 %files -n python3-gstreamer1
 %doc AUTHORS COPYING ChangeLog NEWS README
 %{python3_sitearch}/gi/overrides/*
+/usr/lib64/gstreamer-1.0/libgstpythonplugin.*.so
+
 %endif # with_python3
 
 %changelog
+* Sun Mar  8 2015 Simon Farnsworth <simon.farnsworth at onelan.co.uk> - 1.4.0-2
+- Add support for writing GStreamer plugins in Python, using upstream patch from bug report.
+
 * Tue Nov 04 2014 Jon Ciesla <limburgher at gmail.com> - 1.4.0-1
 - 1.4.0, BZ 1155141.
 


More information about the scm-commits mailing list