FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Recommend `--config-cache` for `./configure` by johnslavik · Pull Request #1794 · python/devguide · GitHub

Repository navigation

21 changes: 17 additions & 4 deletions getting-started/setup-building.rst
Comment thread
johnslavik marked this conversation as resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ 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`` (equivalent to ``--cache-file=config.cache``, short: ``-C``)::

$ ./configure --config-cache --with-pydebug

This caches results in a :file:`config.cache` file. If you switch compilers or
significantly change your build environment, delete :file:`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.
Expand Down Expand Up @@ -864,7 +873,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
Expand All @@ -873,7 +883,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)" \
Expand All @@ -895,7 +906,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
Expand All @@ -904,7 +916,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``::

Expand Down
4 changes: 2 additions & 2 deletions index.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ instructions please see the :ref:`setup guide <setup>`.

.. 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

Expand Down
Loading

Back | FazBrowse Home | New Git URL