Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gh-1547: Restructure --config-cache as optional speedup tip
  • Loading branch information
johnslavik committed Apr 22, 2026
commit 7e8285f0c7d30b13d906c84917273b901cdf47d7
16 changes: 10 additions & 6 deletions getting-started/setup-building.rst
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you click macOS from the front page:

See also more detailed instructions, how to install and build dependencies, and the platform-specific pages for Unix, macOS, and Windows.

That takes you to this tab:

https://cpython-devguide--1794.org.readthedocs.build/getting-started/setup-building/#macos

Which includes this (and a 3.10 version):

$ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
   GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \
   ./configure --with-pydebug \
               --with-openssl="$(brew --prefix openssl@3)"

Let's include --config-cache in those:

$ GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
   GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \
   ./configure --config-cache \
               --with-pydebug \
               --with-openssl="$(brew --prefix openssl@3)"

Copy link
Copy Markdown
Member Author

@johnslavik johnslavik Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I just reverted that in 69463e6. If you want me to add these back, I'll add.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add it back, it's good to have useful snippets because people will copy and paste them (at least I do :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added back to all 4 (brew, macports).

Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,20 @@ for development is to configure it and then compile it.

Configuration is typically::

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

The ``--config-cache`` (short: ``-C``, equivalent: ``--cache-file=config.cache``)
option speeds up repeated ``configure`` runs by caching results in a
``config.cache`` file. If you switch compilers or significantly change your
build environment, delete ``config.cache`` before re-running ``configure``.
$ ./configure --with-pydebug

More flags are available to ``configure``, but this is the minimum you should
do to get a pydebug build of CPython.

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.
Expand Down
Loading