-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Move the "quick reference" to a dedicated page #1838
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| .. _quick-reference: | ||
|
|
||
| =============== | ||
| Quick Reference | ||
| =============== | ||
|
|
||
| Here are the basic steps needed to get set up and open a pull request. | ||
|
|
||
| This is meant as a checklist and cheat-sheet, not a comprehensive guide. | ||
| For complete instructions please see the :ref:`setup guide <setup>`. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this makes sense now, we redirect people back to the page they've just read? |
||
|
|
||
| 1. Install and set up :ref:`Git <vcsetup>` and other dependencies | ||
| (see the :ref:`Git Setup <setup>` page for detailed information). | ||
|
|
||
| 2. Fork `the CPython repository <https://github.com/python/cpython>`__ | ||
| to your GitHub account and :ref:`get the source code <checkout>` using:: | ||
|
|
||
| git clone https://github.com/<your_username>/cpython | ||
| cd cpython | ||
|
|
||
| 3. Build Python: | ||
|
|
||
| .. tab:: Unix | ||
|
|
||
| .. code-block:: shell | ||
|
|
||
| ./configure --config-cache --with-pydebug && make -j $(nproc) | ||
|
|
||
| .. tab:: macOS | ||
|
|
||
| .. code-block:: shell | ||
|
|
||
| ./configure --config-cache --with-pydebug && make -j8 | ||
|
|
||
| .. tab:: Windows | ||
|
|
||
| .. code-block:: dosbatch | ||
|
|
||
| PCbuild\build.bat -e -d | ||
|
|
||
| See also :ref:`more detailed instructions <compiling>`, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of the above steps should have been completed by the time they reach this page, so we don't quite need them. |
||
| :ref:`how to install and build dependencies <build-dependencies>`, | ||
| and the platform-specific pages for :ref:`Unix <unix-compiling>`, | ||
| :ref:`macOS <macOS>`, and :ref:`Windows <windows-compiling>`. | ||
|
|
||
| 4. :ref:`Run the tests <runtests>`: | ||
|
|
||
| .. tab:: Unix | ||
|
|
||
| .. code-block:: shell | ||
|
|
||
| ./python -m test -j3 | ||
|
|
||
| .. tab:: macOS | ||
|
|
||
| .. code-block:: shell | ||
|
|
||
| ./python.exe -m test -j8 | ||
|
|
||
| .. 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, for example:: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This section is duplicated by our other "Quick guide". |
||
|
|
||
| git checkout -b fix-issue-12345 main | ||
|
|
||
| If an issue does not already exist, please `create it | ||
| <https://github.com/python/cpython/issues>`__. Trivial issues (for example, typos) do | ||
| not require an issue. | ||
|
|
||
| 6. Push the branch on your fork on GitHub and :ref:`create a pull request | ||
| <pullrequest>`. Include the issue number using ``gh-NNNNNN`` in the | ||
| pull request title. For example: | ||
|
|
||
| .. code-block:: text | ||
|
|
||
| gh-12345: Fix some bug in spam module | ||
|
|
||
| 7. Add a News entry into the ``Misc/NEWS.d/`` directory as individual file. The | ||
| news entry can be created by using `blurb-it <https://blurb-it.herokuapp.com/>`__, | ||
| or the :pypi:`blurb` tool and its ``blurb add`` | ||
| command. Please read more about ``blurb`` in its | ||
| `repository <https://github.com/python/blurb>`__. | ||
|
|
||
| .. note:: | ||
|
|
||
| First time contributors will need to sign the Contributor Licensing | ||
| Agreement (CLA) as described in the :ref:`Licensing <cla>` section of | ||
| this guide. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use sentence case for headers:
https://devguide.python.org/documentation/style-guide/#capitalization