[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 4/6] DO-NOT-MERGE: testing: add pip-installed sphinx-build to
From: |
John Snow |
Subject: |
[PATCH v3 4/6] DO-NOT-MERGE: testing: add pip-installed sphinx-build to CentOS 8 |
Date: |
Mon, 20 Feb 2023 20:24:54 -0500 |
This is just for sake of demonstration again; by modifying the
dockerfile we can continue to support building docs on CentOS 8 with
minimal pain.
Note: This uses pip to install packages as root; this is hygienically
not a *great* idea for arbitrary systems. For CI, I am abusing the fact
that this is a custom-built environment that does not get altered after
being built. Individual developers should almost certainly just use a
virtual environment to avoid interfering with their system.
That process can look like this:
1. Install the new python interpreter:
> sudo dnf install python38
2. Go to a folder where you'd be happy to store some python crud:
> cd ~/.cache
3. Create a virtual environment using the new python:
> python3.8 -m venv qemu_venv
4. Install a modern version of sphinx into this venv:
> ./qemu_venv/bin/pip install sphinx
5. Try running sphinx-build:
> ./qemu_venv/bin/sphinx-build --help
>From here, you can specify ~/.cache/qemu_venv/bin/sphinx-build as your
sphinx binary to configure in order to get doc building. This approach
doesn't interfere with anything; it requires you specifically to opt
into using it, which is likely the safest option if you don't have a lot
of Python knowhow.
Signed-off-by: John Snow <jsnow@redhat.com>
---
tests/docker/dockerfiles/centos8.docker | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/docker/dockerfiles/centos8.docker
b/tests/docker/dockerfiles/centos8.docker
index a3bfddf382d..a53ccada55a 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -129,6 +129,10 @@ RUN dnf distro-sync -y && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+RUN /usr/bin/python3.8 -m ensurepip && \
+ /usr/bin/python3.8 -m pip --no-cache-dir install sphinx sphinx-rtd-theme
+
+
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
--
2.39.0
- Re: [PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3', (continued)
Re: [PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3', Paolo Bonzini, 2023/02/21
[PATCH v3 2/6] configure: Add courtesy hint to Python version failure message, John Snow, 2023/02/20
[PATCH v3 4/6] DO-NOT-MERGE: testing: add pip-installed sphinx-build to CentOS 8,
John Snow <=
Re: [PATCH v3 0/6] Python: Drop support for Python 3.6, Markus Armbruster, 2023/02/21