1. Thomas Kluyver
  2. pynotify2

Commits

Thomas Kluyver  committed 59edf27

Allow readthedocs to build the docs without python-dbus installed

  • Participants
  • Parent commits 5474d82
  • Branches default

Comments (0)

Files changed (2)

File docs/conf.py

View file
 
 import sys, os
 
+# To get docstrings, we need to be able to import dbus, but we don't need to
+# actually use it.
+try:
+    import dbus
+except ImportError:
+    sys.modules['dbus'] = object()
+
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.

File setup.py

View file
 from distutils.core import setup
+
+# To load the docstring, we need to be able to import dbus, but we don't
+# actually use it.
+try:
+    import dbus
+except ImportError:
+    import sys
+    sys.modules['dbus'] = object()
+
 import notify2
 long_description = notify2.__doc__