Skip to content

Commit

Permalink
Allow to decide whether to use distutils or sysconfig with sysconfig.…
Browse files Browse the repository at this point in the history
…_PIP_USE_SYSCONFIG

Fixes pypa#10647
  • Loading branch information
hroncok committed Nov 19, 2021
1 parent 4cdb516 commit 63d0d71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pip/_internal/locations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@

_PLATLIBDIR: str = getattr(sys, "platlibdir", "lib")

_USE_SYSCONFIG = sys.version_info >= (3, 10)
# By default, we use sysconfig on Python 3.10+
# But Python distributors can override this decision by setting:
# sysconfig._PIP_USE_SYSCONFIG = True / False
# Rationale in https://github.com/pypa/pip/issues/10647
_USE_SYSCONFIG = getattr(sysconfig, "_PIP_USE_SYSCONFIG", sys.version_info >= (3, 10))


def _looks_like_bpo_44860() -> bool:
Expand Down

0 comments on commit 63d0d71

Please sign in to comment.