Created
January 31, 2011 23:13
-
-
Save GaretJax/805036 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ... | |
| # 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