[ckan-changes] [okfn/ckan] d7aad9: Revert "[docs] Mock pyutilib in doc/conf.py"

GitHub noreply at github.com
Wed May 2 15:38:27 UTC 2012


  Branch: refs/heads/master
  Home:   https://github.com/okfn/ckan
  Commit: d7aad9257891ad707285c1d295089b6c55326f47
      https://github.com/okfn/ckan/commit/d7aad9257891ad707285c1d295089b6c55326f47
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-05-02 (Wed, 02 May 2012)

  Changed paths:
    M doc/conf.py

  Log Message:
  -----------
  Revert "[docs] Mock pyutilib in doc/conf.py"

This reverts commit 20a68e64e590165603b51417d5eb82810d4689aa.

..that didn't work either


diff --git a/doc/conf.py b/doc/conf.py
index 0de4e6f..3b672db 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -16,28 +16,6 @@
 
 import sys, os
 
-# Importing pyutilib doesn't seem to work on readthedocs.org and this breaks
-# autodoc, so mock pyutilib here.
-class Mock(object):
-    def __init__(self, *args, **kwargs):
-        pass
-
-    def __call__(self, *args, **kwargs):
-        return Mock()
-
-    @classmethod
-    def __getattr__(self, name):
-        if name in ('__file__', '__path__'):
-            return '/dev/null'
-        elif name[0] == name[0].upper():
-            return type(name, (), {})
-        else:
-            return Mock()
-
-MOCK_MODULES = ['pyutilib', 'pyutilib.component', 'pyutilib.component.core',]
-for mod_name in MOCK_MODULES:
-    sys.modules[mod_name] = Mock()
-
 # If your extensions (or modules documented by 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.


================================================================



More information about the ckan-changes mailing list