File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 33import sys
44import sysconfig
55import tempfile
6- from contextlib import nullcontext , suppress
6+ from contextlib import nullcontext
77from importlib import resources
88from pathlib import Path
99from shutil import copy2
2424
2525def _find_wheel_pkg_dir_pip ():
2626 if _WHEEL_PKG_DIR is None :
27- raise LookupError (
28- 'The compile-time `WHEEL_PKG_DIR` is unset so there is '
29- 'no place for looking up the wheels.' ,
30- ) from None
31-
27+ return None
3228
3329 dist_matching_wheels = _WHEEL_PKG_DIR .glob (f'pip-*.whl' )
3430 try :
@@ -43,8 +39,8 @@ def _find_wheel_pkg_dir_pip():
4339
4440def _get_pip_whl_path_ctx ():
4541 # Prefer pip from the wheel package directory, if present.
46- with suppress ( LookupError ) :
47- return _find_wheel_pkg_dir_pip ()
42+ if ( alternative_pip_wheel_path := _find_wheel_pkg_dir_pip ()) is not None :
43+ return alternative_pip_wheel_path
4844
4945 return resources .as_file (
5046 resources .files ('ensurepip' )
You can’t perform that action at this time.
0 commit comments