From 251fb358faf70c666559213ec9b58cfd202c1e65 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Thu, 19 Oct 2017 18:50:10 +0200 Subject: [PATCH] DOC: fix fake import for API docs Switching to out-of-line ABI mode (#211) broke this. See also https://github.com/spatialaudio/python-sounddevice/pull/105. --- doc/conf.py | 4 ++-- doc/{fake_cffi.py => fake__soundfile.py} | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename doc/{fake_cffi.py => fake__soundfile.py} (82%) diff --git a/doc/conf.py b/doc/conf.py index 0db0bc9..20c7053 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -277,5 +277,5 @@ # Fake imports to avoid actually loading NumPy and libsndfile import fake_numpy sys.modules['numpy'] = sys.modules['fake_numpy'] -import fake_cffi -sys.modules['cffi'] = sys.modules['fake_cffi'] +import fake__soundfile +sys.modules['_soundfile'] = sys.modules['fake__soundfile'] diff --git a/doc/fake_cffi.py b/doc/fake__soundfile.py similarity index 82% rename from doc/fake_cffi.py rename to doc/fake__soundfile.py index ea1cc30..4887706 100644 --- a/doc/fake_cffi.py +++ b/doc/fake__soundfile.py @@ -1,10 +1,7 @@ """Mock module for Sphinx autodoc.""" -class FFI(object): - - def cdef(self, _): - pass +class ffi(object): def dlopen(self, _): return self @@ -16,3 +13,6 @@ def sf_version_string(self): return NotImplemented SFC_GET_FORMAT_INFO = NotImplemented + + +ffi = ffi()