@@ -20,21 +20,25 @@ 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
39+ elif self .wheel_version is None :
40+ self .wheel_version = "none"
3541
36- self .no_pip = options .no_pip
37- self .no_setuptools = options .no_setuptools
3842 self .app_data = options .app_data
3943 self .periodic_update = not options .no_periodic_update
4044
@@ -83,15 +87,17 @@ def add_parser_arguments(cls, parser, interpreter, app_data): # noqa: ARG003
8387 default = [],
8488 )
8589 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" }:
8792 default = "none" # noqa: PLW2901
8893 if interpreter .version_info [:2 ] >= (3 , 9 ) and distribution == "wheel" :
89- continue
94+ default = None # noqa: PLW2901
95+ help_ = SUPPRESS
9096 parser .add_argument (
9197 f"--{ distribution } " ,
9298 dest = distribution ,
9399 metavar = "version" ,
94- help = f"version of { distribution } to install as seed: embed, bundle, none or exact version" ,
100+ help = help_ ,
95101 default = default ,
96102 )
97103 for distribution in cls .distributions ():
0 commit comments