MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / run

Method run

tools/python-3.11.9-amd64/Lib/distutils/command/clean.py:49–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 ('bdist_base', 'bdist_base'))
48
49 def run(self):
50 # remove the build/temp.<plat> directory (unless it's already
51 # gone)
52 if os.path.exists(self.build_temp):
53 remove_tree(self.build_temp, dry_run=self.dry_run)
54 else:
55 log.debug("'%s' does not exist -- can't clean it",
56 self.build_temp)
57
58 if self.all:
59 # remove build directories
60 for directory in (self.build_lib,
61 self.bdist_base,
62 self.build_scripts):
63 if os.path.exists(directory):
64 remove_tree(directory, dry_run=self.dry_run)
65 else:
66 log.warn("'%s' does not exist -- can't clean it",
67 directory)
68
69 # just for the heck of it, try to remove the base build directory:
70 # we might have emptied it right now, but if not we don't care
71 if not self.dry_run:
72 try:
73 os.rmdir(self.build_base)
74 log.info("removing '%s'", self.build_base)
75 except OSError:
76 pass

Callers

nothing calls this directly

Calls 6

remove_treeFunction · 0.90
rmdirMethod · 0.80
existsMethod · 0.45
debugMethod · 0.45
warnMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected