Make (install from source) python without running tests

The configure option --enable-optimizations enables running test suites to generate data for profiling Python. The resulting python binary has better performance in executing python code. Improvements noted here

From configure help:
--enable-optimizations  Enable expensive optimizations (PGO, etc). Disabled by default.

From wikipedia

 profile-guided optimisation uses the results of profiling test runs of the instrumented program to optimize the final generated code.

In short, you should not skip tests when using --enable-optimizations as the data required for profiling is generated by running tests. You can run make -j8 build_all followed by make -j8 install to skip tests once(the tests would still run with install target), but that would defeat the purpose. You can instead drop the configure flag for better build times.


just build and install with

make -j8 build_all
make -j8 altinstall