kuuko pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=69345c82d69a8b57026dacc6a71906fc4b56faa0

commit 69345c82d69a8b57026dacc6a71906fc4b56faa0
Author: Kai Huuhko <kai.huu...@gmail.com>
Date:   Tue Apr 29 12:19:14 2014 +0300

    api_coverage.py: Only consider legacy header files for API comparison
---
 api_coverage.py | 31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/api_coverage.py b/api_coverage.py
index 4ab90e0..b0105b3 100755
--- a/api_coverage.py
+++ b/api_coverage.py
@@ -85,6 +85,8 @@ def get_capis(inc_path, prefix):
 
     for path, dirs, files in os.walk(inc_path):
         for f in files:
+            if not f.endswith("legacy.h"):
+                continue
             open_args = (os.path.join(path, f),)
             open_kwargs = dict(mode="r")
             if sys.version_info[0] > 2: open_kwargs["encoding"] = "UTF-8"
@@ -106,20 +108,21 @@ def get_pyapis(pxd_path, header_name, prefix):
 
     for path, dirs, files in os.walk(pxd_path):
         for f in files:
-            if f.endswith(".pxd"):
-                open_args = (os.path.join(path, f),)
-                open_kwargs = dict(mode="r")
-                if sys.version_info[0] > 2: open_kwargs["encoding"] = "UTF-8"
-
-                with open(*open_args, **open_kwargs) as pxd:
-                    pyapi = pxd.read()
-
-                    cdef = re.search(pyapi_pattern1, pyapi)
-                    if cdef:
-                        matches = re.finditer(pyapi_pattern2, cdef.group(2))
-                        for match in matches:
-                            func = match.group(1)
-                            pyapis.append(func)
+            if not f.endswith(".pxd"):
+                continue
+            open_args = (os.path.join(path, f),)
+            open_kwargs = dict(mode="r")
+            if sys.version_info[0] > 2: open_kwargs["encoding"] = "UTF-8"
+
+            with open(*open_args, **open_kwargs) as pxd:
+                pyapi = pxd.read()
+
+                cdef = re.search(pyapi_pattern1, pyapi)
+                if cdef:
+                    matches = re.finditer(pyapi_pattern2, cdef.group(2))
+                    for match in matches:
+                        func = match.group(1)
+                        pyapis.append(func)
 
     return pyapis
 

-- 


Reply via email to