File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,12 @@ class Command(_Command):
167167 command_consumes_arguments = False
168168 distribution : Distribution # override distutils.dist.Distribution with setuptools.dist.Distribution
169169
170+ dry_run = False
171+ """
172+ For compatibility with vendored bdist_wheel.
173+ https://github.com/pypa/setuptools/pull/4872/files#r1986395142
174+ """
175+
170176 def __init__ (self , dist : Distribution , ** kw ) -> None :
171177 """
172178 Construct the command for dist, updating
Original file line number Diff line number Diff line change @@ -440,10 +440,11 @@ def run(self):
440440
441441 if not self .keep_temp :
442442 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 )
447448
448449 def write_wheelfile (
449450 self , wheelfile_base , generator = "bdist_wheel (" + wheel_version + ")"
You can’t perform that action at this time.
0 commit comments