docs: Fix venv under python3

See ticket for output under containers for each distro.

Ticket: VPP-1851
Type: docs

Change-Id: I0d80dabeb30d92d09edffa503b05d5eef08313dc
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
This commit is contained in:
Paul Vinciguerra
2020-03-11 13:28:27 -04:00
committed by Dave Barach
parent 57a5a2df59
commit a26f54421a
5 changed files with 32 additions and 19 deletions

View File

@ -8,9 +8,8 @@ endif
# Work out the OS if we haven't already
OS_ID ?= $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
DOC_DEB_DEPENDS = enchant libenchant-dev
DOC_RPM_DEPENDS = enchant libenchant-dev
DOC_DEB_DEPENDS = enchant
DOC_RPM_DEPENDS = enchant
# You can set these variables from the command line.
SPHINXOPTS =
@ -28,6 +27,9 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
spell:
@echo "Checking whether dependencies for Docs are installed..."
ifeq ($(OS_ID),ubuntu)
@set -e; inst=; \
@ -41,7 +43,4 @@ ifeq ($(OS_ID),ubuntu)
else ifneq ("$(wildcard /etc/redhat-release)","")
@sudo yum install $(CONFIRM) $(DOC_RPM_DEPENDS)
endif
# Disable spell checking for now
# @python3 -m pip install sphinxcontrib-spelling
# @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" -W -b spelling $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" -W -b spelling $(O)

View File

@ -40,10 +40,8 @@ release = u'20.01'
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'recommonmark']
# This is currently breaking the build
#### 'sphinxcontrib.spelling']
'recommonmark',
'sphinxcontrib.spelling']
spelling_word_list_filename = 'spelling_wordlist.txt'
# Add any paths that contain templates here, relative to this directory.

View File

@ -13,6 +13,7 @@ jsonschema==3.2.0
MarkupSafe==1.1.1
packaging==20.3
pyaml==20.3.1
pyenchant==3.0.1
Pygments==2.6.1
pyparsing==2.4.6
pyrsistent==0.15.7
@ -30,5 +31,6 @@ sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
sphinxcontrib-spelling==4.3.0
urllib3==1.25.8
zipp==3.1.0

View File

@ -1,20 +1,34 @@
#!/bin/bash
#!/bin/bash -ex
# Not refactored to root Makefile because CI calls this from
# makefile in /docs (as if 'make -C docs').
if [ -z "$PYTHON" ]
then
PYTHON_INTERP=python3
else
PYTHON_INTERP=$(PYTHON)
fi
# Get the OS
OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
if [ "$1" == "venv" ]
then
OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
# We need to install the venv package on new systems
if [ "$OS_ID" == "ubuntu" ]
then
sudo apt-get install -y python3-pip
sudo apt-get install $CONFIRM python3-venv
fi
if [ "$OS_ID" == "centos" ]
then
sudo yum install -y python3-pip
sudo yum install $CONFIRM python3-venv
fi
pip3 install --user virtualenv
python3 -m virtualenv $VENV_DIR
# Install the virtual environment
$PYTHON_INTERP -m venv $VENV_DIR
source $VENV_DIR/bin/activate;
pip3 install -r $DOCS_DIR/etc/requirements.txt
$PYTHON_INTERP -m pip install wheel==0.34.2
$PYTHON_INTERP -m pip install -r $DOCS_DIR/etc/requirements.txt
else
source $VENV_DIR/bin/activate;
VERSION=`source $WS_ROOT/src/scripts/version`

View File

@ -32,7 +32,7 @@ Continuous System Integration and Testing (CSIT)
------------------------------------------------
The Continuous System Integration and Testing (CSIT) project provides functional and performance
testing for FD.io VPP. This testing is focused on functional and performance regresssions. The results
testing for FD.io VPP. This testing is focused on functional and performance regressions. The results
are posted to `CSIT Test Report <https://docs.fd.io/csit/master/report/>`_.
For more about CSIT checkout the following links: