From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: [PATCH 1/2] build: Generalize 'package-with-explicit-python'. Date: Thu, 9 Feb 2017 08:58:06 +0100 Message-ID: References: <87wpd0cxi5.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbjcG-0002rX-3j for guix-devel@gnu.org; Thu, 09 Feb 2017 02:58:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbjcF-0007NG-6J for guix-devel@gnu.org; Thu, 09 Feb 2017 02:58:08 -0500 Received: from mail-ua0-x243.google.com ([2607:f8b0:400c:c08::243]:33712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cbjcF-0007N8-1p for guix-devel@gnu.org; Thu, 09 Feb 2017 02:58:07 -0500 Received: by mail-ua0-x243.google.com with SMTP id d5so14826656uag.0 for ; Wed, 08 Feb 2017 23:58:06 -0800 (PST) In-Reply-To: <87wpd0cxi5.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: Guix-devel , ericbavier@openmailbox.org, Myles English On Wed, Feb 8, 2017 at 8:09 PM, Ricardo Wurmus wrote: > > Federico Beffa writes: > >> Generalize the Python procedure to recursively replace compiler/interpre= ter. >> From a8220b430d196e5bb079e23ac63b1acd16fdaaee Mon Sep 17 00:00:00 2001 >> From: Federico Beffa >> Date: Wed, 8 Feb 2017 18:55:32 +0100 >> Subject: [PATCH 1/2] build: Generalize 'package-with-explicit-python'. >> >> * guix/build-system/python.scm (package-with-explicit-python): Remove it= and >> replace it with the generalized procedure 'package-with-explicit-compi= ler' >> in the new file. (package-with-python2): Adapt it. >> * guix/build-system/utils.scm: New file with the generalized procedure. >> * Makefile.am (MODULES): Add new file. > > The goal here is to override packages in build system arguments, right? > This is great and we really need something like this to make building > package variants simpler. (I ran into a problem that would be solved by > this when I tried to build Perl modules for different variants of Perl.) Hi Ricardo, The goal is to exploit the compiler keyword argument of many build-systems (such as #:python, #:haskell, ...) to pass the desired compiler instead of the default one. > Looking over the patch it feels inelegant to have a whitelist of > permitted arguments, as in =E2=80=9Ccompiler-keyword=E2=80=9D. We alread= y have a > procedure called =E2=80=9Cpackage-input-rewriting=E2=80=9D that replaces = any (explicit > input-) package in the dependency graph with a different package. What > I like about that is that it is generic. Is there a way we could extend > it to include packages pulled in by the build system, e.g. by making it > work at the level of bags? The procedure was not written by me: 99% of it comes from the python-build-system. The only thing that I did is to replace the hard-coded '#:python' keyword with a variable one such that it can be used with some other build systems. This seemed to me as one step in the right direction, but if you have a better idea then please go ahead and write it. I will not feel offended ;-) Regards, Fede