File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 10
10
# add these directories to sys.path here. If the directory is relative to the
11
11
# documentation root, use os.path.abspath to make it absolute, like shown here.
12
12
#
13
- # import os
14
- # import sys
15
- # sys.path.insert(0, os.path.abspath('.'))
13
+ import os
14
+ import sys
15
+ sys .path .insert (0 , os .path .abspath ('../. .' ))
16
16
17
17
18
18
# -- Project information -----------------------------------------------------
36
36
'sphinx.ext.intersphinx'
37
37
]
38
38
39
+ # https://docs.readthedocs.io/en/stable/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
40
+ autodoc_mock_imports = ['pyarrow' ,
41
+ 'pymongoarrow.lib' ,
42
+ 'bson' ]
43
+
39
44
# Add any paths that contain templates here, relative to this directory.
40
45
templates_path = ['_templates' ]
41
46
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
-
14
+ import os
15
15
# We must import pyarrow before attempting to load the Cython module.
16
16
import pyarrow
17
17
27
27
def _parse_version (version ):
28
28
return _LooseVersion (version )
29
29
30
-
31
- if _parse_version (libbson_version ) < _parse_version (_MIN_LIBBSON_VERSION ):
32
- raise ImportError (
33
- f"Expected libbson version { _MIN_LIBBSON_VERSION } or greater, "
34
- f"found { libbson_version } " )
30
+ # TODO: PYTHON-2659
31
+ on_rtd = os .environ .get ('READTHEDOCS' ) == 'True'
32
+ if not on_rtd :
33
+ if _parse_version (libbson_version ) < _parse_version (_MIN_LIBBSON_VERSION ):
34
+ raise ImportError (
35
+ f"Expected libbson version { _MIN_LIBBSON_VERSION } or greater, "
36
+ f"found { libbson_version } " )
You can’t perform that action at this time.
0 commit comments