guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch core-updates updated: gnu: python-gst: Fix build with Python 3.8.


From: guix-commits
Subject: branch core-updates updated: gnu: python-gst: Fix build with Python 3.8.
Date: Sat, 02 May 2020 10:48:40 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch core-updates
in repository guix.

The following commit(s) were added to refs/heads/core-updates by this push:
     new 20d7dbc  gnu: python-gst: Fix build with Python 3.8.
20d7dbc is described below

commit 20d7dbc77a2b0ed379c0a595daf8d7f852ef3a4c
Author: Christopher Baines <address@hidden>
AuthorDate: Sat May 2 12:00:11 2020 +0100

    gnu: python-gst: Fix build with Python 3.8.
    
    Add a patch based on an upstream commit [1].
    
    1: 10707f437f2fc3632067c6a0efa4432f7ebaf362
    
    * gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/gstreamer.scm (python-gst)[source]: Use the patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/gstreamer.scm                         |  4 ++-
 .../python-gst-fix-build-with-python-3.8.patch     | 36 ++++++++++++++++++++++
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 0111ae2..acfc5ce 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1394,6 +1394,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
   %D%/packages/patches/python-configobj-setuptools.patch       \
   %D%/packages/patches/python-flask-restful-werkzeug-compat.patch      \
+  %D%/packages/patches/python-gst-fix-build-with-python-3.8.patch      \
   %D%/packages/patches/python-keras-integration-test.patch     \
   %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
   %D%/packages/patches/python-pyfakefs-remove-bad-test.patch   \
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 93149e3..7596796 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -521,7 +521,9 @@ non-linear editors.")
                     "gst-python-" version ".tar.xz"))
               (sha256
                (base32
-                "1a48ca66izmm8hnp608jv5isg3jxb0vlfmhns0bg9nbkilag7390"))))
+                "1a48ca66izmm8hnp608jv5isg3jxb0vlfmhns0bg9nbkilag7390"))
+              (patches
+               (search-patches "python-gst-fix-build-with-python-3.8.patch"))))
     (build-system meson-build-system)
     (arguments
      `(#:modules ((guix build meson-build-system)
diff --git a/gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch 
b/gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch
new file mode 100644
index 0000000..affa0e1
--- /dev/null
+++ b/gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch
@@ -0,0 +1,36 @@
+Fix build with Python 3.8 by also checking for python-3.X-embed.pc. Since
+Python 3.8 the normal checks don't include the Python libraries anymore and
+linking of the gst-python module would fail.
+
+See also https://github.com/mesonbuild/meson/issues/5629
+Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28
+
+Patch based on upstream commit:
+
+https://gitlab.freedesktop.org/gstreamer/gst-python/-/commit/10707f437f2fc3632067c6a0efa4432f7ebaf362
+
+diff --git a/meson.build b/meson.build
+index 5f13b48..d7c7e66 100644
+--- a/meson.build
++++ b/meson.build
+@@ -23,7 +23,17 @@ pygobject_dep = dependency('pygobject-3.0', fallback: 
['pygobject', 'pygobject_d
+ 
+ pymod = import('python')
+ python = pymod.find_installation(get_option('python'))
+-python_dep = python.dependency(required : true)
++pythonver = python.language_version()
++if pythonver.version_compare('<3.0')
++   error('Python2 is not supported anymore, please port your code to python3 
(@0@ specified)'.format(python.language_version()))
++endif
++
++# Workaround for https://github.com/mesonbuild/meson/issues/5629
++# https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28
++python_dep = dependency('python-@0@-embed'.format(pythonver), version: '>=3', 
required: false)
++if not python_dep.found()
++  python_dep = python.dependency(required : true)
++endif
+ 
+ python_abi_flags = python.get_variable('ABIFLAGS', '')
+ pylib_loc = get_option('libpython-dir')
+-- 
+2.26.2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]