The python tool that writing, awscli-bastion, has the following directory structure built by cookiecutter.
.
├── awscli_bastion
│ ├── __init__.py
│ ├── cache.py
│ ├── cli.py
│ ├── credentials.py
│ ├── minimal.py
│ └── sts.py
├── docs
│ ├── Makefile
│ ├── _build
│ ├── ...
│ ├── conf.py
│ ├── ...
├── setup.py
├── .readthedocs.yml
│ ...
where the setup.py contains the following:
requirements = [ 'Click>=6.0', 'boto3>=1.5.0', 'awscli>=1.13.0', 'humanize>=0.5.1' ]
where the conf.py contains the following:
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
import awscli_bastion
and .readthedocs.yml contains:
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml
# Optionally build your docs in additional formats such as PDF and ePub
formats: all
# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
When sphinx is built locally, all of the module functions are auto-documented.
When I build on readthedoc.io, it can successfully import all of the awscli_bastion package modules, but it fails to auto-document the module functions because it fails on the imports.
WARNING: autodoc: failed to import module 'cache' from module 'awscli_bastion'; the following exception was raised:
No module named 'dateutil'
WARNING: autodoc: failed to import module 'cli' from module 'awscli_bastion'; the following exception was raised:
No module named 'botocore'
WARNING: autodoc: failed to import module 'credentials' from module 'awscli_bastion'; the following exception was raised:
No module named 'botocore'
WARNING: autodoc: failed to import module 'minimal' from module 'awscli_bastion'; the following exception was raised:
No module named 'boto3'
WARNING: autodoc: failed to import module 'sts' from module 'awscli_bastion'; the following exception was raised:
No module named 'botocore'
https://readthedocs.org/api/v2/build/9667746.txt
this is what is rendered on https://awscli-bastion.readthedocs.io/en/latest/awscli_bastion.html
Why is the readthedoc.io virtualenv not installing the dependencies defined in the setup.py?