Skip to content

Commit 7c9a6b1

Browse files
committed
Remove _fix_abiflags from locations
It's no longer needed after commit 99d1322
1 parent 1c00ca3 commit 7c9a6b1

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/pip/_internal/locations/__init__.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pathlib
55
import sys
66
import sysconfig
7-
from typing import Any, Dict, Generator, Optional, Tuple
7+
from typing import Any, Dict, Optional
88

99
from pip._internal.models.scheme import SCHEME_KEYS, Scheme
1010
from pip._internal.utils.compat import WINDOWS
@@ -174,22 +174,6 @@ def _looks_like_msys2_mingw_scheme() -> bool:
174174
)
175175

176176

177-
def _fix_abiflags(parts: Tuple[str]) -> Generator[str, None, None]:
178-
ldversion = sysconfig.get_config_var("LDVERSION")
179-
abiflags = getattr(sys, "abiflags", None)
180-
181-
# LDVERSION does not end with sys.abiflags. Just return the path unchanged.
182-
if not ldversion or not abiflags or not ldversion.endswith(abiflags):
183-
yield from parts
184-
return
185-
186-
# Strip sys.abiflags from LDVERSION-based path components.
187-
for part in parts:
188-
if part.endswith(ldversion):
189-
part = part[: (0 - len(abiflags))]
190-
yield part
191-
192-
193177
@functools.lru_cache(maxsize=None)
194178
def _warn_mismatched(old: pathlib.Path, new: pathlib.Path, *, key: str) -> None:
195179
issue_url = "https://github.com/pypa/pip/issues/10151"

0 commit comments

Comments
 (0)