diff --git a/conf.py b/conf.py index 06b4c68a12..c0997f017e 100644 --- a/conf.py +++ b/conf.py @@ -11,6 +11,7 @@ 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx_copybutton', + 'sphinx_inline_tabs', 'sphinxext.opengraph', 'sphinxext.rediraffe', ] diff --git a/index.rst b/index.rst index 6c54779d74..987f6b4bc3 100644 --- a/index.rst +++ b/index.rst @@ -27,27 +27,54 @@ instructions please see the :ref:`setup guide `. git clone https://github.com//cpython cd cpython -3. Build Python, on Unix and macOS use:: +3. Build Python: - ./configure --with-pydebug && make -j + .. tab:: Unix - and on Windows use: + .. code-block:: shell - .. code-block:: dosbatch + ./configure --with-pydebug && make -j - PCbuild\build.bat -e -d + .. tab:: macOS + + .. code-block:: shell + + ./configure --with-pydebug && make -j + + .. tab:: Windows + + .. code-block:: dosbatch + + PCbuild\build.bat -e -d See also :ref:`more detailed instructions `, :ref:`how to install and build dependencies `, and the platform-specific pages for :ref:`Unix `, :ref:`macOS`, and :ref:`Windows `. -4. :ref:`Run the tests `:: +4. :ref:`Run the tests `: + + .. tab:: Unix + + .. code-block:: shell + + ./python -m test -j3 + + .. tab:: macOS - ./python -m test -j3 + .. code-block:: shell - On :ref:`most ` macOS systems, replace :file:`./python` - with :file:`./python.exe`. On Windows, use :file:`python.bat`. + ./python.exe -m test -j3 + + Note: :ref:`Most ` macOS systems use + :file:`./python.exe` in order to avoid filename conflicts with + the ``Python`` directory. + + .. tab:: Windows + + .. code-block:: dosbatch + + .\python.bat -m test -j3 5. Create a new branch where your work for the issue will go, e.g.:: @@ -57,17 +84,25 @@ instructions please see the :ref:`setup guide `. `_. Trivial issues (e.g. typo fixes) do not require any issue to be created. -6. Once you fixed the issue, run the tests, and the patchcheck. +6. Once you fixed the issue, run the tests, and the patchcheck: + + .. tab:: Unix + + .. code-block:: shell + + make patchcheck + + .. tab:: macOS - On Unix and macOS use:: + .. code-block:: shell - make patchcheck + make patchcheck - and on Windows: + .. tab:: Windows - .. code-block:: dosbatch + .. code-block:: dosbatch - .\python.bat Tools\patchcheck\patchcheck.py + .\python.bat Tools\patchcheck\patchcheck.py If everything is ok, commit. diff --git a/requirements.txt b/requirements.txt index 2a1e944b6b..ebf044d002 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ Sphinx~=7.2.6 furo>=2022.6.4 jinja2 +sphinx-inline-tabs>=2023.4.21 sphinx-lint==0.6.8 sphinx-notfound-page>=1.0.0 sphinx_copybutton>=0.3.3