-
-
Notifications
You must be signed in to change notification settings - Fork 988
Recommend --config-cache for ./configure
#1794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
johnslavik
wants to merge
6
commits into
python:main
Choose a base branch
from
johnslavik:worktree-gh-1547-config-cache
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+20
−6
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
30a3410
gh-1547: Recommend --config-cache for configure
johnslavik 05ad04c
gh-1547: Also mention --cache-file=config.cache alias
johnslavik 69463e6
gh-1547: Remove --config-cache from platform-specific configure commands
johnslavik 7e8285f
gh-1547: Restructure --config-cache as optional speedup tip
johnslavik f9a2af1
gh-1547: Use tip admonition for --config-cache
johnslavik 091f2fc
gh-1547: Add --config-cache to macOS platform-specific configure comm…
johnslavik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
|---|---|---|
|
|
@@ -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``):: | ||
|
Comment on lines
+201
to
+202
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this saying
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. What I meant to say precisely is that |
||
|
|
||
| $ ./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``:: | ||
|
|
||
|
|
||
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:
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):
Let's include
--config-cachein those:Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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).