GNU bug report logs - #36641
[PATCH] gnu: python-gst: Fix build failure.

Previous Next

Package: guix-patches;

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

Date: Sat, 13 Jul 2019 22:02:02 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 36641 in the body.
You can then email your comments to 36641 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#36641; Package guix-patches. (Sat, 13 Jul 2019 22:02:02 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, 13 Jul 2019 22:02:04 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] gnu: python-gst: Fix build failure.
Date: Sat, 13 Jul 2019 23:00:59 +0100
Building python-gst fails with:

  Unbound variable: python-version

Therefore, add python-build-system to #:modules so that it's imported, and
give it a prefix to avoid clashing with the gnu-build-system.

Also, simplify the code by using the site-packages function from the
python-build-system module.

* gnu/packages/gstreamer.scm (python-gst)[arguments]: Rework to fix build
failure.
---
 gnu/packages/gstreamer.scm | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index b0f0b032b3..efb9a6f796 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -431,17 +431,14 @@ compression formats through the use of the libav library.")
                 "0f1d9rvy2qxlymmfzyknnfr5rz1vx69jv17gp7wnamc5s6p7mp2m"))))
     (build-system gnu-build-system)
     (arguments
-     ;; XXX: Factorize python-sitedir with python-build-system.
-     `(#:imported-modules (,@%gnu-build-system-modules
+     `(#:modules ((guix build gnu-build-system)
+                  ((guix build python-build-system) #:prefix python:))
+       #:imported-modules (,@%gnu-build-system-modules
                            (guix build python-build-system))
        #:configure-flags
-       (let* ((python (assoc-ref %build-inputs "python"))
-              (python-version (python-version python))
-              (python-sitedir (string-append
-                               "lib/python" python-version "/site-packages")))
-         (list (string-append
-                "--with-pygi-overrides-dir=" %output "/" python-sitedir
-                "/gi/overrides")))))
+       (list (string-append
+              "--with-pygi-overrides-dir=" %output "/"
+              (python:site-packages %build-inputs %outputs) "/gi/overrides"))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("python" ,python)))
-- 
2.22.0





Information forwarded to guix-patches <at> gnu.org:
bug#36641; Package guix-patches. (Sat, 13 Jul 2019 22:18:02 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: guix-devel <at> gnu.org
Cc: 36641 <at> debbugs.gnu.org, 36643 <at> debbugs.gnu.org
Subject: Re: core-updates frozen!
Date: Sat, 13 Jul 2019 23:17:00 +0100
[Message part 1 (text/plain, inline)]
I've sent a few patches to fix a couple of build issues on the
core-updates branch [1][2].

