makeapi, makeaci: do not fail on missing imports

Add import hook to makeapi and makeaci which makes them ignore import
errors in modules in our source tree and instead print a warning.

This makes it possible to build IPA without having to have most of our
runtime dependencies installed.

https://fedorahosted.org/freeipa/ticket/6418

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Jan Cholasta
2016-10-24 14:11:08 +02:00
committed by David Kupka
parent 0b91735c79
commit 9b53423815
4 changed files with 102 additions and 11 deletions
+2
View File
@@ -30,6 +30,8 @@ import sys
import difflib
from argparse import ArgumentParser
import ignore_import_errors # pylint: disable=unused-import
from ipalib import api
from ipapython.dn import DN
from ipapython.ipaldap import LDAPClient