[Python-checkins] bpo-43774: Add more links to configure options (GH-25363)

vstinner webhook-mailer at python.org
Mon Apr 12 17:27:44 EDT 2021


https://github.com/python/cpython/commit/85918e4ab6e9410008aef6dedf000d24b3e120ea
commit: 85918e4ab6e9410008aef6dedf000d24b3e120ea
branch: master
author: Victor Stinner <vstinner at python.org>
committer: vstinner <vstinner at python.org>
date: 2021-04-12T23:27:35+02:00
summary:

bpo-43774: Add more links to configure options (GH-25363)

files:
M Doc/c-api/init_config.rst
M Doc/howto/instrumentation.rst
M Doc/library/decimal.rst
M Doc/library/sqlite3.rst
M Doc/library/sys.rst
M Doc/library/zoneinfo.rst
M Doc/using/configure.rst
M Doc/using/unix.rst
M Doc/whatsnew/3.10.rst
M Doc/whatsnew/3.9.rst

diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst
index d364f4a3c98b5..5e9296a5470d4 100644
--- a/Doc/c-api/init_config.rst
+++ b/Doc/c-api/init_config.rst
@@ -638,7 +638,7 @@ PyConfig
       Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable.
 
       Need a special build of Python with the ``Py_TRACE_REFS`` macro defined:
-      see :option:`configure --with-trace-refs <--with-trace-refs>`.
+      see the :option:`configure --with-trace-refs option <--with-trace-refs>`.
 
       Default: ``0``.
 
