tl;dr
As stated in the Official Documentation (http://docs.readthedocs.io/en/latest/builds.html), RTD fully publishes its documentation build instructions. In addition, the docker image of the environment used for build is also released, so it is easy to create an equivalent environment at hand and debug it. ..
First, pull the docker image and launch it in an interactive shell.
docker run -it readthedocs/build:latest /bin/bash
By the way, at the time of writing this article, the tag of 2.0
was latest
.
Next, execute the command based on the build log of the management screen. Normally, you can read the official build method from python, but since it is troublesome, execute it while filling the line spacing appropriately from the directory name etc.
export READTHEDOCS=1 #Additions
mkdir -p /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/envs #Additions
git checkout https://github.com/koreyou/word_embedding_loader.git /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/envs/latest
cd /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/envs/latest #Additions
python2.7 -mvirtualenv --no-site-packages --no-download /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/envs/latest
source /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/envs/latest/bin/activate #Additions
python /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/envs/latest/bin/pip install --use-wheel -U --cache-dir /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/.cache/pip sphinx==1.5.3 Pygments==2.2.0 setuptools==28.8.0 docutils==0.13.1 mkdocs==0.15.0 mock==1.0.1 pillow==2.6.1 readthedocs-sphinx-ext\<0.6 sphinx-rtd-theme\<0.3 alabaster\>=0.7,\<0.8,!=0.7.5 commonmark==0.5.4 recommonmark==0.4.0
# requirements.Since the path of txt is not specified by itself, requirements as preprocessing.It seems that they are looking for the location of txt
python /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/envs/latest/bin/pip install --exists-action=w --cache-dir /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/.cache/pip -r/home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/checkouts/latest/requirements.txt
python setup.py install --force
#originally-b It was readthedocs, but it doesn't work, so I changed it to the standard html
python /home/docs/checkouts/readthedocs.org/user_builds/word-embedding-loader/envs/latest/bin/sphinx-build -T -b html -d _build/doctrees-readthedocs -D language=en . _build/html
After that, debug with python -m pdb
at the procedure where the problem occurred.
By the way, the cause was because I added an extra item to my PATH. (RTD does python setup.py install
, so you don't need to add your project's package directory to your PATH)
Recommended Posts