freebsd-ports/mail/notmuch/files/patch-bindings_python_docs_source_conf.py
Steve Wills a9d5731e9a mail/notmuch: Update to 0.28.2
PR:		236178
Submitted by:	Sebastian Schwarz <seschwar@gmail.com> (maintainer)
2019-03-03 21:40:32 +00:00

23 lines
715 B
Python

--- bindings/python/docs/source/conf.py.orig 2019-03-02 23:40:44 UTC
+++ bindings/python/docs/source/conf.py
@@ -13,7 +13,19 @@
import sys, os
-from unittest.mock import Mock
+try:
+ from unittest.mock import Mock
+except ImportError:
+ class Mock(object):
+ def __init__(self, *args, **kwargs):
+ pass
+
+ def __call__(self, *args, **kwargs):
+ return Mock()
+
+ @classmethod
+ def __getattr__(self, name):
+ return Mock() if name not in ('__file__', '__path__') else '/dev/null'
# 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