docs: convert plugins doc md->rst
[vpp.git] / docs / scripts / sphinx-make.sh
index 61356bb..532225e 100755 (executable)
@@ -11,25 +11,21 @@ fi
 
 # Get the OS
 OS_ID=$(grep '^ID=' /etc/os-release  | cut -f2- -d= | sed -e 's/\"//g')
+OS_VERSION=$(grep '^VERSION_ID=' /etc/os-release  | cut -f2- -d= | sed -e 's/\"//g')
+PIP_VERSION=$(grep 'PIP_VERSION=' $WS_ROOT/test/Makefile | cut -d'=' -f2)
+PIP_TOOLS_VERSION=$(grep 'PIP_TOOLS_VERSION=' $WS_ROOT/test/Makefile | cut -d'=' -f2)
 
 if [ "$1" == "venv" ]
 then
-    # We need to install the venv package on new systems
-    if [ "$OS_ID" == "ubuntu" ]
-    then
-       sudo apt-get install $CONFIRM python3-venv
-    fi
-    if [ "$OS_ID" == "centos" ]
-    then
-       sudo yum install $CONFIRM python3-venv
-    fi
 
     # Install the virtual environment
     $PYTHON_INTERP -m venv $VENV_DIR
     source $VENV_DIR/bin/activate;
-    $PYTHON_INTERP -m pip install wheel==0.34.2
-    $PYTHON_INTERP -m pip install -r $DOCS_DIR/etc/requirements.txt
+    $PYTHON_INTERP -m pip install pip==$PIP_VERSION
+    $PYTHON_INTERP -m pip install pip-tools==$PIP_TOOLS_VERSION
+    $PYTHON_INTERP -m pip install -r $WS_ROOT/test/requirements-3.txt
 else
+    [ -n "$(declare -f deactivate)" ] && deactivate
     source $VENV_DIR/bin/activate;
     VERSION=`source $WS_ROOT/src/scripts/version`
     TM=`TZ=GMT date`