@@ -20,21 +20,25 @@ def __init__(self, options) -> None:
20
20
21
21
self .pip_version = options .pip
22
22
self .setuptools_version = options .setuptools
23
- if hasattr (options , "wheel" ):
24
- # Python 3.8
25
- self .wheel_version = options .wheel
26
- self .no_wheel = options .no_wheel
27
- elif options .no_wheel :
23
+ self .wheel_version = options .wheel
24
+
25
+ self .no_pip = options .no_pip
26
+ self .no_setuptools = options .no_setuptools
27
+ self .no_wheel = options .no_wheel
28
+
29
+ if options .no_wheel or options .wheel : # and interpreter.version_info[:2] >= (3, 9)
28
30
warn (
29
- "The --no-wheel option is deprecated. "
30
- "It has no effect for Python >= 3.8 as wheel is no longer "
31
+ "The --no-wheel and -wheel options are deprecated. "
32
+ "They have no effect for Python >= 3.8 as wheel is no longer "
31
33
"bundled in virtualenv." ,
32
34
DeprecationWarning ,
33
35
stacklevel = 1 ,
34
36
)
37
+ self .wheel_version = "none"
38
+ self .no_wheel = True
39
+ elif self .wheel_version is None :
40
+ self .wheel_version = "none"
35
41
36
- self .no_pip = options .no_pip
37
- self .no_setuptools = options .no_setuptools
38
42
self .app_data = options .app_data
39
43
self .periodic_update = not options .no_periodic_update
40
44
@@ -83,15 +87,17 @@ def add_parser_arguments(cls, parser, interpreter, app_data): # noqa: ARG003
83
87
default = [],
84
88
)
85
89
for distribution , default in cls .distributions ().items ():
86
- if interpreter .version_info [:2 ] >= (3 , 12 ) and distribution == "setuptools" :
90
+ help_ = f"version of { distribution } to install as seed: embed, bundle, none or exact version"
91
+ if interpreter .version_info [:2 ] >= (3 , 12 ) and distribution in {"wheel" , "setuptools" }:
87
92
default = "none" # noqa: PLW2901
88
93
if interpreter .version_info [:2 ] >= (3 , 9 ) and distribution == "wheel" :
89
- continue
94
+ default = None # noqa: PLW2901
95
+ help_ = SUPPRESS
90
96
parser .add_argument (
91
97
f"--{ distribution } " ,
92
98
dest = distribution ,
93
99
metavar = "version" ,
94
- help = f"version of { distribution } to install as seed: embed, bundle, none or exact version" ,
100
+ help = help_ ,
95
101
default = default ,
96
102
)
97
103
for distribution in cls .distributions ():
0 commit comments