From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Python 3 binaries Date: Sun, 1 Sep 2013 11:28:17 +0200 Message-ID: <20130901092817.GA19604@debian> References: <20130831153018.GA5442@debian> <5222282D.7000801@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VG3xR-0002eT-6D for guix-devel@gnu.org; Sun, 01 Sep 2013 05:28:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VG3xJ-0005z5-SL for guix-devel@gnu.org; Sun, 01 Sep 2013 05:28:33 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:52403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VG3xJ-0005wd-Ip for guix-devel@gnu.org; Sun, 01 Sep 2013 05:28:25 -0400 Content-Disposition: inline In-Reply-To: <5222282D.7000801@gmail.com> List-Id: 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Cyril Roelandt Cc: guix-devel@gnu.org Very well. If we do not wish to make the symlink python->python3, then we will need special code in patch-shebangs, so that things like "#!/usr/bin/python" may get rewritten to "#!/nix/store/...python-3.3.2/bin/python3" if no binary named "python" is found. I think the following patch does this: --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -516,7 +516,10 @@ FILE are kept unchanged." (rest (match:substring m 3)) (has-env (string-suffix? "/env" interp)) (cmd (if has-env arg1 (basename interp))) - (bin (search-path path cmd))) + (bin (or (search-path path cmd) + (if (string=? cmd "python") + (search-path path "python3") + #f)))) (if bin (if (string=? bin interp) #f ; nothing to do But it triggers a full rebuild, so it will take me a while to test it. If you agree to this patch, we would need to revive core-updates, and should revert to python 2 in master. Could we then build core-updates also on hydra.gnu.org? This would make it easier to add python modules for the two different versions. Andreas