()
| 23 | |
| 24 | |
| 25 | def _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 | |
| 41 | def _get_pip_whl_path_ctx(): |
no test coverage detected