* [bug#36641] [PATCH] gnu: python-gst: Fix build failure.
@ 2019-07-13 22:00 Christopher Baines
2019-07-13 22:52 ` Marius Bakke
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Baines @ 2019-07-13 22:00 UTC (permalink / raw)
To: 36641
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#36641] [PATCH] gnu: python-gst: Fix build failure.
2019-07-13 22:00 [bug#36641] [PATCH] gnu: python-gst: Fix build failure Christopher Baines
@ 2019-07-13 22:52 ` Marius Bakke
2019-07-14 8:11 ` bug#36641: " Christopher Baines
0 siblings, 1 reply; 3+ messages in thread
From: Marius Bakke @ 2019-07-13 22:52 UTC (permalink / raw)
To: Christopher Baines, 36641
[-- Attachment #1: Type: text/plain, Size: 2068 bytes --]
Christopher Baines <mail@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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#36641: [PATCH] gnu: python-gst: Fix build failure.
2019-07-13 22:52 ` Marius Bakke
@ 2019-07-14 8:11 ` Christopher Baines
0 siblings, 0 replies; 3+ messages in thread
From: Christopher Baines @ 2019-07-14 8:11 UTC (permalink / raw)
To: Marius Bakke; +Cc: 36641-done
[-- Attachment #1: Type: text/plain, Size: 2356 bytes --]
Marius Bakke <mbakke@fastmail.com> writes:
> Christopher Baines <mail@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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-14 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-13 22:00 [bug#36641] [PATCH] gnu: python-gst: Fix build failure Christopher Baines
2019-07-13 22:52 ` Marius Bakke
2019-07-14 8:11 ` bug#36641: " Christopher Baines
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).