From 7c169c00601cf6b02a31632dfd76f25bc9c1b667 Mon Sep 17 00:00:00 2001
From: Ayush Singh <ayushdevel1325@gmail.com>
Date: Sat, 2 Dec 2023 12:46:06 +0530
Subject: [PATCH] Update instructions to use venv-build-env

- Also change venv name to .venv since zsh scripts to auto load venv
  assume this path by default

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
---
 books/beaglebone-cookbook/11misc/misc.rst |  4 +---
 conf.py                                   |  1 +
 venv-build-env.sh                         | 13 +++++--------
 3 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/books/beaglebone-cookbook/11misc/misc.rst b/books/beaglebone-cookbook/11misc/misc.rst
index a0f1f931..92532299 100644
--- a/books/beaglebone-cookbook/11misc/misc.rst
+++ b/books/beaglebone-cookbook/11misc/misc.rst
@@ -735,9 +735,7 @@ some 6G bytes.
         imagemagick-6.q16 librsvg2-bin webp \
         texlive-full texlive-latex-extra texlive-fonts-extra \
         fonts-freefont-otf fonts-dejavu fonts-dejavu-extra fonts-freefont-ttf
-    bone$ python3 -m venv .venv
-    bone$ source .venv/bin/activate
-    bone$ pip install -r requirements.txt
+    bone$ ./venv-build-env.sh
 
 These instructions came from `lorforlinux
 <https://beagleboard.slack.com/archives/C8S7EKZC2/p1684940872699269>`_
diff --git a/conf.py b/conf.py
index 927f3a59..7a3813fa 100644
--- a/conf.py
+++ b/conf.py
@@ -40,6 +40,7 @@ extensions = [
     "sphinx.ext.imgconverter",
     "sphinx.ext.graphviz",
     "sphinx.ext.todo",
+    "sphinx.ext.autodoc",
     "sphinx_tabs.tabs",
     "breathe",
     "sphinx_copybutton",
diff --git a/venv-build-env.sh b/venv-build-env.sh
index bcf495a0..5993ce8f 100755
--- a/venv-build-env.sh
+++ b/venv-build-env.sh
@@ -1,11 +1,8 @@
 #!/bin/sh
 # Source this script like `. ./venv-build-env.sh`
-if [ ! -e ./sphinx-env ]; then
-   python3 -m venv sphinx-env
+if [ ! -e ./.venv ]; then
+   python3 -m venv .venv
 fi
-source ./sphinx-env/bin/activate
-python3 -m pip install --upgrade pip
-python3 -m pip install sphinx==5.3.0 sphinx-rtd-theme sphinx_design sphinx-tabs sphinxcontrib.svg2pdfconverter sphinx-reredirects
-python3 -m pip install sphinxcontrib-images sphinx-copybutton
-python3 -m pip install breathe exhale
-python3 -m pip install graphviz
+source ./.venv/bin/activate
+pip install --upgrade pip
+pip install -r requirements.txt
-- 
GitLab