[libvirt] [PATCH 10/25] docs: apibuild: remove old code paths

Pavel Hrdina phrdina at redhat.com
Mon Oct 21 08:00:35 UTC 2019


There is no need to keep old compatibility code around as it it will
never be used in our current source tree.

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 docs/apibuild.py | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/docs/apibuild.py b/docs/apibuild.py
index e79ead0b53..d3d0be2d83 100755
--- a/docs/apibuild.py
+++ b/docs/apibuild.py
@@ -2543,25 +2543,15 @@ class app:
         builder = None
         srcdir = os.path.abspath((os.environ["srcdir"]))
         builddir = os.path.abspath((os.environ["builddir"]))
-        if srcdir == builddir:
-            builddir = None
         if glob.glob(srcdir + "/../src/libvirt.c") != []:
             if not quiet:
                 print("Rebuilding API description for %s" % name)
             dirs = [srcdir + "/../src",
                     srcdir + "/../src/admin",
                     srcdir + "/../src/util",
-                    srcdir + "/../include/libvirt"]
-            if (builddir and
-                not os.path.exists(srcdir + "/../include/libvirt/libvirt-common.h")):
-                dirs.append(builddir + "/../include/libvirt")
+                    srcdir + "/../include/libvirt",
+                    builddir + "/../include/libvirt"]
             builder = docBuilder(name, srcdir, dirs, [])
-        elif glob.glob("src/libvirt.c") != []:
-            if not quiet:
-                print("Rebuilding API description for %s" % name)
-            builder = docBuilder(name, srcdir,
-                                 ["src", "src/util", "include/libvirt"],
-                                 [])
         else:
             self.warning("rebuild() failed, unable to guess the module")
             return None
-- 
2.21.0




More information about the libvir-list mailing list