diff --git a/news/7294.feature.rst b/news/7294.feature.rst new file mode 100644 index 00000000000..ee459870210 --- /dev/null +++ b/news/7294.feature.rst @@ -0,0 +1,2 @@ +Build environment dependencies are no longer compiled to bytecode during +installation for a minor performance improvement. diff --git a/src/pip/_internal/build_env.py b/src/pip/_internal/build_env.py index e820dc3d5fb..746cd0950a8 100644 --- a/src/pip/_internal/build_env.py +++ b/src/pip/_internal/build_env.py @@ -242,6 +242,10 @@ def _install_requirements( prefix.path, "--no-warn-script-location", "--disable-pip-version-check", + # As the build environment is ephemeral, it's wasteful to + # pre-compile everything, especially as not every Python + # module will be used/compiled in most cases. + "--no-compile", # The prefix specified two lines above, thus # target from config file or env var should be ignored "--target",