# HG changeset patch # User timeless@mozdev.org # Date 1441224455 14400 # Node ID bb6936bec727955aeeff8063a72c694c1733e604 # Parent 927c0d84e09fd5cd75c8041ba42f5d6982def534 import-checker: accept .pyc and .pyo files (issue4812) Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin $ ls '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6'/BaseHTTPServer.py* /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.pyc /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.pyo diff -r 927c0d84e09f -r bb6936bec727 contrib/import-checker.py --- a/contrib/import-checker.py Tue Sep 01 21:37:51 2015 +0200 +++ b/contrib/import-checker.py Wed Sep 02 16:07:35 2015 -0400 @@ -200,7 +200,10 @@ for name in files: if name == '__init__.py': continue - if not (name.endswith('.py') or name.endswith('.so') + if not (name.endswith('.py') + or name.endswith('.so') + or name.endswith('.pyc') + or name.endswith('.pyo') or name.endswith('.pyd')): continue full_path = os.path.join(top, name)