Skip to content

Instantly share code, notes, and snippets.

@GaretJax
Created January 31, 2011 23:13
Show Gist options
  • Select an option

  • Save GaretJax/805036 to your computer and use it in GitHub Desktop.

Select an option

Save GaretJax/805036 to your computer and use it in GitHub Desktop.
# ...
# Add dummy packages to allow the documentation builds to pass on systems
# not providing all requirements.
class dummy(object):
def __init__(self, *dummy):
self.dummy = set(dummy)
sys.meta_path.append(self)
def find_module(self, module_name, package_path):
return self if not package_path and module_name in self.dummy else None
def __getattr__(self, _):
return self
def load_module(self, _):
return self
dummy('argparse', 'lxml')
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment