Skip to content

Commit

Permalink
Merge pull request #4642 from takluyver/docs-build-noqt
Browse files Browse the repository at this point in the history
Allow docs to build without PyQt installed.
  • Loading branch information
takluyver committed Dec 5, 2013
2 parents 1f6a2c2 + d3da4b0 commit 3476524
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docs/autogen_config.py
Expand Up @@ -3,7 +3,6 @@
from IPython.terminal.ipapp import TerminalIPythonApp
from IPython.kernel.zmq.kernelapp import IPKernelApp
from IPython.html.notebookapp import NotebookApp
from IPython.qt.console.qtconsoleapp import IPythonQtConsoleApp

def document_config_options(classes):
lines = []
Expand Down Expand Up @@ -66,9 +65,16 @@ def write_doc(filename, title, classes, preamble=None):
nbclasses = set(NotebookApp().classes) - set(kernel_classes)
write_doc('notebook', 'IPython notebook options', nbclasses,
preamble="Any of the :doc:`kernel` can also be used.")
qtclasses = set(IPythonQtConsoleApp().classes) - set(kernel_classes)
write_doc('qtconsole', 'IPython Qt console options', qtclasses,
preamble="Any of the :doc:`kernel` can also be used.")

try:
from IPython.qt.console.qtconsoleapp import IPythonQtConsoleApp
except ImportError:
print("WARNING: Could not import qtconsoleapp. Config options for the "
"Qt Console will not be documented.")
else:
qtclasses = set(IPythonQtConsoleApp().classes) - set(kernel_classes)
write_doc('qtconsole', 'IPython Qt console options', qtclasses,
preamble="Any of the :doc:`kernel` can also be used.")

with open('source/config/options/generated', 'w'):
pass

0 comments on commit 3476524

Please sign in to comment.