Bug 1439727 - Also delete .pyd files; r?build
`mach clobber python` is supposed to remove autogenerated Python files.
Let's add .pyd files (compiled C extensions on Windows) to the list
for good measure.
MozReview-Commit-ID: EbHvBYB7hj3
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -357,21 +357,21 @@ class Clobber(MachCommandBase):
self.log(logging.ERROR, 'file_access_error', {'error': e},
"Could not clobber because a file was in use. If the "
"application is running, try closing it. {error}")
return 1
raise
if 'python' in what:
if conditions.is_hg(self):
- cmd = ['hg', 'purge', '--all', '-I', 'glob:**.py[co]']
+ cmd = ['hg', 'purge', '--all', '-I', 'glob:**.py[cdo]']
elif conditions.is_git(self):
- cmd = ['git', 'clean', '-f', '-x', '*.py[co]']
+ cmd = ['git', 'clean', '-f', '-x', '*.py[cdo]']
else:
- cmd = ['find', '.', '-type', 'f', '-name', '*.py[co]', '-delete']
+ cmd = ['find', '.', '-type', 'f', '-name', '*.py[cdo]', '-delete']
ret = subprocess.call(cmd, cwd=self.topsrcdir)
return ret
@property
def substs(self):
try:
return super(Clobber, self).substs
except BuildEnvironmentNotFoundException: