Skip to content

Commit 85918e4

Browse files
authored
bpo-43774: Add more links to configure options (GH-25363)
1 parent 20ac347 commit 85918e4

File tree

10 files changed

+45
-32
lines changed

10 files changed

+45
-32
lines changed

Doc/c-api/init_config.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ PyConfig
638638
Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable.
639639
640640
Need a special build of Python with the ``Py_TRACE_REFS`` macro defined:
641-
see :option:`configure --with-trace-refs <--with-trace-refs>`.
641+
see the :option:`configure --with-trace-refs option <--with-trace-refs>`.
642642
643643
Default: ``0``.
644644
@@ -820,7 +820,7 @@ PyConfig
820820
Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable.
821821
822822
The option is ignored if Python is :option:`configured using
823-
--without-pymalloc <--without-pymalloc>`.
823+
the --without-pymalloc option <--without-pymalloc>`.
824824
825825
Default: ``0``.
826826
@@ -831,8 +831,8 @@ PyConfig
831831
Set by the :envvar:`PYTHONPLATLIBDIR` environment variable.
832832
833833
Default: value of the ``PLATLIBDIR`` macro which is set by the
834-
:option:`configure --with-platlibdir option <--with-platlibdir>` (default:
835-
``"lib"``).
834+
:option:`configure --with-platlibdir option <--with-platlibdir>`
835+
(default: ``"lib"``).
836836
837837
Part of the :ref:`Python Path Configuration <init-path-config>` input.
838838

Doc/howto/instrumentation.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ or::
4646
$ sudo apt-get install systemtap-sdt-dev
4747

4848

49-
CPython must then be configured ``--with-dtrace``:
49+
CPython must then be :option:`configured with the --with-dtrace option
50+
<--with-dtrace>`:
5051

5152
.. code-block:: none
5253
@@ -77,7 +78,8 @@ the built binary by seeing if it contains a ".note.stapsdt" section.
7778
$ readelf -S ./python | grep .note.stapsdt
7879
[30] .note.stapsdt NOTE 0000000000000000 00308d78
7980

80-
If you've built Python as a shared library (with --enable-shared), you
81+
If you've built Python as a shared library
82+
(with the :option:`--enable-shared` configure option), you
8183
need to look instead within the shared library. For example::
8284

8385
$ readelf -S libpython3.3dm.so.1.0 | grep .note.stapsdt
@@ -252,7 +254,7 @@ where the columns are:
252254

253255
and the remainder indicates the call/return hierarchy as the script executes.
254256

255-
For a `--enable-shared` build of CPython, the markers are contained within the
257+
For a :option:`--enable-shared` build of CPython, the markers are contained within the
256258
libpython shared library, and the probe's dotted path needs to reflect this. For
257259
example, this line from the above example:
258260

Doc/library/decimal.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,8 +1484,8 @@ are also included in the pure Python version for compatibility.
14841484

14851485
.. data:: HAVE_CONTEXTVAR
14861486

1487-
The default value is ``True``. If Python is :option:`configured with
1488-
--without-decimal-contextvar <--without-decimal-contextvar>`,
1487+
The default value is ``True``. If Python is :option:`configured using
1488+
the --without-decimal-contextvar option <--without-decimal-contextvar>`,
14891489
the C version uses a thread-local rather than a coroutine-local context and the value
14901490
is ``False``. This is slightly faster in some nested context scenarios.
14911491

Doc/library/sqlite3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,5 +1090,5 @@ committed:
10901090
.. [#f1] The sqlite3 module is not built with loadable extension support by
10911091
default, because some platforms (notably Mac OS X) have SQLite
10921092
libraries which are compiled without this feature. To get loadable
1093-
extension support, you must pass ``--enable-loadable-sqlite-extensions`` to
1094-
configure.
1093+
extension support, you must pass the
1094+
:option:`--enable-loadable-sqlite-extensions` option to configure.

Doc/library/sys.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ always available.
250250
Print low-level information to stderr about the state of CPython's memory
251251
allocator.
252252

253-
If Python is :option:`configured --with-pydebug <--with-pydebug>`, it also
254-
performs some expensive internal consistency checks.
253+
If Python is `built in debug mode <debug-build>` (:option:`configure
254+
--with-pydebug option <--with-pydebug>`), it also performs some expensive
255+
internal consistency checks.
255256

256257
.. versionadded:: 3.3
257258

Doc/library/zoneinfo.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ time zone database (except on Windows, where there are no "well-known"
124124
locations for time zone data). On POSIX systems, downstream distributors and
125125
those building Python from source who know where their system
126126
time zone data is deployed may change the default time zone path by specifying
127-
the compile-time option ``TZPATH`` (or, more likely, the ``configure`` flag
128-
``--with-tzpath``), which should be a string delimited by :data:`os.pathsep`.
127+
the compile-time option ``TZPATH`` (or, more likely, the :option:`configure
128+
flag --with-tzpath <--with-tzpath>`), which should be a string delimited by
129+
:data:`os.pathsep`.
129130

130131
On all platforms, the configured value is available as the ``TZPATH`` key in
131132
:func:`sysconfig.get_config_var`.

Doc/using/configure.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ General Options
1919
.. cmdoption:: --enable-loadable-sqlite-extensions
2020

2121
Support loadable extensions in the :mod:`_sqlite` extension module (default
22-
is no), see the :mod:`sqlite3` module.
22+
is no).
23+
24+
See the :meth:`sqlite3.Connection.enable_load_extension` method of the
25+
:mod:`sqlite3` module.
2326

2427
.. versionadded:: 3.6
2528

@@ -54,8 +57,9 @@ General Options
5457

5558
.. cmdoption:: --with-tzpath=<list of absolute paths separated by pathsep>
5659

57-
Select the default time zone search path for :data:`zoneinfo.TZPATH`,
58-
see the :mod:`zoneinfo` module.
60+
Select the default time zone search path for :data:`zoneinfo.TZPATH`.
61+
See the :ref:`Compile-time configuration
62+
<zoneinfo_data_compile_time_config>` of the :mod:`zoneinfo` module.
5963

6064
Default: ``/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo``.
6165

@@ -287,6 +291,9 @@ Debug options
287291

288292
Enable DTrace support (default is no).
289293

294+
See :ref:`Instrumenting CPython with DTrace and SystemTap
295+
<instrumentation>`.
296+
290297
.. versionadded:: 3.6
291298

292299
.. cmdoption:: --with-address-sanitizer

Doc/using/unix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ Custom OpenSSL
168168
$ popd
169169
170170
3. Build Python with custom OpenSSL
171+
(see the configure `--with-openssl` and `--with-openssl-rpath` options)
171172

172173
.. code-block:: shell-session
173174

Doc/whatsnew/3.10.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -986,9 +986,9 @@ Optimizations
986986
van Rossum in :issue:`42927`, based on ideas implemented originally in PyPy
987987
and MicroPython.)
988988
989-
* When building Python with ``--enable-optimizations`` now
989+
* When building Python with :option:`--enable-optimizations` now
990990
``-fno-semantic-interposition`` is added to both the compile and link line.
991-
This speeds builds of the Python interpreter created with ``--enable-shared``
991+
This speeds builds of the Python interpreter created with :option:`--enable-shared`
992992
with ``gcc`` by up to 30%. See `this article
993993
<https://developers.redhat.com/blog/2020/06/25/red-hat-enterprise-linux-8-2-brings-faster-python-3-8-run-speeds/>`_
994994
for more details. (Contributed by Victor Stinner and Pablo Galindo in
@@ -1300,11 +1300,12 @@ Build Changes
13001300
* The :mod:`atexit` module must now always be built as a built-in module.
13011301
(Contributed by Victor Stinner in :issue:`42639`.)
13021302
1303-
* Added ``--disable-test-modules`` option to the ``configure`` script:
1303+
* Added :option:`--disable-test-modules` option to the ``configure`` script:
13041304
don't build nor install test modules.
13051305
(Contributed by Xavier de Gaye, Thomas Petazzoni and Peixing Xin in :issue:`27640`.)
13061306
1307-
* Add ``--with-wheel-pkg-dir=PATH`` option to the ``./configure`` script. If
1307+
* Add :option:`--with-wheel-pkg-dir=PATH option <--with-wheel-pkg-dir>`
1308+
to the ``./configure`` script. If
13081309
specified, the :mod:`ensurepip` module looks for ``setuptools`` and ``pip``
13091310
wheel packages in this directory: if both are present, these wheel packages
13101311
are used instead of ensurepip bundled wheel packages.
@@ -1316,19 +1317,19 @@ Build Changes
13161317
13171318
(Contributed by Victor Stinner in :issue:`42856`.)
13181319
1319-
* Add a new configure ``--without-static-libpython`` option to not build the
1320-
``libpythonMAJOR.MINOR.a`` static library and not install the ``python.o``
1321-
object file.
1320+
* Add a new :option:`configure --without-static-libpython option
1321+
<--without-static-libpython>` to not build the ``libpythonMAJOR.MINOR.a``
1322+
static library and not install the ``python.o`` object file.
13221323
13231324
(Contributed by Victor Stinner in :issue:`43103`.)
13241325
13251326
* The ``configure`` script now uses the ``pkg-config`` utility, if available,
13261327
to detect the location of Tcl/Tk headers and libraries. As before, those
1327-
locations can be explicitly specified with the ``--with-tcltk-includes``
1328-
and ``--with-tcltk-libs`` configuration options.
1328+
locations can be explicitly specified with the :option:`--with-tcltk-includes`
1329+
and :option:`--with-tcltk-libs` configuration options.
13291330
(Contributed by Manolis Stamatogiannakis in :issue:`42603`.)
13301331
1331-
* Add ``--with-openssl-rpath`` option to ``configure`` script. The option
1332+
* Add :option:`--with-openssl-rpath` option to ``configure`` script. The option
13321333
simplifies building Python with a custom OpenSSL installation, e.g.
13331334
``./configure --with-openssl=/path/to/openssl --with-openssl-rpath=auto``.
13341335
(Contributed by Christian Heimes in :issue:`43466`.)
@@ -1405,8 +1406,8 @@ New Features
14051406
in debug mode because the :c:type:`PyObject` structure is the same in release
14061407
and debug mode since Python 3.8 (see :issue:`36465`).
14071408
1408-
The limited C API is still not supported in the ``--with-trace-refs`` special
1409-
build (``Py_TRACE_REFS`` macro).
1409+
The limited C API is still not supported in the :option:`--with-trace-refs`
1410+
special build (``Py_TRACE_REFS`` macro).
14101411
(Contributed by Victor Stinner in :issue:`43688`.)
14111412
14121413
* Add the :c:func:`Py_Is(x, y) <Py_Is>` function to test if the *x* object is

Doc/whatsnew/3.9.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,9 +1211,9 @@ Build Changes
12111211
non-system Tcl and Tk frameworks if they are installed in
12121212
``/Library/Frameworks``, as had been the case on older releases
12131213
of macOS. If a macOS SDK is explicitly configured, by using
1214-
``--enable-universalsdk=`` or ``-isysroot``, only the SDK itself is
1214+
:option:`--enable-universalsdk` or ``-isysroot``, only the SDK itself is
12151215
searched. The default behavior can still be overridden with
1216-
``--with-tcltk-includes`` and ``--with-tcltk-libs``.
1216+
:option:`--with-tcltk-includes` and :option:`--with-tcltk-libs`.
12171217
(Contributed by Ned Deily in :issue:`34956`.)
12181218

12191219
* Python can now be built for Windows 10 ARM64.

0 commit comments

Comments
 (0)