mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
bpo-33922: Adding documentation for new "-64" suffix of Python launcher (GH-7849)
Since bpo-30291 it is possible to specify the architecture of Python when using the launcher
This commit is contained in:
parent
472f794a33
commit
1e2ad6c275
2 changed files with 24 additions and 13 deletions
|
|
@ -154,7 +154,9 @@ of available options is shown below.
|
||||||
| DefaultJustForMeTargetDir | The default install directory for | :file:`%LocalAppData%\\\ |
|
| DefaultJustForMeTargetDir | The default install directory for | :file:`%LocalAppData%\\\ |
|
||||||
| | just-for-me installs | Programs\\PythonXY` or |
|
| | just-for-me installs | Programs\\PythonXY` or |
|
||||||
| | | :file:`%LocalAppData%\\\ |
|
| | | :file:`%LocalAppData%\\\ |
|
||||||
| | | Programs\\PythonXY-32` |
|
| | | Programs\\PythonXY-32` or|
|
||||||
|
| | | :file:`%LocalAppData%\\\ |
|
||||||
|
| | | Programs\\PythonXY-64` |
|
||||||
+---------------------------+--------------------------------------+--------------------------+
|
+---------------------------+--------------------------------------+--------------------------+
|
||||||
| DefaultCustomTargetDir | The default custom install directory | (empty) |
|
| DefaultCustomTargetDir | The default custom install directory | (empty) |
|
||||||
| | displayed in the UI | |
|
| | displayed in the UI | |
|
||||||
|
|
@ -762,9 +764,16 @@ on Windows which you hope will be useful on Unix, you should use one of the
|
||||||
shebang lines starting with ``/usr``.
|
shebang lines starting with ``/usr``.
|
||||||
|
|
||||||
Any of the above virtual commands can be suffixed with an explicit version
|
Any of the above virtual commands can be suffixed with an explicit version
|
||||||
(either just the major version, or the major and minor version) - for example
|
(either just the major version, or the major and minor version).
|
||||||
``/usr/bin/python2.7`` - which will cause that specific version to be located
|
Furthermore the 32-bit version can be requested by adding "-32" after the
|
||||||
and used.
|
minor version. I.e. ``/usr/bin/python2.7-32`` will request usage of the
|
||||||
|
32-bit python 2.7.
|
||||||
|
|
||||||
|
.. versionadded:: 3.7
|
||||||
|
|
||||||
|
Beginning with python launcher 3.7 it is possible to request 64-bit version
|
||||||
|
by the "-64" suffix. Furthermore it is possible to specify a major and
|
||||||
|
architecture without minor (i.e. ``/usr/bin/python3-64``).
|
||||||
|
|
||||||
The ``/usr/bin/env`` form of shebang line has one further special property.
|
The ``/usr/bin/env`` form of shebang line has one further special property.
|
||||||
Before looking for installed Python interpreters, this form will search the
|
Before looking for installed Python interpreters, this form will search the
|
||||||
|
|
@ -806,17 +815,18 @@ Customizing default Python versions
|
||||||
In some cases, a version qualifier can be included in a command to dictate
|
In some cases, a version qualifier can be included in a command to dictate
|
||||||
which version of Python will be used by the command. A version qualifier
|
which version of Python will be used by the command. A version qualifier
|
||||||
starts with a major version number and can optionally be followed by a period
|
starts with a major version number and can optionally be followed by a period
|
||||||
('.') and a minor version specifier. If the minor qualifier is specified, it
|
('.') and a minor version specifier. Furthermore it is possible to specifiy
|
||||||
may optionally be followed by "-32" to indicate the 32-bit implementation of
|
if a 32 or 64 bit implementation shall be requested by adding "-32" or "-64".
|
||||||
that version be used.
|
|
||||||
|
|
||||||
For example, a shebang line of ``#!python`` has no version qualifier, while
|
For example, a shebang line of ``#!python`` has no version qualifier, while
|
||||||
``#!python3`` has a version qualifier which specifies only a major version.
|
``#!python3`` has a version qualifier which specifies only a major version.
|
||||||
|
|
||||||
If no version qualifiers are found in a command, the environment variable
|
If no version qualifiers are found in a command, the environment
|
||||||
``PY_PYTHON`` can be set to specify the default version qualifier - the default
|
variable :envvar:`PY_PYTHON` can be set to specify the default version
|
||||||
value is "2". Note this value could specify just a major version (e.g. "2") or
|
qualifier. If it is not set, the default is "3". The variable can
|
||||||
a major.minor qualifier (e.g. "2.6"), or even major.minor-32.
|
specify any value that may be passed on the command line, such as "3",
|
||||||
|
"3.7", "3.7-32" or "3.7-64". (Note that the "-64" option is only
|
||||||
|
available with the launcher included with Python 3.7 or newer.)
|
||||||
|
|
||||||
If no minor version qualifiers are found, the environment variable
|
If no minor version qualifiers are found, the environment variable
|
||||||
``PY_PYTHON{major}`` (where ``{major}`` is the current major version qualifier
|
``PY_PYTHON{major}`` (where ``{major}`` is the current major version qualifier
|
||||||
|
|
@ -834,8 +844,8 @@ of the specified version if available. This is so the behavior of the launcher
|
||||||
can be predicted knowing only what versions are installed on the PC and
|
can be predicted knowing only what versions are installed on the PC and
|
||||||
without regard to the order in which they were installed (i.e., without knowing
|
without regard to the order in which they were installed (i.e., without knowing
|
||||||
whether a 32 or 64-bit version of Python and corresponding launcher was
|
whether a 32 or 64-bit version of Python and corresponding launcher was
|
||||||
installed last). As noted above, an optional "-32" suffix can be used on a
|
installed last). As noted above, an optional "-32" or "-64" suffix can be
|
||||||
version specifier to change this behaviour.
|
used on a version specifier to change this behaviour.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -723,6 +723,7 @@ Ludwig Hähne
|
||||||
Gerhard Häring
|
Gerhard Häring
|
||||||
Fredrik Håård
|
Fredrik Håård
|
||||||
Florian Höch
|
Florian Höch
|
||||||
|
Robert Hölzl
|
||||||
Catalin Iacob
|
Catalin Iacob
|
||||||
Mihai Ibanescu
|
Mihai Ibanescu
|
||||||
Ali Ikinci
|
Ali Ikinci
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue