Skip to content

Commit

Permalink
Merge pull request #13195 from ichard26/truststore-hotfix
Browse files Browse the repository at this point in the history
Don't pass --cert to build subprocesses unless also given on CLI
  • Loading branch information
sbidoul authored Feb 1, 2025
2 parents f5ff4fa + 519c212 commit 028c087
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions news/13186.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix regression where truststore would never be used while installing build dependencies.
5 changes: 2 additions & 3 deletions src/pip/_internal/build_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from types import TracebackType
from typing import TYPE_CHECKING, Iterable, List, Optional, Set, Tuple, Type, Union

from pip._vendor.certifi import where
from pip._vendor.packaging.version import Version

from pip import __file__ as pip_location
Expand Down Expand Up @@ -246,8 +245,6 @@ def _install_requirements(
# target from config file or env var should be ignored
"--target",
"",
"--cert",
finder.custom_cert or where(),
]
if logger.getEffectiveLevel() <= logging.DEBUG:
args.append("-vv")
Expand Down Expand Up @@ -276,6 +273,8 @@ def _install_requirements(
args.extend(["--proxy", finder.proxy])
for host in finder.trusted_hosts:
args.extend(["--trusted-host", host])
if finder.custom_cert:
args.extend(["--cert", finder.custom_cert])
if finder.client_cert:
args.extend(["--client-cert", finder.client_cert])
if finder.allow_all_prereleases:
Expand Down

0 comments on commit 028c087

Please sign in to comment.