MCPcopy Create free account
hub / github.com/python/cpython / _find_wheel_pkg_dir_pip

Function _find_wheel_pkg_dir_pip

Lib/ensurepip/__init__.py:26–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25
26def _find_wheel_pkg_dir_pip():
27 if _WHEEL_PKG_DIR is None:
28 # NOTE: The compile-time `WHEEL_PKG_DIR` is unset so there is no place
29 # NOTE: for looking up the wheels.
30 return None
31
32 dist_matching_wheels = _WHEEL_PKG_DIR.glob('pip-*.whl')
33 try:
34 last_matching_dist_wheel = sorted(dist_matching_wheels)[-1]
35 except IndexError:
36 # NOTE: `WHEEL_PKG_DIR` does not contain any wheel files for `pip`.
37 return None
38
39 return nullcontext(last_matching_dist_wheel)
40
41
42def _get_pip_whl_path_ctx():

Callers 1

_get_pip_whl_path_ctxFunction · 0.85

Calls 2

nullcontextClass · 0.90
globMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…