@@ -171,6 +171,9 @@ Here are the packages needed to build Project documentation manuals:
.. literalinclude:: ../tools/host_packages_scripts/ubuntu_docs.sh
:language: shell
+.. literalinclude:: ../tools/host_packages_scripts/pip3_docs.sh
+ :language: shell
+
In addition to the previous packages, here are the packages needed to build the
documentation in PDF format:
@@ -115,6 +115,7 @@ main ()
essential=ubuntu_essential.sh
docs=ubuntu_docs.sh
docs_pdf=ubuntu_docs_pdf.sh
+ pip3=pip3_docs.sh
;;
"fedora:39"*|\
"fedora:40"*|\
@@ -151,6 +152,7 @@ main ()
essential=ubuntu_essential.sh
docs=ubuntu_docs.sh
docs_pdf=ubuntu_docs_pdf.sh
+ pip3=pip3_docs.sh
;;
*)
echo "$image not supported!"
@@ -166,7 +168,7 @@ main ()
--build-arg ESSENTIAL="host_packages_scripts/$essential" \
--build-arg DOCS="host_packages_scripts/$docs" \
--build-arg DOCS_PDF="host_packages_scripts/$docs_pdf" \
- --build-arg PIP3="host_packages_scripts/${pip3:-}" \
+ --build-arg PIP3="host_packages_scripts/$pip3" \
--file "$SCRIPT_DIR/containerfiles/$containerfile" \
"$SCRIPT_DIR"
@@ -5,6 +5,7 @@ ARG INCLUDE_ESSENTIAL_PACKAGES=0
ARG ESSENTIAL=ubuntu_essential.sh
ARG DOCS=ubuntu_docs.sh
ARG DOCS_PDF=ubuntu_docs_pdf.sh
+ARG PIP3=pip3_docs.sh
ENV DEBIAN_FRONTEND=noninteractive
ARG TZ=Europe/Vienna
@@ -13,6 +14,14 @@ ARG TZ=Europe/Vienna
COPY --chmod=777 ${ESSENTIAL} /temp/host_packages_essential.sh
COPY --chmod=777 ${DOCS} /temp/host_packages_docs.sh
COPY --chmod=777 ${DOCS_PDF} /temp/host_packages_docs_pdf.sh
+COPY --chmod=777 ${PIP3} /temp/pip3_docs.sh
+
+# RUN . /tmp/yocto-venv/bin/activate doesn't work because env variables set in
+# RUN don't persist, so set up the virtualenv manually.
+# Unsetting env variables in Containerfile is difficult, so we hope it works
+# fine without doing that for PYTHONHOME (see activate script content).
+ENV VIRTUAL_ENV=/tmp/yocto-venv
+ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN ln -fs "/usr/share/zoneinfo/$TZ" /etc/localtime \
&& apt-get update \
@@ -20,6 +29,7 @@ RUN ln -fs "/usr/share/zoneinfo/$TZ" /etc/localtime \
&& if [ "$INCLUDE_ESSENTIAL_PACKAGES" = "1" ]; then yes | /temp/host_packages_essential.sh; fi \
&& yes | /temp/host_packages_docs.sh \
&& yes | /temp/host_packages_docs_pdf.sh \
+ && yes | /temp/pip3_docs.sh \
&& apt-get --yes autoremove \
&& apt-get clean \
&& rm -rf /temp
@@ -1 +1 @@
-sudo apt install git librsvg2-bin locales make python3-saneyaml python3-sphinx-rtd-theme python3-sphinx-copybutton sphinx
+sudo apt install git librsvg2-bin locales make python3-saneyaml python3-pip python3-venv