diff --git a/contrib/code/setup.rst b/contrib/code/setup.rst index 2d14bb0d9..7f6f0a9c6 100644 --- a/contrib/code/setup.rst +++ b/contrib/code/setup.rst @@ -10,3 +10,23 @@ Setup and building [More setup and build instructions specifically for code contributors, building on the basics from the :ref:`Getting Started ` section.] + +.. _configure-cache: + +Using Configure Cache (`configure -C`) +-------------------------------------- + +### Overview +When running `./configure`, CPython performs a series of system checks to detect platform-specific settings. These checks can be time-consuming, especially for repeated builds. + +By using **configure cache (`-C`)**, you can store previous configuration results, reducing redundant checks and **significantly speeding up build times**. + +### Benefits of `configure -C` +- **Faster rebuilds**: Skips redundant system checks, improving efficiency. +- **Improves development workflow**: Optimizes the edit-configure-build-test cycle. +- **Reduces system load**: Avoids unnecessary reconfigurations. + +### How to Use `configure -C` +To enable caching, run: +```sh +./configure -C \ No newline at end of file diff --git a/developer-workflow/extension-modules.rst b/developer-workflow/extension-modules.rst index 61c1ff08a..2fef38de1 100644 --- a/developer-workflow/extension-modules.rst +++ b/developer-workflow/extension-modules.rst @@ -275,6 +275,27 @@ Now that we have added our extension module to the CPython source tree, we need to update some configuration files in order to compile the CPython project on different platforms. +------------------------------------- + +.. _configure-cache: + +Using Configure Cache (`configure -C`) +-------------------------------------- + +### Overview +When running `./configure`, CPython performs a series of system checks to detect platform-specific settings. These checks can be time-consuming, especially for repeated builds. + +By using **configure cache (`-C`)**, you can store previous configuration results, reducing redundant checks and **significantly speeding up build times**. + +### Benefits of `configure -C` +- **Faster rebuilds**: Skips redundant system checks, improving efficiency. +- **Improves development workflow**: Optimizes the edit-configure-build-test cycle. +- **Reduces system load**: Avoids unnecessary reconfigurations. + +### How to Use `configure -C` +To enable caching, run: +```sh +./configure -C Updating ``Modules/Setup.{bootstrap,stdlib}.in`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^