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

DoneSubmitted by Christopher Baines.
Details
2 participants
  • Christopher Baines
  • Marius Bakke
Owner
unassigned
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, andgive it a prefix to avoid clashing with the gnu-build-system.
Also, simplify the code by using the site-packages function from thepython-build-system module.
* gnu/packages/gstreamer.scm (python-gst)[arguments]: Rework to fix buildfailure.--- 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.scmindex 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 thecore-updates branch [1][2].
1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=366412: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36643
-----BEGIN PGP SIGNATURE-----
iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl0qWFxfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNFODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE9XcgNQ/7BDiCSo+ztV1HqWrjoXJFfNBHn3SDrI+JZHZQoq8A5UdgW/p5NO8B5XecRyGUj6z1I/auyWSrp3W5mWhaQ9xwvsF6wa8bhh/RP9RyCun/h7U2jgghYHHXXLKZSAs9CF47eDbYYLJBqvp59HNaLjv5uYIUn0RSkfDV9+KRMwEfedENdgEpnZtg8mtDviYHQoE7j26nDHIdIpnAUI93iu/CTK/s2gO2Vk2AGlBJoqzX5/G4BeWbtdv9QgtOzmJYZYM/84HpHEs2WOttbSnbG9Qvj1vb4eQY0S3TdXJ6c3FDpPGYvlWH74eoFBUXZjyKS5XbUfFDKXXtA/gTrbECd+bER6UCpbRrOXdZlZlNuwUFMXG5FGO2iFDTALjqWQGdlrNFwcKu3HFyIibDobXby+fsxtrPsLzyIDN9UsAUthFkzB4g9o6AUwrgNJPJY+aiFRnbKdeaauyaz4cMtd7Uhiy8muH+aZURCP8xSNjGQWImcglSfgoigWSJDoa2kCNjnr44Zd+h+kfHALrOU5S9CfEWIHrxob9JlWVQAT8JHM+Dg1FEEhDPBDE1YZgxWFNhaTQPe4OJ0kLaYX3RB/sJ2InjvSAu6TZQZjK0ipRNxC3Z1gNyHF5m4qiLbhhVv54DrBpVsrchIRTPUl8xIeBqZLQ/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 %outputto the less magical (assoc-ref %outputs "out")?

Toggle quote (2 lines)> + (python:site-packages %build-inputs %outputs) "/gi/overrides"))))
Neat! LGTM.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl0qYJsACgkQoqBt8qM6VPrqQwf/Z64VaysnLZ67cVwId0q0q5OrBC/K+7HUvo+RRiJ8+qIbsk02hm/7WAQPM3/7Qz8A2IhFeAPtJr5IVzk5QuE9aAXvwyvT9x4u7Su4tYUJQpQYtjFnNinFMqagzIXL4PtXkvkVwrPsnGVNWWFwti+b8x3xXRITFP8CeSDbgoZDfLpigxffP2ukxO/RkHLxyJNSfgvVBUcCZN6XmRrQxfIguSK58wBki6spMmGbZsu9IB+P3VsuPs7d7HeGhJ0IWtsDUqNwjkNq98BWoxqpP+rIPdlyZhovDYcueIzouAo10yHipPqymQdCtEssZ7vp8AMCkVOd5r8bkSPMq6FLLCcMYA===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 wasredundant. python:site-packages did more than I was expecting, so I'veremoved 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-----
iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl0q47hfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNFODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE9XfVjg/+KNDFFdZurDTj1Vr7Kt568V/YZ0lIgVQIHIwjlSTYbRDi1iIyP4rfd4zoJLkIktwihoLkPvAFlGNqck+F7G+KnXKfw4zomsQnqFif9QM+PkdJak3rjBMOxcRuKPhGHZmWPmzytok9dccxrS4ilPE4bPlNfnWXTP4mBQpGFv2hwfvo8sYSHnCI2H2aK7+L26GzzFB5a5Mj6jj+0cJzukh9JC3GEGfC7aIVnSc5RaF2D6J4w6BVBvVYv1ZacS1DXSzlInODFN0bvZD+82y/G++s35SWsEnI31jncQGyriZ1A+ih8qPwXoyWUBJlR0aeMCNJilVTzMry6jCNmjibLXQHBd5452tggsAwa2nB+Lqu9q10ZrhTUBzuP6qRV/7cY67ftcy9v+XfakzQq4mfBWGRLsurztgHD9Fox4tlnk6xlUrHZZfKJmyTc/7K2OBaPDM189rEonEBc301ULyKznKmeUfzHz3D6W6lbPb2UD4tGcVSbm8VmrYLk/yfnD+Otu9jZm0tHj2eY6Dmf/byNyqOOGGDYOGI4AoDV7m/PDkKTokaez+1StIzeLZUooqJrJeG4kTBcnpC5Y0ju0qfCrvLpfEOKgNuPOolmN+PK4Ie7YAg9FgumdsFI1U+0NMImrKubw6fPcDH4XHuUBhFWIgPwN7XmO/EhpWqi12yrtl7yn4==3GLL-----END PGP SIGNATURE-----
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 36641@debbugs.gnu.org