MCPcopy Index your code
hub / github.com/RustPython/RustPython / _find_wheel_pkg_dir_pip

Function _find_wheel_pkg_dir_pip

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

Source from the content-addressed store, hash-verified

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

Callers 1

_get_pip_whl_path_ctxFunction · 0.85

Calls 3

nullcontextClass · 0.90
sortedFunction · 0.85
globMethod · 0.45

Tested by

no test coverage detected