Skip to content

Commit

Permalink
Kill location warning for Python in source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Sep 22, 2021
1 parent b55ec00 commit 24dd2df
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pip/_internal/locations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,17 @@ def get_scheme(
if skip_msys2_mingw_bug:
continue

# CPython's POSIX install script invokes pip (via ensurepip) against the
# interpreter located in the source tree, not the install site. This
# triggers special logic in sysconfig that's not present in distutils.
skip_cpython_build = (
sysconfig.is_python_build(check_home=True)
and not WINDOWS
and k in ("headers", "include", "platinclude")
)
if skip_cpython_build:
continue

warning_contexts.append((old_v, new_v, f"scheme.{k}"))

if not warning_contexts:
Expand Down

0 comments on commit 24dd2df

Please sign in to comment.