From 8ce10b553e184b131f374f478e5b20eb3b39e05f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 10 Sep 2023 12:55:47 +0200 Subject: [PATCH 1/3] gh-109054: Document configue variables --- Doc/library/hashlib.rst | 2 + Doc/using/configure.rst | 149 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst index eb650c180ddbb4..761dd84edee299 100644 --- a/Doc/library/hashlib.rst +++ b/Doc/library/hashlib.rst @@ -364,6 +364,8 @@ include a `salt `_. .. versionadded:: 3.6 +.. _hashlib-blake2: + BLAKE2 ------ diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index 9d2952e0df95b8..ffbf7a67d97602 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -289,6 +289,136 @@ General Options .. versionadded:: 3.13 +.. cmdoption:: PKG_CONFIG + + Path to ``pkg-config`` utility. + +.. cmdoption:: PKG_CONFIG_LIBDIR +.. cmdoption:: PKG_CONFIG_PATH + + ``pkg-config`` options. + + +C compiler options +------------------ + +.. cmdoption:: CC + + C compiler command. + +.. cmdoption:: CFLAGS + + C compiler flags. + +.. cmdoption:: CPP + + C preprocessor command. + +.. cmdoption:: CPPFLAGS + + C preprocessor flags, e.g. ``-I``. + + +Linker options +-------------- + +.. cmdoption:: LDFLAGS + + Linker flags, e.g. :samp:`-L{library_directory}`. + +.. cmdoption:: LIBS + + Libraries to pass to the linker, e.g. :samp:`-l{library}`. + +.. cmdoption:: MACHDEP + + Name for machine-dependent library files. + + +Options for third-party dependencies +------------------------------------ + +.. versionadded:: 3.11 + +.. cmdoption:: BZIP2_CFLAGS +.. cmdoption:: BZIP2_LIBS + + C compiler and linker flags to link Python to ``libbz2``, used by :mod:`bz2` + module, overriding ``pkg-config``. + +.. cmdoption:: CURSES_CFLAGS +.. cmdoption:: CURSES_LIBS + + C compiler and linker flags for ``libncurses`` or ``libncursesw``, used by + :mod:`curses` module, overriding ``pkg-config``. + +.. cmdoption:: GDBM_CFLAGS +.. cmdoption:: GDBM_LIBS + + C compiler and linker flags for ``gdbm``. + +.. cmdoption:: LIBB2_CFLAGS +.. cmdoption:: LIBB2_LIBS + + C compiler and linker flags for ``libb2`` (:ref:`BLAKE2 `), + used by :mod:`hashlib` module, overriding ``pkg-config``. + +.. cmdoption:: LIBEDIT_CFLAGS +.. cmdoption:: LIBEDIT_LIBS + + C compiler and linker flags for ``libedit``, used by :mod:`readline` module, + overriding ``pkg-config``. + +.. cmdoption:: LIBFFI_CFLAGS +.. cmdoption:: LIBFFI_LIBS + + C compiler and linker flags for ``libffi``, used by :mod:`ctypes` module, + overriding ``pkg-config``. + +.. cmdoption:: LIBLZMA_CFLAGS +.. cmdoption:: LIBLZMA_LIBS + + C compiler and linker flags for ``liblzma``, used by :mod:`lzma` module, + overriding ``pkg-config``. + +.. cmdoption:: LIBREADLINE_CFLAGS +.. cmdoption:: LIBREADLINE_LIBS + + C compiler and linker flags for ``libreadline``, used by :mod:`readline` + module, overriding ``pkg-config``. + +.. cmdoption:: LIBSQLITE3_CFLAGS +.. cmdoption:: LIBSQLITE3_LIBS + + C compiler and linker flags for ``libsqlite3``, used by :mod:`sqlite3` + module, overriding ``pkg-config``. + +.. cmdoption:: LIBUUID_CFLAGS +.. cmdoption:: LIBUUID_LIBS + + C compiler and linker flags for ``liuuid``, used by :mod:`uuid` module, + overriding ``pkg-config``. + +.. cmdoption:: PANEL_CFLAGS +.. cmdoption:: PANEL_LIBS + + C compiler and Linker flags for PANEL, overriding ``pkg-config``. + + C compiler and linker flags for ``libpanel`` or ``libpanelw``, used by + :mod:`curses.panel` module, overriding ``pkg-config``. + +.. cmdoption:: TCLTK_CFLAGS +.. cmdoption:: TCLTK_LIBS + + C compiler and linker flags for TCLTK, overriding ``pkg-config``. + +.. cmdoption:: ZLIB_CFLAGS +.. cmdoption:: ZLIB_LIBS + + C compiler and linker flags for ``libzlib``, used by :mod:`gzip` module, + overriding ``pkg-config``. + + WebAssembly Options ------------------- @@ -428,6 +558,19 @@ also be used to improve performance. .. versionadded:: 3.12 +.. cmdoption:: BOLT_APPLY_FLAGS + + Arguments to ``llvm-bolt`` when creating a `BOLT optimized binary + `_. + + .. versionadded:: 3.12 + +.. cmdoption:: BOLT_INSTRUMENT_FLAGS + + Arguments to ``llvm-bolt`` when instrumenting binaries. + + .. versionadded:: 3.12 + .. cmdoption:: --with-computed-gotos Enable computed gotos in evaluation loop (enabled by default on supported @@ -775,6 +918,12 @@ the version of the cross compiled host Python. ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no +.. cmdoption:: HOSTRUNNER + + Program to run CPython for the host platform for cross-compilation. + + .. versionadded:: 3.11 + Cross compiling example:: From ffba3d0457ec55fd0aaf84abf5163500eef40939 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 19 Sep 2023 14:54:58 +0200 Subject: [PATCH 2/3] Update Doc/using/configure.rst Co-authored-by: Ezio Melotti --- Doc/using/configure.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index ffbf7a67d97602..ec3a65610d3b90 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -316,7 +316,7 @@ C compiler options .. cmdoption:: CPPFLAGS - C preprocessor flags, e.g. ``-I``. + C preprocessor flags, e.g. :samp:`-I{include_dir}`. Linker options From dabc4360d3c5ce6fb6c778a9367419e7f552a01d Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 20 Sep 2023 07:42:21 +0200 Subject: [PATCH 3/3] Update Doc/using/configure.rst Co-authored-by: Ezio Melotti --- Doc/using/configure.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index ec3a65610d3b90..16ed33dbcced15 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -396,7 +396,7 @@ Options for third-party dependencies .. cmdoption:: LIBUUID_CFLAGS .. cmdoption:: LIBUUID_LIBS - C compiler and linker flags for ``liuuid``, used by :mod:`uuid` module, + C compiler and linker flags for ``libuuid``, used by :mod:`uuid` module, overriding ``pkg-config``. .. cmdoption:: PANEL_CFLAGS