@@ -20,21 +20,23 @@ def __init__(self, options) -> None:
2020
2121 self .pip_version = options .pip
2222 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)
2830 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 "
3133 "bundled in virtualenv." ,
3234 DeprecationWarning ,
3335 stacklevel = 1 ,
3436 )
37+ self .wheel_version = "none"
38+ self .no_wheel = True
3539
36- self .no_pip = options .no_pip
37- self .no_setuptools = options .no_setuptools
3840 self .app_data = options .app_data
3941 self .periodic_update = not options .no_periodic_update
4042
@@ -83,15 +85,17 @@ def add_parser_arguments(cls, parser, interpreter, app_data): # noqa: ARG003
8385 default = [],
8486 )
8587 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" }:
8790 default = "none" # noqa: PLW2901
8891 if interpreter .version_info [:2 ] >= (3 , 9 ) and distribution == "wheel" :
89- continue
92+ default = None # noqa: PLW2901
93+ help_ = SUPPRESS
9094 parser .add_argument (
9195 f"--{ distribution } " ,
9296 dest = distribution ,
9397 metavar = "version" ,
94- help = f"version of { distribution } to install as seed: embed, bundle, none or exact version" ,
98+ help = help_ ,
9599 default = default ,
96100 )
97101 for distribution in cls .distributions ():
0 commit comments