diff options
author | Paul Ganssle <paul@ganssle.io> | 2018-05-08 11:51:46 -0400 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2018-05-08 13:05:03 -0400 |
commit | 5f9de030de9c60029797fb257a0e7ea6b55e0b4d (patch) | |
tree | 1caf01fead8b549b53e3a700854d9eadfae8fd36 /docs | |
parent | 3c7c8109c3a91f836a7ebca7fca7cb5a31ec75b9 (diff) | |
download | dateutil-5f9de030de9c60029797fb257a0e7ea6b55e0b4d.tar.gz |
Mock out Windows-specific modules during docs build
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py index da18a25..2cf9436 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -186,6 +186,20 @@ html_static_path = [] # Output file base name for HTML help builder. htmlhelp_basename = 'dateutildoc' +# -- Options for autodoc ------------------------------------------------- + +autodoc_mock_imports = ['ctypes.wintypes', 'six.moves.winreg'] + +# Need to mock this out specifically to avoid errors +import ctypes +def pointer_mock(*args, **kwargs): + try: + return ctypes.POINTER(*args, **kwargs) + except Exception: + return None + +ctypes.POINTER = pointer_mock +sys.modules['ctypes'] = ctypes # -- Options for LaTeX output --------------------------------------------- |