8000 Recomend `podman` instead of `docker` and remove mentions to Docker i… · Studentofcode1/devguide@5028ad3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5028ad3

Browse files
authored
Recomend podman instead of docker and remove mentions to Docker images (python#1442)
* use GHCR images instead of Docker images * Address Ezio and Hugo's reviews * Address Ezio's review (round 2)
1 parent 6a2a022 commit 5028ad3

File tree

3 files changed

+15
-64
lines changed

3 files changed

+15
-64
lines changed

_extensions/ubuntu_version.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

conf.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import sys
21
import time
32

4-
sys.path.insert(0, '_extensions')
5-
63
extensions = [
7-
'ubuntu_version',
84
'notfound.extension',
95
'sphinx.ext.extlinks',
106
'sphinx.ext.intersphinx',
@@ -203,7 +199,3 @@
203199
copybutton_prompt_text = "$ "
204200
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#honor-line-continuation-characters-when-copying-multline-snippets
205201
copybutton_line_continuation_character = "\\"
206-
207-
# Must be synchronized with the Ubuntu image version in
208-
# https://github.com/python/cpython/blob/main/Tools/build/regen-configure.sh
209-
configure_ubuntu_version = "22.04"

developer-workflow/extension-modules.rst

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,17 @@ Now that the configuration is in place, it remains to compile the project:
552552

553553
* ``make regen-configure`` updates the :cpy-file:`configure` script.
554554

555+
The :cpy-file:`configure` script must be generated using a specific version
556+
of ``autoconf``. To that end, the :cpy-file:`Tools/build/regen-configure.sh`
557+
script which the ``regen-configure`` rule is based on either requires Docker
558+
or Podman, the latter being assumed by default.
559+
560+
.. tip::
561+
562+
We recommend installing `Podman <https://podman.io/docs/installation>`_
563+
instead of Docker since the former does not require a background service
564+
and avoids creating files owned by the ``root`` user in some cases.
565+
555566
* ``make regen-all`` is responsible for regenerating header files and
556567
invoking other scripts, such as :ref:`Argument Clinic <clinic>`.
557568
Execute this rule if you do not know which files should be updated.
@@ -590,37 +601,13 @@ by executing :cpy-file:`Tools/build/regen-configure.sh`:
590601
./Tools/build/regen-configure.sh # create an up-to-date 'configure'
591602
./configure # create an up-to-date 'Makefile'
592603
593-
``make regen-configure`` and missing permissions
594-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
595-
596-
Since this rule requires `Docker <https://docs.docker.com/desktop>`_ to be
597-
running, the following can be done on Linux platforms (``systemctl``-based):
598-
599-
.. code-block:: shell
600-
601-
systemctl status docker # is the Docker service running?
602-
sudo systemctl start docker # start it if it is not
603-
sudo systemctl restart docker # or restart it if the issue persists
604+
``make regen-configure`` and missing permissions with Docker
605+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
604606

605607
If Docker complains about missing permissions, this Stack Overflow post
606608
could be useful in solving the issue: `How to fix docker: permission denied
607-
<https://stackoverflow.com/q/48957195/9579194>`_.
608-
609-
Once the Docker service is running, check that you have an `Ubuntu
610-
$CONFIGURE_UBUNTU_VERSION$ image <https://hub.docker.com/_/ubuntu>`_,
611-
or pull it if it is not case:
612-
613-
.. code-block:: shell
614-
615-
# check for the Docker image presence
616-
docker images ubuntu:$CONFIGURE_UBUNTU_VERSION$
617-
# pull the Docker image if needed
618-
docker image pull ubuntu:$CONFIGURE_UBUNTU_VERSION$
619-
620-
.. tip::
621-
622-
If the issue persists, you may try `podman <https://podman.io/>`_.
623-
The commands for listing or pulling an image are the same as ``docker``.
609+
<https://stackoverflow.com/q/48957195/9579194>`_. Alternatively, you may try
610+
using `Podman <https://podman.io/docs/installation>`_.
624611

625612
Missing ``Py_BUILD_CORE`` define when using internal headers
626613
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)
0