11
11
from pip ._internal .utils .deprecation import deprecated
12
12
from pip ._internal .utils .virtualenv import running_under_virtualenv
13
13
14
- from . import _distutils , _sysconfig
14
+ from . import _sysconfig
15
15
from .base import (
16
16
USER_CACHE_DIR ,
17
17
get_major_minor_version ,
@@ -241,6 +241,8 @@ def get_scheme(
241
241
if _USE_SYSCONFIG :
242
242
return new
243
243
244
+ from . import _distutils
245
+
244
246
old = _distutils .get_scheme (
245
247
dist_name ,
246
248
user = user ,
@@ -405,6 +407,8 @@ def get_bin_prefix() -> str:
405
407
if _USE_SYSCONFIG :
406
408
return new
407
409
410
+ from . import _distutils
411
+
408
412
old = _distutils .get_bin_prefix ()
409
413
if _warn_if_mismatch (pathlib .Path (old ), pathlib .Path (new ), key = "bin_prefix" ):
410
414
_log_context ()
@@ -438,6 +442,8 @@ def get_purelib() -> str:
438
442
if _USE_SYSCONFIG :
439
443
return new
440
444
445
+ from . import _distutils
446
+
441
447
old = _distutils .get_purelib ()
442
448
if _looks_like_deb_system_dist_packages (old ):
443
449
return old
@@ -452,6 +458,8 @@ def get_platlib() -> str:
452
458
if _USE_SYSCONFIG :
453
459
return new
454
460
461
+ from . import _distutils
462
+
455
463
old = _distutils .get_platlib ()
456
464
if _looks_like_deb_system_dist_packages (old ):
457
465
return old
@@ -480,6 +488,8 @@ def get_prefixed_libs(prefix: str) -> List[str]:
480
488
if _USE_SYSCONFIG :
481
489
return _deduplicated (new_pure , new_plat )
482
490
491
+ from . import _distutils
492
+
483
493
old_pure , old_plat = _distutils .get_prefixed_libs (prefix )
484
494
old_lib_paths = _deduplicated (old_pure , old_plat )
485
495
0 commit comments