diff --git a/doc/mk_api_doc.py b/doc/mk_api_doc.py index 3a2343803..a944f2c65 100644 --- a/doc/mk_api_doc.py +++ b/doc/mk_api_doc.py @@ -288,7 +288,14 @@ try: # Put z3py at the beginning of the search path to try to avoid picking up # an installed copy of Z3py. sys.path.insert(0, os.path.dirname(Z3PY_PACKAGE_PATH)) - sys.path.insert(0, os.path.dirname(BUILD_DIR)) + + if sys.version < '3': + import __builtin__ + __builtin__.Z3_LIB_DIRS = [ BUILD_DIR ] + else: + import builtins + builtins.Z3_LIB_DIRS = [ BUILD_DIR ] + for modulename in ( 'z3', 'z3.z3consts',