From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41370) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmQt5-0002zT-2D for guix-patches@gnu.org; Sat, 13 Jul 2019 18:53:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmQt4-0000en-2Z for guix-patches@gnu.org; Sat, 13 Jul 2019 18:53:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmQt3-0000eV-U2 for guix-patches@gnu.org; Sat, 13 Jul 2019 18:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmQt3-00012C-QS for guix-patches@gnu.org; Sat, 13 Jul 2019 18:53:01 -0400 Subject: [bug#36641] [PATCH] gnu: python-gst: Fix build failure. Resent-Message-ID: From: Marius Bakke In-Reply-To: <20190713220059.7336-1-mail@cbaines.net> References: <20190713220059.7336-1-mail@cbaines.net> Date: Sun, 14 Jul 2019 00:52:11 +0200 Message-ID: <87muhhlf8k.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines , 36641@debbugs.gnu.org --=-=-= Content-Type: text/plain Christopher Baines 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----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----- --=-=-=--