How do I build a local copy of the documentation from the doc/en folder? #8608
Answered
by
nicoddemus
enricojr01
asked this question in
Q&A
-
Short summary - I'm trying to build a local html copy of the documentation that can be served up through nginx using a Docker image like so FROM python:3.8 as builder
RUN ["mkdir", "/pythonsrc"]
WORKDIR "/pythonsrc"
RUN ["git", "clone", "https://github.com/pytest-dev/pytest.git", "."]
WORKDIR "/pythonsrc/doc/en"
RUN ["pip", "install", "-r", "requirements.txt"]
RUN ["make", "html"] But I get an error I can't make sense of - ---> Running in 1852c734a540
Running Sphinx v3.5.4
Configuration error:
There is a programmable error in your configuration file:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/sphinx/config.py", line 327, in eval_config_file
execfile_(filename, namespace)
File "/usr/local/lib/python3.8/site-packages/sphinx/util/pycompat.py", line 88, in execfile_
exec(code, _globals)
File "/pythonsrc/doc/en/conf.py", line 24, in <module>
from _pytest import __version__ as version
ModuleNotFoundError: No module named '_pytest'
make: *** [Makefile:20: html] Error 2
The command 'make html' returned a non-zero code: 2 Am I missing a step? Try as I might I can't find anything in the pytest repo or its documentation on how to actually build the documentation itself. I was wondering if anyone else here has tried and could maybe point me in the right direction? |
Beta Was this translation helpful? Give feedback.
Answered by
nicoddemus
Apr 28, 2021
Replies: 1 comment 1 reply
-
Hi, Try Cheers, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
enricojr01
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Try
tox -e docs
(after installingtox
of course).Cheers,
Bruno