[PATCH] gnu: python-gst: Fix build failure.

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • Marius Bakke
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal
C
C
Christopher Baines wrote on 14 Jul 2019 00:00
(address . guix-patches@gnu.org)
20190713220059.7336-1-mail@cbaines.net
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(-)

Toggle diff (30 lines)
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
C
C
Christopher Baines wrote on 14 Jul 2019 00:17
Re: core-updates frozen!
(address . guix-devel@gnu.org)
87pnmdzijn.fsf@cbaines.net
I've sent a few patches to fix a couple of build issues on the
core-updates branch [1][2].

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl0qWFxfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XcgNQ/7BDiCSo+ztV1HqWrjoXJFfNBHn3SDrI+JZHZQoq8A5UdgW/p5NO8B5Xec
RyGUj6z1I/auyWSrp3W5mWhaQ9xwvsF6wa8bhh/RP9RyCun/h7U2jgghYHHXXLKZ
SAs9CF47eDbYYLJBqvp59HNaLjv5uYIUn0RSkfDV9+KRMwEfedENdgEpnZtg8mtD
viYHQoE7j26nDHIdIpnAUI93iu/CTK/s2gO2Vk2AGlBJoqzX5/G4BeWbtdv9QgtO
zmJYZYM/84HpHEs2WOttbSnbG9Qvj1vb4eQY0S3TdXJ6c3FDpPGYvlWH74eoFBUX
ZjyKS5XbUfFDKXXtA/gTrbECd+bER6UCpbRrOXdZlZlNuwUFMXG5FGO2iFDTALjq
WQGdlrNFwcKu3HFyIibDobXby+fsxtrPsLzyIDN9UsAUthFkzB4g9o6AUwrgNJPJ
Y+aiFRnbKdeaauyaz4cMtd7Uhiy8muH+aZURCP8xSNjGQWImcglSfgoigWSJDoa2
kCNjnr44Zd+h+kfHALrOU5S9CfEWIHrxob9JlWVQAT8JHM+Dg1FEEhDPBDE1YZgx
WFNhaTQPe4OJ0kLaYX3RB/sJ2InjvSAu6TZQZjK0ipRNxC3Z1gNyHF5m4qiLbhhV
v54DrBpVsrchIRTPUl8xIeBqZLQ/0EJ1CJEYB/22NaiLPACb0KE=
=AIC+
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 14 Jul 2019 00:52
Re: [bug#36641] [PATCH] gnu: python-gst: Fix build failure.
87muhhlf8k.fsf@devup.no
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (41 lines)
> 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")?


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

Neat! LGTM.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl0qYJsACgkQoqBt8qM6
VPrqQwf/Z64VaysnLZ67cVwId0q0q5OrBC/K+7HUvo+RRiJ8+qIbsk02hm/7WAQP
M3/7Qz8A2IhFeAPtJr5IVzk5QuE9aAXvwyvT9x4u7Su4tYUJQpQYtjFnNinFMqag
zIXL4PtXkvkVwrPsnGVNWWFwti+b8x3xXRITFP8CeSDbgoZDfLpigxffP2ukxO/R
kHLxyJNSfgvVBUcCZN6XmRrQxfIguSK58wBki6spMmGbZsu9IB+P3VsuPs7d7HeG
hJ0IWtsDUqNwjkNq98BWoxqpP+rIPdlyZhovDYcueIzouAo10yHipPqymQdCtEss
Z7vp8AMCkVOd5r8bkSPMq6FLLCcMYA==
=izMN
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 14 Jul 2019 10:11
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 36641-done@debbugs.gnu.org)
87tvbp3uiv.fsf@cbaines.net
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (46 lines)
> 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.

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

Great, I've pushed this now.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl0q47hfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfVjg/+KNDFFdZurDTj1Vr7Kt568V/YZ0lIgVQIHIwjlSTYbRDi1iIyP4rfd4zo
JLkIktwihoLkPvAFlGNqck+F7G+KnXKfw4zomsQnqFif9QM+PkdJak3rjBMOxcRu
KPhGHZmWPmzytok9dccxrS4ilPE4bPlNfnWXTP4mBQpGFv2hwfvo8sYSHnCI2H2a
K7+L26GzzFB5a5Mj6jj+0cJzukh9JC3GEGfC7aIVnSc5RaF2D6J4w6BVBvVYv1Za
cS1DXSzlInODFN0bvZD+82y/G++s35SWsEnI31jncQGyriZ1A+ih8qPwXoyWUBJl
R0aeMCNJilVTzMry6jCNmjibLXQHBd5452tggsAwa2nB+Lqu9q10ZrhTUBzuP6qR
V/7cY67ftcy9v+XfakzQq4mfBWGRLsurztgHD9Fox4tlnk6xlUrHZZfKJmyTc/7K
2OBaPDM189rEonEBc301ULyKznKmeUfzHz3D6W6lbPb2UD4tGcVSbm8VmrYLk/yf
nD+Otu9jZm0tHj2eY6Dmf/byNyqOOGGDYOGI4AoDV7m/PDkKTokaez+1StIzeLZU
ooqJrJeG4kTBcnpC5Y0ju0qfCrvLpfEOKgNuPOolmN+PK4Ie7YAg9FgumdsFI1U+
0NMImrKubw6fPcDH4XHuUBhFWIgPwN7XmO/EhpWqi12yrtl7yn4=
=3GLL
-----END PGP SIGNATURE-----

Closed
?