From patchwork Sat May 2 11:03:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 21832 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B43EA27BBE4; Sat, 2 May 2020 12:04:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) by mira.cbaines.net (Postfix) with ESMTP id 1001827BBE1 for ; Sat, 2 May 2020 12:04:19 +0100 (BST) Received: from localhost ([::1]:51108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUpwQ-0005WN-Kf for patchwork@mira.cbaines.net; Sat, 02 May 2020 07:04:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUpwF-0005V1-Ex for guix-patches@gnu.org; Sat, 02 May 2020 07:04:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUpwB-0003bX-U0 for guix-patches@gnu.org; Sat, 02 May 2020 07:04:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUpw9-0003b9-T3 for guix-patches@gnu.org; Sat, 02 May 2020 07:04:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jUpw9-0005O9-P5 for guix-patches@gnu.org; Sat, 02 May 2020 07:04:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41022] [PATCH core-updates] gnu: python-gst: Fix build with Python 3.8. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 May 2020 11:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41022 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41022@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158841740420662 (code B ref -1); Sat, 02 May 2020 11:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 May 2020 11:03:24 +0000 Received: from localhost ([127.0.0.1]:51369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUpvY-0005NB-3s for submit@debbugs.gnu.org; Sat, 02 May 2020 07:03:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:56184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUpvW-0005N4-Uq for submit@debbugs.gnu.org; Sat, 02 May 2020 07:03:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUpvW-0005NO-9V for guix-patches@gnu.org; Sat, 02 May 2020 07:03:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUpvS-0003HR-PL for guix-patches@gnu.org; Sat, 02 May 2020 07:03:22 -0400 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:46615) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUpvS-0003H5-9d for guix-patches@gnu.org; Sat, 02 May 2020 07:03:18 -0400 Received: from localhost (unknown [46.237.174.129]) by mira.cbaines.net (Postfix) with ESMTPSA id 7C16027BBE1 for ; Sat, 2 May 2020 12:03:16 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 9c2e7950 for ; Sat, 2 May 2020 11:03:14 +0000 (UTC) From: Christopher Baines Date: Sat, 2 May 2020 12:03:14 +0100 Message-Id: <20200502110314.30403-1-mail@cbaines.net> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/02 07:03:16 X-ACL-Warn: Detected OS = ??? X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 | 41 +++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch diff --git a/gnu/local.mk b/gnu/local.mk index 0111ae2161..acfc5cec4d 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 93149e370e..7596796d68 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 0000000000..49f41e0c03 --- /dev/null +++ b/gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch @@ -0,0 +1,41 @@ +From 10707f437f2fc3632067c6a0efa4432f7ebaf362 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Fri, 13 Dec 2019 10:46:20 +0200 +Subject: [PATCH] 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 +--- + meson.build | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +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