From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Python 3 binaries Date: Sun, 1 Sep 2013 16:39:07 +0200 Message-ID: <20130901143907.GA23394@debian> References: <20130831153018.GA5442@debian> <5222282D.7000801@gmail.com> <20130901092817.GA19604@debian> <87d2osoczg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VG8oC-0000OT-Pv for guix-devel@gnu.org; Sun, 01 Sep 2013 10:39:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VG8o5-0002sW-GO for guix-devel@gnu.org; Sun, 01 Sep 2013 10:39:20 -0400 Content-Disposition: inline In-Reply-To: <87d2osoczg.fsf@gnu.org> 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: Ludovic =?iso-8859-15?Q?Court=E8s?= Cc: guix-devel@gnu.org On Sun, Sep 01, 2013 at 04:03:47PM +0200, Ludovic Courtès wrote: > Ah, so packages that work with Python 3 expect a ‘python’ (and not > ‘python3’) executable? Apparently so. And anyway, packages that work with both versions usually start their scripts with #!/usr/bin/python. > Then that’s a different story (I thought ‘python3’ was the official name > for the binary.) > > I’d rather not have specific things like that in ‘patch-shebangs’. So, > what we could do is: > • Leave ‘python-3’ as is, without the symlink. > • Add a ‘python-3-wrapper’ package that just contains ‘bin/python’ > pointing to ‘…/bin/python3’ (using ‘trivial-build-system’.) > • When building Python 3 packages, we’d use the wrapper, not the real > one; however, users would install the real one in their environment. This would be a possibility. Personally, I find the solution rewriting the shebangs cleaner, but this is more a matter of taste than anything. The wrapper would require the user to install both python-3 and the wrapper (or contain python-3 as a propagated input), so that the user has all files in the python-3 package. This is slightly ugly. The solution with the wrapper has the advantage that users who want only Python 3 and not Python 2 would then get a binary named "python" pointing to version 3, useful also for their own code. But somewhere it would have to be documented that they then have to install python-3-wrapper and not just python or python-3. But the naming is not very clear; why do I need to install python-wrapper if I just want the latest version of Python? How about calling the package python-default and having it contain python-3 as a propagated input? We could even have a version 2 of this package, which would be empty with only python-2 as a propagated input. Then the user could: - install python-default = python-default-3 and get only Python 3, with binaries "python" and "pydoc" pointing to "python3" and "pydoc3", respectively; - install python-default-2 and get only Python 2. - install python-2 and python = python-3 to get both of them, with "python" pointing to Python 2. What do you think? Andreas