From cbd0569e4544c6fa9b252145dec493b3694c58c5 Mon Sep 17 00:00:00 2001
From: david-sarah <david-sarah@jacaranda.org>
Date: Wed, 12 Oct 2011 16:36:09 -0700
Subject: [PATCH] misc/check-interfaces.py: print a warning if a .pyc or .pyo
 file exists without a corresponding .py file.

---
 misc/coding_tools/check-interfaces.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/misc/coding_tools/check-interfaces.py b/misc/coding_tools/check-interfaces.py
index 8d648716..15e7d99b 100644
--- a/misc/coding_tools/check-interfaces.py
+++ b/misc/coding_tools/check-interfaces.py
@@ -65,6 +65,10 @@ def check():
     for (dirpath, dirnames, filenames) in os.walk(srcdir):
         for fn in filenames:
             (basename, ext) = os.path.splitext(fn)
+            if ext in ('.pyc', '.pyo') and not os.path.exists(os.path.join(dirpath, basename+'.py')):
+                print >>sys.stderr, ("Warning: no .py source file for %r.\n"
+                                     % (os.path.join(dirpath, fn),))
+
             if ext == '.py' and not excluded_file_basenames.match(basename):
                 relpath = os.path.join(dirpath[len(srcdir)+1:], basename)
                 module = relpath.replace(os.sep, '/').replace('/', '.')
-- 
2.45.2