From b736e69a88d3caf288f55216830a37df3b2da57c 2010-04-25 05:05:44 From: Fernando Perez Date: 2010-04-25 05:05:44 Subject: [PATCH] Generate docs correctly if pexpect is not available. Closes https://bugs.launchpad.net/ipython/+bug/462839 --- diff --git a/docs/autogen_api.py b/docs/autogen_api.py index 0efc8b6..d098700 100755 --- a/docs/autogen_api.py +++ b/docs/autogen_api.py @@ -58,6 +58,15 @@ if __name__ == '__main__': r'\.frontend\.process\.winprocess', r'\.Shell', ] + + # If we don't have pexpect, we can't load irunner, so skip any code that + # depends on it + try: + import pexpect + except ImportError: + docwriter.module_skip_patterns += [r'\.lib\.irunner', + r'\.testing\.mkdoctests'] + # Now, generate the outputs docwriter.write_api_docs(outdir) docwriter.write_index(outdir, 'gen', relative_to = pjoin('source','api')