We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 815ebae commit 26416a4Copy full SHA for 26416a4
templates/default.py
@@ -49,11 +49,7 @@ def include_setuptools(args):
49
"""
50
cli = not args.no_setuptools
51
env = not os.environ.get("PIP_NO_SETUPTOOLS")
52
- try:
53
- importlib.import_module("setuptools")
54
- absent = False
55
- except ImportError:
56
- absent = True
+ absent = not importlib.util.find_spec("setuptools")
57
return cli and env and absent
58
59
@@ -63,11 +59,7 @@ def include_wheel(args):
63
64
60
cli = not args.no_wheel
65
61
env = not os.environ.get("PIP_NO_WHEEL")
66
67
- importlib.import_module("wheel")
68
69
70
62
+ absent = not importlib.util.find_spec("wheel")
71
72
73
0 commit comments