@@ -20,21 +20,23 @@ 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
35
39
36
- self .no_pip = options .no_pip
37
- self .no_setuptools = options .no_setuptools
38
40
self .app_data = options .app_data
39
41
self .periodic_update = not options .no_periodic_update
40
42
@@ -83,15 +85,17 @@ def add_parser_arguments(cls, parser, interpreter, app_data): # noqa: ARG003
83
85
default = [],
84
86
)
85
87
for distribution , default in cls .distributions ().items ():
86
- if interpreter .version_info [:2 ] >= (3 , 12 ) and distribution == "setuptools" :
88
+ help_ = f"version of { distribution } to install as seed: embed, bundle, none or exact version"
89
+ if interpreter .version_info [:2 ] >= (3 , 12 ) and distribution in {"wheel" , "setuptools" }:
87
90
default = "none" # noqa: PLW2901
88
91
if interpreter .version_info [:2 ] >= (3 , 9 ) and distribution == "wheel" :
89
- continue
92
+ default = None # noqa: PLW2901
93
+ help_ = SUPPRESS
90
94
parser .add_argument (
91
95
f"--{ distribution } " ,
92
96
dest = distribution ,
93
97
metavar = "version" ,
94
- help = f"version of { distribution } to install as seed: embed, bundle, none or exact version" ,
98
+ help = help_ ,
95
99
default = default ,
96
100
)
97
101
for distribution in cls .distributions ():
0 commit comments