From owner-freebsd-python@FreeBSD.ORG Fri Oct 5 21:51:44 2012 Return-Path: Delivered-To: python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3A0DB1065676 for ; Fri, 5 Oct 2012 21:51:44 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id B772D8FC1B for ; Fri, 5 Oct 2012 21:51:43 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so2650440pbb.13 for ; Fri, 05 Oct 2012 14:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=RtznCiEXfYhy9ieWLYuhaVRU3fHYTcKre/oGiZxN2cA=; b=peJgFMDv3bvWK1fGZg7rGVxBBU3v1bk7tJxajUomz6odSlraV5JJwIgPu5YC0J0sWe qqpogwO9fw/f+rQV4PjIEzTIGbdHDz1qYcbux73/o8swKdKTI5ymhO56EjrtMaDigsrU Lpi1sSlGwm+SnVVkC9fVNBSjBZV6eXJcG3+IY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=RtznCiEXfYhy9ieWLYuhaVRU3fHYTcKre/oGiZxN2cA=; b=OQCcgpRIEfoPd/PNnD+r5nRcao12Gf1x63QBFUBx54RS0EojrRnMwYXQmh9eKfrSr0 3qXOC+NOgb3aqBjGDOvBe+3gPZPvmWtFZAbm33zZcWrbneptOFESYVyIUHTRGwbzZYPw LyVrFvSVNK9AAk554TuDM7cyF9KF/HMsXfr8qNmYaNdK/vTbB9SqVrTDa2kyAUZwKD2L xS325Hj6cUcoOuU3YEyPZvA/MN8V8L1jj/rtLrVEtFwtORA9shYKmNVhwzYJJvrJWlF/ Hdvrn1M7KihGvCmkdvVW7sKpOkUGZPGDbOLA/LbxlXlsElk/Vo6+EutUzFkmXByFxtZB DhkQ== Received: by 10.68.200.72 with SMTP id jq8mr33920135pbc.38.1349473902993; Fri, 05 Oct 2012 14:51:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.190.164 with HTTP; Fri, 5 Oct 2012 14:51:12 -0700 (PDT) In-Reply-To: <506AD869.6090605@yandex.ru> References: <5062AAEA.4000401@FreeBSD.org> <5062C5CB.4060109@yandex.ru> <5062C769.6090305@FreeBSD.org> <506AD869.6090605@yandex.ru> From: Eitan Adler Date: Fri, 5 Oct 2012 17:51:12 -0400 Message-ID: To: Ruslan Mahmatkhanov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmBHqtSRCIFAEYIi33FPsC5RI5vwrjtxLMEHLmFDC1YUb1tLps71O/0igshlFqfVg1ZTTi5 Cc: Dmitry Sivachenko , python@freebsd.org, Chris Rees , Li-Wen Hsu Subject: Re: bin/python3 symlink for python3X ports X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 21:51:44 -0000 On 2 October 2012 08:04, Ruslan Mahmatkhanov wrote: > Dmitry Sivachenko wrote on 26.09.2012 13:14: >> >> On 26.09.2012 13:07, Ruslan Mahmatkhanov wrote: >> >>> Chris Rees wrote on 26.09.2012 13:03: >>>> >>>> On 26 Sep 2012 08:13, "Dmitry Sivachenko" wrote: >>>>> >>>>> >>>>> Hello! >>>>> >>>>> It is common to have both python-2 and python-3 packages installed. >>>>> To help transition it is convenient to have bin/python to point to >>>> >>>> python-2 binary. >>>>> >>>>> >>>>> Now for every X in python3X we have a bin/python3.X binary. >>>>> >>>>> So for every new python3.X release one should change shebang line in >>>> >>>> scripts. >>>>> >>>>> >>>>> I propose to tweak python3X ports so they create bin/python3 symlink >>>> >>>> pointing to the installed python3.X binary so that people can always use >>>> 'python3' name. >>>>> >>>>> >>>>> What do you think? >>>> >>>> >>>> I think it's a great idea, at least minimising weird breakage when >>>> python >>>> is updated. >>>> >>>> Have you a patch? Also, what do other OSes do? >>>> >> >> >> I don't have a patch but I can make one if you like. >> I don't use other OSes so I have no idea what do they do with that >> problem and I don't see any reason why should we bother... > > > I just realized there is such a document: > http://www.python.org/dev/peps/pep-0394/ > > According to it: > > python2 will refer to some version of Python 2.x > python3 will refer to some version of Python 3.x > python should refer to the same target as python2 but may refer to python3 > on some bleeding edge distributions > > And it has full details about all the symlinks etc. So it's not just > linuces. I'd read it before preparing the patch. Random thought: can we make 'python', 'python2', and 'python3' a simple C wrapper (you can't use a shell script because an interpreter can't be interpreted) that selects the correct version instead of a symlink? -- Eitan Adler