Bug 1439727 - Also delete .pyd files; r?build draft
authorGregory Szorc <gps@mozilla.com>
Wed, 07 Mar 2018 08:44:18 -0800
changeset 764316 11ce370649f09ddcb592350f5290e90301309b56
parent 764272 493e45400842b6ccfffb63b58b40b33a0b8154ab
child 764317 78d0267c15f7960520c899e80cd824b21f258bdc
push id101735
push userbmo:gps@mozilla.com
push dateWed, 07 Mar 2018 17:00:03 +0000
reviewersbuild
bugs1439727
milestone60.0a1
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
python/mozbuild/mozbuild/mach_commands.py
--- 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: