File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,12 @@ class Command(_Command):
167
167
command_consumes_arguments = False
168
168
distribution : Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
169
169
170
+ dry_run = False
171
+ """
172
+ For compatibility with vendored bdist_wheel.
173
+ https://github.com/pypa/setuptools/pull/4872/files#r1986395142
174
+ """
175
+
170
176
def __init__ (self , dist : Distribution , ** kw ) -> None :
171
177
"""
172
178
Construct the command for dist, updating
Original file line number Diff line number Diff line change @@ -440,10 +440,11 @@ def run(self):
440
440
441
441
if not self .keep_temp :
442
442
log .info (f"removing { self .bdist_dir } " )
443
- if sys .version_info < (3 , 12 ):
444
- rmtree (self .bdist_dir , onerror = remove_readonly )
445
- else :
446
- rmtree (self .bdist_dir , onexc = remove_readonly_exc )
443
+ if not self .dry_run :
444
+ if sys .version_info < (3 , 12 ):
445
+ rmtree (self .bdist_dir , onerror = remove_readonly )
446
+ else :
447
+ rmtree (self .bdist_dir , onexc = remove_readonly_exc )
447
448
448
449
def write_wheelfile (
449
450
self , wheelfile_base , generator = "bdist_wheel (" + wheel_version + ")"
You can’t perform that action at this time.
0 commit comments