Skip to content

Commit

Permalink
scripts: install documentation prerequisites in Python venv
Browse files Browse the repository at this point in the history
Using Python 3.12.3, pip install fails with the error "This environment
is externally managed" and recommends to create a virtual environment.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
  • Loading branch information
pcolberg committed May 22, 2024
1 parent 129f669 commit 4415105
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 14 deletions.
39 changes: 28 additions & 11 deletions doc/sphinx/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
babel==2.9.1
Jinja2==3.1.1
requests==2.31.0
docutils==0.14
pygments==2.15.0
sphinx==5.0.1
sphinx-rtd-theme==1.0.0
sphinx_fontawesome==0.0.6
alabaster==0.7.16
Babel==2.15.0
breathe==4.35.0
certifi==2024.2.2
charset-normalizer==3.3.2
commonmark==0.9.1
docutils==0.20.1
idna==3.7
imagesize==1.4.1
Jinja2==3.1.4
Markdown==3.6
MarkupSafe==2.1.5
packaging==24.0
Pygments==2.18.0
recommonmark==0.7.1
requests==2.32.2
snowballstemmer==2.2.0
Sphinx==7.3.7
sphinx-markdown==1.0.2
recommonmark==0.7.0
breathe==4.34.0
urllib3==1.26.18
sphinx-rtd-theme==2.0.0
sphinx_fontawesome==0.0.6
sphinxcontrib-applehelp==1.0.8
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.7
sphinxcontrib-serializinghtml==1.1.10
urllib3==2.2.1
4 changes: 2 additions & 2 deletions docker/docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ RUN apt-get update -y
RUN apt-get install -y apt-utils
RUN apt-get install -y tzdata && dpkg-reconfigure --frontend noninteractive tzdata
RUN apt-get install -y build-essential cmake git libjson-c-dev uuid-dev git \
python3-dev python3-wheel python3-pip doxygen libedit-dev \
libcap-dev libudev-dev
python3-dev python3-pip python3-venv python3-wheel \
doxygen libedit-dev libcap-dev libudev-dev
WORKDIR /root
ENTRYPOINT [ "/bin/bash", "-c" ]

Expand Down
4 changes: 3 additions & 1 deletion scripts/build-documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ set -x
PYTHON_VERSION=$(python3 --version | cut -d ' ' -f2)

#install requirements
python3 -m pip install --user -r doc/sphinx/requirements.txt
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r doc/sphinx/requirements.txt
if [ $? != 0 ];
then
echo "failed to install Python requirements"
Expand Down

0 comments on commit 4415105

Please sign in to comment.