[Python-Dev] [PEPs] Support the /usr/bin/python2 symlink upstream
Kerrick Staley
mail at kerrickstaley.com
Sun Jul 10 02:46:09 CEST 2011
$ svn diff
Index: pep-0394.txt
===================================================================
--- pep-0394.txt (revision 88860)
+++ pep-0394.txt (working copy)
@@ -1,5 +1,5 @@
PEP: 394
-Title: The "python" command on Unix-Like Systems
+Title: The "python" Command on Unix-Like Systems
Version: $Revision$
Last-Modified: $Date$
Author: Kerrick Staley <mail at kerrickstaley.com>,
@@ -53,10 +53,14 @@
* When reinvoking the interpreter from a Python script, querying
``sys.executable`` to avoid hardcoded assumptions regarding the
interpreter location remains the preferred approach.
+* The ``idle``, ``pydoc``, and ``python-config`` binaries from Python 2.0
+should likewise be available as ``idle2``, ``pydoc2``, and ``python2-config``,
+with the original commands invoking these binaries by default, but possibly
+invoking the Python 3.0 versions instead.
These recommendations are the outcome of the relevant python-dev discussion in
-March 2011 [1] (NOTE: More accurately, they will be such once that "Draft"
-status disappears from the PEP header, it has been moved into the "Other
+March to July 2011 [1] (NOTE: More accurately, they will be such once that
+"Draft" status disappears from the PEP header, it has been moved into
the "Other
Informational PEP" section in PEP 0 and this note has been deleted)
@@ -144,11 +148,16 @@
While technically a new feature, the ``make install`` command and the Mac OS
X installer in the 2.7 version of CPython will be adjusted to create the
-new ``python2`` command in addition to the existing ``python`` and
-``python2.7`` commands. This feature will first appear in CPython 2.7.2.
+``python2.7``, ``idle2.7``, ``pydoc2.7``, and ``python2.7-config`` binaries,
+with ``python2``, ``idle2``, ``pydoc2``, and ``python2-config`` as hard links
+to the respective binaries, and ``python``, ``idle``, ``pydoc``, and
+``python-config`` as symbolic links to the respective hard links. This feature
+will first appear in CPython 2.7.2.
-The ``make install`` command in the CPython 3.x series will continue to
-install only the ``python3`` symlink for the foreseeable future.
+The ``make install`` command in the CPython 3.x series will similarly install
+the ``python3.x``, ``idle3.x``, ``pydoc3.x``, and ``python3.x-config`` binaries
+(with appropriate ``x``), and ``python3``, ``idle3``, ``pydoc3``, and
+``python3-config`` as hard links.
Impact on PYTHON* Environment Variables
@@ -166,27 +175,12 @@
Exclusions of MS Windows
========================
-This PEP deliberately excludes any proposals relating to Microsoft Windows.
-The use of parallel installs on Windows suffers from numerous issues,
-including the "last installed wins" behaviour for handling of file
-associations, a lack of universal robust symlink support for easy aliasing of
-commands, the fact that the Python executable is not available on ``PATH`` by
-default, the fact that the ``python.exe`` and ``pythonw.exe`` names are
-used for both Python 2 and Python 3 binaries and the lack of distinction
-between the different Python versions when the Start menu shortcuts are
-divorced from their containing folders (e.g. when they appear in the
-"Recently Used" list.
+This PEP deliberately excludes any proposals relating to Microsoft Windows:
+devising an equivalent solution for Windows was deemed too complex to handle
+here. PEP 397 and the related discussion on the python-dev mailing list address
+this issue.
-While these questions are well worth addressing, they do not have easy
-answers. The authors of this particular PEP aren't inclined to even begin
-trying to answer them, but anyone that wants to tackle them should feel free
-to start working on their own PEP.
-Note that, while the topic has been excluded from this PEP, there is plenty of
-material in the linked python-dev discussion that may be useful in the design
-and implementation of a Windows-specific solution.
-
-
References
==========
More information about the Python-Dev
mailing list