1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36641
2: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36643
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36641; Package guix-patches. (Sat, 13 Jul 2019 22:53:01 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Christopher Baines <mail <at> cbaines.net>, 36641 <at> debbugs.gnu.org
Subject: Re: [bug#36641] [PATCH] gnu: python-gst: Fix build failure.
Date: Sun, 14 Jul 2019 00:52:11 +0200
[Message part 1 (text/plain, inline)]
Christopher Baines <mail <at> cbaines.net> writes:

> Building python-gst fails with:
>
>   Unbound variable: python-version
>
> Therefore, add python-build-system to #:modules so that it's imported, and
> give it a prefix to avoid clashing with the gnu-build-system.
>
> Also, simplify the code by using the site-packages function from the
> python-build-system module.
>
> * gnu/packages/gstreamer.scm (python-gst)[arguments]: Rework to fix build
> failure.
> ---
>  gnu/packages/gstreamer.scm | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
> index b0f0b032b3..efb9a6f796 100644
> --- a/gnu/packages/gstreamer.scm
> +++ b/gnu/packages/gstreamer.scm
> @@ -431,17 +431,14 @@ compression formats through the use of the libav library.")
>                  "0f1d9rvy2qxlymmfzyknnfr5rz1vx69jv17gp7wnamc5s6p7mp2m"))))
>      (build-system gnu-build-system)
>      (arguments
> -     ;; XXX: Factorize python-sitedir with python-build-system.
> -     `(#:imported-modules (,@%gnu-build-system-modules
> +     `(#:modules ((guix build gnu-build-system)
> +                  ((guix build python-build-system) #:prefix python:))
> +       #:imported-modules (,@%gnu-build-system-modules
>                             (guix build python-build-system))
>         #:configure-flags
> -       (let* ((python (assoc-ref %build-inputs "python"))
> -              (python-version (python-version python))
> -              (python-sitedir (string-append
> -                               "lib/python" python-version "/site-packages")))
> -         (list (string-append
> -                "--with-pygi-overrides-dir=" %output "/" python-sitedir
> -                "/gi/overrides")))))
> +       (list (string-append
> +              "--with-pygi-overrides-dir=" %output "/"

Nitpicking, but since we're refactoring, could you also change %output
to the less magical (assoc-ref %outputs "out")?


> +              (python:site-packages %build-inputs %outputs) "/gi/overrides"))))

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

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Sun, 14 Jul 2019 08:12:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Sun, 14 Jul 2019 08:12:02 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 36641-done <at> debbugs.gnu.org
Subject: Re: [bug#36641] [PATCH] gnu: python-gst: Fix build failure.
Date: Sun, 14 Jul 2019 09:11:36 +0100
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> Christopher Baines <mail <at> cbaines.net> writes:
>
>> Building python-gst fails with:
>>
>>   Unbound variable: python-version
>>
>> Therefore, add python-build-system to #:modules so that it's imported, and
>> give it a prefix to avoid clashing with the gnu-build-system.
>>
>> Also, simplify the code by using the site-packages function from the
>> python-build-system module.
>>
>> * gnu/packages/gstreamer.scm (python-gst)[arguments]: Rework to fix build
>> failure.
>> ---
>>  gnu/packages/gstreamer.scm | 15 ++++++---------
>>  1 file changed, 6 insertions(+), 9 deletions(-)
>>
>> diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
>> index b0f0b032b3..efb9a6f796 100644
>> --- a/gnu/packages/gstreamer.scm
>> +++ b/gnu/packages/gstreamer.scm
>> @@ -431,17 +431,14 @@ compression formats through the use of the libav library.")
>>                  "0f1d9rvy2qxlymmfzyknnfr5rz1vx69jv17gp7wnamc5s6p7mp2m"))))
>>      (build-system gnu-build-system)
>>      (arguments
>> -     ;; XXX: Factorize python-sitedir with python-build-system.
>> -     `(#:imported-modules (,@%gnu-build-system-modules
>> +     `(#:modules ((guix build gnu-build-system)
>> +                  ((guix build python-build-system) #:prefix python:))
>> +       #:imported-modules (,@%gnu-build-system-modules
>>                             (guix build python-build-system))
>>         #:configure-flags
>> -       (let* ((python (assoc-ref %build-inputs "python"))
>> -              (python-version (python-version python))
>> -              (python-sitedir (string-append
>> -                               "lib/python" python-version "/site-packages")))
>> -         (list (string-append
>> -                "--with-pygi-overrides-dir=" %output "/" python-sitedir
>> -                "/gi/overrides")))))
>> +       (list (string-append
>> +              "--with-pygi-overrides-dir=" %output "/"
>
> Nitpicking, but since we're refactoring, could you also change %output
> to the less magical (assoc-ref %outputs "out")?

Actually, turns out that most of the stuff there was
redundant. python:site-packages did more than I was expecting, so I've
removed the use of %output entirely.

>> +              (python:site-packages %build-inputs %outputs) "/gi/overrides"))))
>
> Neat!  LGTM.

Great, I've pushed this now.
[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, 11 Aug 2019 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 259 days ago.

Previous Next


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