[Python-Dev] Support the /usr/bin/python2 symlink upstream (original) (raw)
Michael Foord fuzzyman at voidspace.org.uk
Wed Mar 2 12:40:56 CET 2011
- Previous message: [Python-Dev] Support the /usr/bin/python2 symlink upstream
- Next message: [Python-Dev] contributors survey?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 01/03/2011 21:19, Kerrick Staley wrote:
Hello, There is a need for the default Python2 install to place a symlink at /usr/bin/python2 that points to /usr/bin/python, or for the documentation to recommend that packagers ensure that python2 is defined. Also, all documentation should be changed to recommend that "#!/usr/bin/env python2" be used as the shebang for Python 2 scripts. This is needed because some distributions (Arch Linux, in particular), point /usr/bin/python to /usr/bin/python3, while others (including Slackware, Debian, and the BSDs, probably more) do not even define the python2 command. This means that a script has no way of achieving cross-platform compatibility. The point at which many distributions begin to alias /usr/bin/python to /usr/bin/python3 is due soon, and for the next couple of years, it would be best to use a python2 or python3 shebang in all scripts, making no assumptions about plain python, which should only be invoked interactively. This email from about 3 years ago seems relevant: : http://mail.python.org/pipermail/python-3000/2008-March/012421.html Again, this issue needs to be addressed by the Python developers themselves so that different *nix distributions will handle it consistently, allowing Python scripts to continue to be cross-platform.
+1
Note that a PEP will need to address what we do for Windows and Mac OS X. Less of an issue for Windows where we don't put python.exe on the PATH (which we should), but we still need to decide whether we will add python2 / python3 binaries.
Michael Foord
Thanks, Kerrick Staley
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
-- http://www.voidspace.org.uk/
May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20110302/81fd9e9c/attachment.html>
- Previous message: [Python-Dev] Support the /usr/bin/python2 symlink upstream
- Next message: [Python-Dev] contributors survey?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]