Skip to content

Add inline tabs on Quick Reference page for commands on different systems #1205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx_copybutton',
'sphinx_inline_tabs',
'sphinxext.opengraph',
'sphinxext.rediraffe',
]
Expand Down
65 changes: 50 additions & 15 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,54 @@ instructions please see the :ref:`setup guide <setup>`.
git clone https://github.com/<your_username>/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 <compiling>`,
:ref:`how to install and build dependencies <build-dependencies>`,
and the platform-specific pages for :ref:`Unix <unix-compiling>`,
:ref:`macOS`, and :ref:`Windows <windows-compiling>`.

4. :ref:`Run the tests <runtests>`::
4. :ref:`Run the tests <runtests>`:

.. tab:: Unix

.. code-block:: shell

./python -m test -j3

.. tab:: macOS

./python -m test -j3
.. code-block:: shell

On :ref:`most <mac-python.exe>` macOS systems, replace :file:`./python`
with :file:`./python.exe`. On Windows, use :file:`python.bat`.
./python.exe -m test -j3

Note: :ref:`Most <mac-python.exe>` 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.::

Expand All @@ -57,17 +84,25 @@ instructions please see the :ref:`setup guide <setup>`.
<https://github.com/python/cpython/issues>`_. 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.

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down