GNU bug report logs - #41022
[PATCH core-updates] gnu: python-gst: Fix build with Python 3.8.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sat, 2 May 2020 11:04:01 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41022 in the body.
You can then email your comments to 41022 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#41022; Package guix-patches. (Sat, 02 May 2020 11:04:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 02 May 2020 11:04:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH core-updates] gnu: python-gst: Fix build with Python 3.8.
Date: Sat,  2 May 2020 12:03:14 +0100
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?= <sebastian <at> centricular.com>
+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
-- 
2.26.0





Information forwarded to guix-patches <at> gnu.org:
bug#41022; Package guix-patches. (Sat, 02 May 2020 11:27:02 GMT) Full text and rfc822 format available.

Message #8 received at 41022 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Christopher Baines <mail <at> cbaines.net>, 41022 <at> debbugs.gnu.org
Subject: Re: [bug#41022] [PATCH core-updates] gnu: python-gst: Fix build with
 Python 3.8.
Date: Sat, 02 May 2020 13:26:04 +0200
[Message part 1 (text/plain, inline)]
Christopher Baines <mail <at> cbaines.net> writes:

> 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.

[...]

> 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?= <sebastian <at> centricular.com>
> +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(-)

Instead of the git patch format, can you add a short comment at the top
along with links to the upstream commit and issue like we usually do?

Otherwise LGTM, thanks!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#41022; Package guix-patches. (Sat, 02 May 2020 13:18:01 GMT) Full text and rfc822 format available.

Message #11 received at 41022 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 41022 <at> debbugs.gnu.org
Subject: Re: [bug#41022] [PATCH core-updates] gnu: python-gst: Fix build with
 Python 3.8.
Date: Sat, 02 May 2020 14:17:28 +0100
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> Christopher Baines <mail <at> cbaines.net> writes:
>
>> 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.
>
> [...]
>
>> 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?= <sebastian <at> centricular.com>
>> +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(-)
>
> Instead of the git patch format, can you add a short comment at the top
> along with links to the upstream commit and issue like we usually do?

I usually avoid messing with patches, they're often uncooperative. Would
something I this do?


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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#41022; Package guix-patches. (Sat, 02 May 2020 13:42:02 GMT) Full text and rfc822 format available.

Message #14 received at 41022 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 41022 <at> debbugs.gnu.org
Subject: Re: [bug#41022] [PATCH core-updates] gnu: python-gst: Fix build with
 Python 3.8.
Date: Sat, 02 May 2020 15:41:10 +0200
[Message part 1 (text/plain, inline)]
Christopher Baines <mail <at> cbaines.net> writes:

> Marius Bakke <mbakke <at> fastmail.com> writes:
>
>> Christopher Baines <mail <at> cbaines.net> writes:
>>
>>> 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.
>>
>> [...]
>>
>>> 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?= <sebastian <at> centricular.com>
>>> +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(-)
>>
>> Instead of the git patch format, can you add a short comment at the top
>> along with links to the upstream commit and issue like we usually do?
>
> I usually avoid messing with patches, they're often uncooperative. Would
> something I this do?

Anything before the "diff ..." line is treated as comments/noop by the
patch utility (actually you can add comments between the @@ lines too).

> 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

Perfect, thanks!
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Sat, 02 May 2020 14:52:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Sat, 02 May 2020 14:52:02 GMT) Full text and rfc822 format available.

Message #19 received at 41022-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 41022-done <at> debbugs.gnu.org
Subject: Re: [bug#41022] [PATCH core-updates] gnu: python-gst: Fix build with
 Python 3.8.
Date: Sat, 02 May 2020 15:50:49 +0100
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> Christopher Baines <mail <at> cbaines.net> writes:
>
>> Marius Bakke <mbakke <at> fastmail.com> writes:
>>
>>> Instead of the git patch format, can you add a short comment at the top
>>> along with links to the upstream commit and issue like we usually do?
>>
>> I usually avoid messing with patches, they're often uncooperative. Would
>> something I this do?
>
> Anything before the "diff ..." line is treated as comments/noop by the
> patch utility (actually you can add comments between the @@ lines too).
>
>> 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
>
> Perfect, thanks!

Great, I've pushed this as 20d7dbc77a2b0ed379c0a595daf8d7f852ef3a4c.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 31 May 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.