diff --git a/getting-started/setup-building.rst b/getting-started/setup-building.rst index 110d718e95..60c7cbb859 100644 --- a/getting-started/setup-building.rst +++ b/getting-started/setup-building.rst @@ -197,6 +197,16 @@ Configuration is typically:: More flags are available to ``configure``, but this is the minimum you should do to get a pydebug build of CPython. +.. tip:: + To speed up repeated ``configure`` runs, use ``--config-cache`` (short: + ``-C``, equivalent: ``--cache-file=config.cache``):: + + $ ./configure --config-cache --with-pydebug + + This caches results in a ``config.cache`` file. If you switch compilers or + significantly change your build environment, delete ``config.cache`` before + re-running ``configure``. + .. note:: You might need to run ``make clean`` before or after re-running ``configure`` in a particular build directory. @@ -864,7 +874,8 @@ some of CPython's modules (for example, ``zlib``). $ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \ - ./configure --with-pydebug \ + ./configure --config-cache \ + --with-pydebug \ --with-openssl="$(brew --prefix openssl@3)" .. tab:: Python 3.10 @@ -873,7 +884,8 @@ some of CPython's modules (for example, ``zlib``). $ CPPFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \ LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib" \ - ./configure --with-pydebug \ + ./configure --config-cache \ + --with-pydebug \ --with-openssl="$(brew --prefix openssl@3)" \ --with-tcltk-libs="$(pkg-config --libs tcl tk)" \ --with-tcltk-includes="$(pkg-config --cflags tcl tk)" \ @@ -895,7 +907,8 @@ some of CPython's modules (for example, ``zlib``). $ GDBM_CFLAGS="-I$(dirname $(dirname $(which port)))/include" \ GDBM_LIBS="-L$(dirname $(dirname $(which port)))/lib -lgdbm" \ - ./configure --with-pydebug \ + ./configure --config-cache \ + --with-pydebug \ --with-system-libmpdec .. tab:: Python 3.11-3.12 @@ -904,7 +917,8 @@ some of CPython's modules (for example, ``zlib``). $ GDBM_CFLAGS="-I$(dirname $(dirname $(which port)))/include" \ GDBM_LIBS="-L$(dirname $(dirname $(which port)))/lib -lgdbm" \ - ./configure --with-pydebug + ./configure --config-cache \ + --with-pydebug And finally, run ``make``:: diff --git a/index.rst b/index.rst index 997f599327..75de6b405e 100644 --- a/index.rst +++ b/index.rst @@ -43,13 +43,13 @@ instructions please see the :ref:`setup guide `. .. code-block:: shell - ./configure --with-pydebug && make -j $(nproc) + ./configure --config-cache --with-pydebug && make -j $(nproc) .. tab:: macOS .. code-block:: shell - ./configure --with-pydebug && make -j8 + ./configure --config-cache --with-pydebug && make -j8 .. tab:: Windows