Kaydet (Commit) 46a9d628 authored tarafından Éric Araujo's avatar Éric Araujo

Merge 3.2

.. highlightlang:: none .. highlightlang:: sh
.. _using-on-unix: .. _using-on-unix:
...@@ -55,8 +55,8 @@ On FreeBSD and OpenBSD ...@@ -55,8 +55,8 @@ On FreeBSD and OpenBSD
On OpenSolaris On OpenSolaris
-------------- --------------
To install the newest Python versions on OpenSolaris, install blastwave To install the newest Python versions on OpenSolaris, install `blastwave
(http://www.blastwave.org/howto.html) and type "pkg_get -i python" at the <http://www.blastwave.org/howto.html>`_ and type ``pkg_get -i python`` at the
prompt. prompt.
...@@ -65,22 +65,23 @@ Building Python ...@@ -65,22 +65,23 @@ Building Python
If you want to compile CPython yourself, first thing you should do is get the If you want to compile CPython yourself, first thing you should do is get the
`source <http://python.org/download/source/>`_. You can download either the `source <http://python.org/download/source/>`_. You can download either the
latest release's source or just grab a fresh `checkout latest release's source or just grab a fresh `clone
<http://docs.python.org/devguide/setup#checking-out-the-code>`_. <http://docs.python.org/devguide/setup#getting-the-source-code>`_. (If you want
to contribute patches, you will need a clone.)
The build process consists the usual :: The build process consists in the usual ::
./configure ./configure
make make
make install make install
invocations. Configuration options and caveats for specific Unix platforms are invocations. Configuration options and caveats for specific Unix platforms are
extensively documented in the :file:`README` file in the root of the Python extensively documented in the :source:`README` file in the root of the Python
source tree. source tree.
.. warning:: .. warning::
``make install`` can overwrite or masquerade the :file:`python` binary. ``make install`` can overwrite or masquerade the :file:`python3` binary.
``make altinstall`` is therefore recommended instead of ``make install`` ``make altinstall`` is therefore recommended instead of ``make install``
since it only installs :file:`{exec_prefix}/bin/python{version}`. since it only installs :file:`{exec_prefix}/bin/python{version}`.
...@@ -98,7 +99,7 @@ For example, on most Linux systems, the default for both is :file:`/usr`. ...@@ -98,7 +99,7 @@ For example, on most Linux systems, the default for both is :file:`/usr`.
+-----------------------------------------------+------------------------------------------+ +-----------------------------------------------+------------------------------------------+
| File/directory | Meaning | | File/directory | Meaning |
+===============================================+==========================================+ +===============================================+==========================================+
| :file:`{exec_prefix}/bin/python` | Recommended location of the interpreter. | | :file:`{exec_prefix}/bin/python3` | Recommended location of the interpreter. |
+-----------------------------------------------+------------------------------------------+ +-----------------------------------------------+------------------------------------------+
| :file:`{prefix}/lib/python{version}`, | Recommended locations of the directories | | :file:`{prefix}/lib/python{version}`, | Recommended locations of the directories |
| :file:`{exec_prefix}/lib/python{version}` | containing the standard modules. | | :file:`{exec_prefix}/lib/python{version}` | containing the standard modules. |
...@@ -108,10 +109,6 @@ For example, on most Linux systems, the default for both is :file:`/usr`. ...@@ -108,10 +109,6 @@ For example, on most Linux systems, the default for both is :file:`/usr`.
| | developing Python extensions and | | | developing Python extensions and |
| | embedding the interpreter. | | | embedding the interpreter. |
+-----------------------------------------------+------------------------------------------+ +-----------------------------------------------+------------------------------------------+
| :file:`~/.pythonrc.py` | User-specific initialization file loaded |
| | by the user module; not used by default |
| | or by most applications. |
+-----------------------------------------------+------------------------------------------+
Miscellaneous Miscellaneous
...@@ -125,11 +122,11 @@ e.g. with :: ...@@ -125,11 +122,11 @@ e.g. with ::
and put an appropriate Shebang line at the top of the script. A good choice is and put an appropriate Shebang line at the top of the script. A good choice is
usually :: usually ::
#!/usr/bin/env python #!/usr/bin/env python3
which searches for the Python interpreter in the whole :envvar:`PATH`. However, which searches for the Python interpreter in the whole :envvar:`PATH`. However,
some Unices may not have the :program:`env` command, so you may need to hardcode some Unices may not have the :program:`env` command, so you may need to hardcode
``/usr/bin/python`` as the interpreter path. ``/usr/bin/python3`` as the interpreter path.
To use shell commands in your Python scripts, look at the :mod:`subprocess` module. To use shell commands in your Python scripts, look at the :mod:`subprocess` module.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment