Date: Fri, 5 Oct 2012 17:51:12 -0400 From: Eitan Adler <lists@eitanadler.com> To: Ruslan Mahmatkhanov <cvs-src@yandex.ru> Cc: Dmitry Sivachenko <demon@freebsd.org>, python@freebsd.org, Chris Rees <utisoft@gmail.com>, Li-Wen Hsu <lwhsu@freebsd.org> Subject: Re: bin/python3 symlink for python3X ports Message-ID: <CAF6rxg=35TMVe7J4gv3YCGiZQ6QB3%2BQabnvxxhes%2B7sA%2BnJXzw@mail.gmail.com> In-Reply-To: <506AD869.6090605@yandex.ru> References: <5062AAEA.4000401@FreeBSD.org> <CADLo838ZysqxVHPuj6_M223ohanPWRoqc2mwePNeBYbGa2OfRQ@mail.gmail.com> <5062C5CB.4060109@yandex.ru> <5062C769.6090305@FreeBSD.org> <506AD869.6090605@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2 October 2012 08:04, Ruslan Mahmatkhanov <cvs-src@yandex.ru> 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" <demon@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxg=35TMVe7J4gv3YCGiZQ6QB3%2BQabnvxxhes%2B7sA%2BnJXzw>