@@ -820,7 +820,7 @@ PyConfig
       Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable.
 
       The option is ignored if Python is :option:`configured using
-      --without-pymalloc <--without-pymalloc>`.
+      the --without-pymalloc option <--without-pymalloc>`.
 
       Default: ``0``.
 
@@ -831,8 +831,8 @@ PyConfig
       Set by the :envvar:`PYTHONPLATLIBDIR` environment variable.
 
       Default: value of the ``PLATLIBDIR`` macro which is set by the
-      :option:`configure --with-platlibdir option <--with-platlibdir>` (default:
-      ``"lib"``).
+      :option:`configure --with-platlibdir option <--with-platlibdir>`
+      (default: ``"lib"``).
 
       Part of the :ref:`Python Path Configuration <init-path-config>` input.
 
diff --git a/Doc/howto/instrumentation.rst b/Doc/howto/instrumentation.rst
index ab6240d1c02e7..4a59ae82f96e2 100644
--- a/Doc/howto/instrumentation.rst
+++ b/Doc/howto/instrumentation.rst
@@ -46,7 +46,8 @@ or::
    $ sudo apt-get install systemtap-sdt-dev
 
 
-CPython must then be configured ``--with-dtrace``:
+CPython must then be :option:`configured with the --with-dtrace option
+<--with-dtrace>`:
 
 .. code-block:: none
 
@@ -77,7 +78,8 @@ the built binary by seeing if it contains a ".note.stapsdt" section.
    $ readelf -S ./python | grep .note.stapsdt
    [30] .note.stapsdt        NOTE         0000000000000000 00308d78
 
-If you've built Python as a shared library (with --enable-shared), you
+If you've built Python as a shared library
+(with the :option:`--enable-shared` configure option), you
 need to look instead within the shared library.  For example::
 
    $ readelf -S libpython3.3dm.so.1.0 | grep .note.stapsdt
@@ -252,7 +254,7 @@ where the columns are:
 
 and the remainder indicates the call/return hierarchy as the script executes.
 
-For a `--enable-shared` build of CPython, the markers are contained within the
+For a :option:`--enable-shared` build of CPython, the markers are contained within the
 libpython shared library, and the probe's dotted path needs to reflect this. For
 example, this line from the above example:
 
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index 35a263a659eaf..e759c5cf23b9e 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -1484,8 +1484,8 @@ are also included in the pure Python version for compatibility.
 
 .. data:: HAVE_CONTEXTVAR
 
-   The default value is ``True``. If Python is :option:`configured with
-   --without-decimal-contextvar <--without-decimal-contextvar>`,
+   The default value is ``True``. If Python is :option:`configured using
+   the --without-decimal-contextvar option <--without-decimal-contextvar>`,
    the C version uses a thread-local rather than a coroutine-local context and the value
    is ``False``.  This is slightly faster in some nested context scenarios.
 
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 1da5c7f3ab187..aee58a4bbfc07 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -1090,5 +1090,5 @@ committed:
 .. [#f1] The sqlite3 module is not built with loadable extension support by
    default, because some platforms (notably Mac OS X) have SQLite
    libraries which are compiled without this feature. To get loadable
-   extension support, you must pass ``--enable-loadable-sqlite-extensions`` to
-   configure.
+   extension support, you must pass the
+   :option:`--enable-loadable-sqlite-extensions` option to configure.
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index d85eadbf5a8fa..721edd1495aa5 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -250,8 +250,9 @@ always available.
    Print low-level information to stderr about the state of CPython's memory
    allocator.
 
-   If Python is :option:`configured --with-pydebug <--with-pydebug>`, it also
-   performs some expensive internal consistency checks.
+   If Python is `built in debug mode <debug-build>` (:option:`configure
+   --with-pydebug option <--with-pydebug>`), it also performs some expensive
+   internal consistency checks.
 
    .. versionadded:: 3.3
 
diff --git a/Doc/library/zoneinfo.rst b/Doc/library/zoneinfo.rst
index 3a4c12a73acd7..1b2ba2af2ae6f 100644
--- a/Doc/library/zoneinfo.rst
+++ b/Doc/library/zoneinfo.rst
@@ -124,8 +124,9 @@ time zone database (except on Windows, where there are no "well-known"
 locations for time zone data). On POSIX systems, downstream distributors and
 those building Python from source who know where their system
 time zone data is deployed may change the default time zone path by specifying
-the compile-time option ``TZPATH`` (or, more likely, the ``configure`` flag
-``--with-tzpath``), which should be a string delimited by :data:`os.pathsep`.
+the compile-time option ``TZPATH`` (or, more likely, the :option:`configure
+flag --with-tzpath <--with-tzpath>`), which should be a string delimited by
+:data:`os.pathsep`.
 
 On all platforms, the configured value is available as the ``TZPATH`` key in
 :func:`sysconfig.get_config_var`.
diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst
index 85c9018067e04..e7fad7f2e622b 100644
--- a/Doc/using/configure.rst
+++ b/Doc/using/configure.rst
@@ -19,7 +19,10 @@ General Options
 .. cmdoption:: --enable-loadable-sqlite-extensions
 
    Support loadable extensions in the :mod:`_sqlite` extension module (default
-   is no), see the :mod:`sqlite3` module.
+   is no).
+
+   See the :meth:`sqlite3.Connection.enable_load_extension` method of the
+   :mod:`sqlite3` module.
 
    .. versionadded:: 3.6
 
@@ -54,8 +57,9 @@ General Options
 
 .. cmdoption:: --with-tzpath=<list of absolute paths separated by pathsep>
 
-   Select the default time zone search path for :data:`zoneinfo.TZPATH`,
-   see the :mod:`zoneinfo` module.
+   Select the default time zone search path for :data:`zoneinfo.TZPATH`.
+   See the :ref:`Compile-time configuration
+   <zoneinfo_data_compile_time_config>` of the :mod:`zoneinfo` module.
 
    Default: ``/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo``.
 
@@ -287,6 +291,9 @@ Debug options
 
    Enable DTrace support (default is no).
 
+   See :ref:`Instrumenting CPython with DTrace and SystemTap
+   <instrumentation>`.
+
    .. versionadded:: 3.6
 
 .. cmdoption:: --with-address-sanitizer
diff --git a/Doc/using/unix.rst b/Doc/using/unix.rst
index b5b26ecef20fb..09dd5b0ac6e90 100644
--- a/Doc/using/unix.rst
+++ b/Doc/using/unix.rst
@@ -168,6 +168,7 @@ Custom OpenSSL
          $ popd
 
 3. Build Python with custom OpenSSL
+   (see the configure `--with-openssl` and `--with-openssl-rpath` options)
 
    .. code-block:: shell-session
 
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 85f229cd78717..6af0f834a9d4c 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -986,9 +986,9 @@ Optimizations
   van Rossum in :issue:`42927`, based on ideas implemented originally in PyPy
   and MicroPython.)
 
-* When building Python with ``--enable-optimizations`` now
+* When building Python with :option:`--enable-optimizations` now
   ``-fno-semantic-interposition`` is added to both the compile and link line.
-  This speeds builds of the Python interpreter created with ``--enable-shared``
+  This speeds builds of the Python interpreter created with :option:`--enable-shared`
   with ``gcc`` by up to 30%. See `this article
   <https://developers.redhat.com/blog/2020/06/25/red-hat-enterprise-linux-8-2-brings-faster-python-3-8-run-speeds/>`_
   for more details. (Contributed by Victor Stinner and Pablo Galindo in
@@ -1300,11 +1300,12 @@ Build Changes
 * The :mod:`atexit` module must now always be built as a built-in module.
   (Contributed by Victor Stinner in :issue:`42639`.)
 
-* Added ``--disable-test-modules`` option to the ``configure`` script:
+* Added :option:`--disable-test-modules` option to the ``configure`` script:
   don't build nor install test modules.
   (Contributed by Xavier de Gaye, Thomas Petazzoni and Peixing Xin in :issue:`27640`.)
 
-* Add ``--with-wheel-pkg-dir=PATH`` option to the ``./configure`` script. If
+* Add :option:`--with-wheel-pkg-dir=PATH option <--with-wheel-pkg-dir>`
+  to the ``./configure`` script. If
   specified, the :mod:`ensurepip` module looks for ``setuptools`` and ``pip``
   wheel packages in this directory: if both are present, these wheel packages
   are used instead of ensurepip bundled wheel packages.
@@ -1316,19 +1317,19 @@ Build Changes
 
   (Contributed by Victor Stinner in :issue:`42856`.)
 
-* Add a new configure ``--without-static-libpython`` option to not build the
-  ``libpythonMAJOR.MINOR.a`` static library and not install the ``python.o``
-  object file.
+* Add a new :option:`configure --without-static-libpython option
+  <--without-static-libpython>` to not build the ``libpythonMAJOR.MINOR.a``
+  static library and not install the ``python.o`` object file.
 
   (Contributed by Victor Stinner in :issue:`43103`.)
 
 * The ``configure`` script now uses the ``pkg-config`` utility, if available,
   to detect the location of Tcl/Tk headers and libraries.  As before, those
-  locations can be explicitly specified with the ``--with-tcltk-includes``
-  and ``--with-tcltk-libs`` configuration options.
+  locations can be explicitly specified with the :option:`--with-tcltk-includes`
+  and :option:`--with-tcltk-libs` configuration options.
   (Contributed by Manolis Stamatogiannakis in :issue:`42603`.)
 
-* Add ``--with-openssl-rpath`` option to ``configure`` script. The option
+* Add :option:`--with-openssl-rpath` option to ``configure`` script. The option
   simplifies building Python with a custom OpenSSL installation, e.g.
   ``./configure --with-openssl=/path/to/openssl --with-openssl-rpath=auto``.
   (Contributed by Christian Heimes in :issue:`43466`.)
@@ -1405,8 +1406,8 @@ New Features
   in debug mode because the :c:type:`PyObject` structure is the same in release
   and debug mode since Python 3.8 (see :issue:`36465`).
 
-  The limited C API is still not supported in the ``--with-trace-refs`` special
-  build (``Py_TRACE_REFS`` macro).
+  The limited C API is still not supported in the :option:`--with-trace-refs`
+  special build (``Py_TRACE_REFS`` macro).
   (Contributed by Victor Stinner in :issue:`43688`.)
 
 * Add the :c:func:`Py_Is(x, y) <Py_Is>` function to test if the *x* object is
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index c16b9a70fbdd1..174d9e24be319 100644
--- a/Doc/whatsnew/3.9.rst
+++ b/Doc/whatsnew/3.9.rst
@@ -1211,9 +1211,9 @@ Build Changes
   non-system Tcl and Tk frameworks if they are installed in
   ``/Library/Frameworks``, as had been the case on older releases
   of macOS. If a macOS SDK is explicitly configured, by using
-  ``--enable-universalsdk=`` or ``-isysroot``, only the SDK itself is
+  :option:`--enable-universalsdk` or ``-isysroot``, only the SDK itself is
   searched. The default behavior can still be overridden with
-  ``--with-tcltk-includes`` and ``--with-tcltk-libs``.
+  :option:`--with-tcltk-includes` and :option:`--with-tcltk-libs`.
   (Contributed by Ned Deily in :issue:`34956`.)
 
 * Python can now be built for Windows 10 ARM64.



More information about the Python-checkins mailing list