Skip to content

Recommend --config-cache for ./configure#1794

Open
johnslavik wants to merge 6 commits intopython:mainfrom
johnslavik:worktree-gh-1547-config-cache
Open

Recommend --config-cache for ./configure#1794
johnslavik wants to merge 6 commits intopython:mainfrom
johnslavik:worktree-gh-1547-config-cache

Conversation

@johnslavik
Copy link
Copy Markdown
Member

Closes #1547.

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented Apr 22, 2026

Add ``--config-cache`` to all relevant ``./configure`` invocations in
the front page and setup-building guide, matching what the WASM
commands already do. Add a brief explanation noting that ``config.cache``
should be deleted when switching compilers or significantly changing
the build environment.
@johnslavik johnslavik force-pushed the worktree-gh-1547-config-cache branch from fa25256 to 05ad04c Compare April 22, 2026 12:22
@johnslavik

This comment was marked as resolved.

@johnslavik

This comment was marked as resolved.

@johnslavik
Copy link
Copy Markdown
Member Author

johnslavik commented Apr 22, 2026

OK now I'm in love with what I'm seeing

Comment on lines +201 to +202
To speed up repeated ``configure`` runs, use ``--config-cache`` (short:
``-C``, equivalent: ``--cache-file=config.cache``)::
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.

Is this saying -C is short for --cache-file=config.cache?

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.

Yes. What I meant to say precisely is that -C = --config-cache = --config-file=config.cache.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recommend --config-cache for configure

2 participants