Skip to content

Commit 2363b32

Browse files
author
Kaspersky
committed
Add instructions for cloning the repository using gh repo clone
Add instructions for cloning the repository using `gh repo clone` and update relevant documentation. * **README.md**: Add instructions for cloning the repository, a brief description of the repository, and links to relevant documentation and resources. * **.github/CONTRIBUTING.rst**: Update contributing guidelines to include instructions for cloning the repository and setting up the development environment. * **.github/ISSUE_TEMPLATE/bug.yml**: Update the bug report template to include a note about cloning the repository and add a field for specifying the branch. * **Doc/README.rst**: Update documentation instructions to include cloning the repository and contributing to the documentation. * **Doc/reference/executionmodel.rst**: Update execution model documentation to include notes about cloning the repository and setting up the development environment. * **Doc/using/windows.rst**: Update Windows usage instructions to include cloning the repository and setting up the development environment on Windows. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/python/cpython?shareId=XXXX-XXXX-XXXX-XXXX).
1 parent 6e4f641 commit 2363b32

File tree

6 files changed

+196
-1
lines changed

6 files changed

+196
-1
lines changed

.github/CONTRIBUTING.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,44 @@ our workflow that are not covered by a bot or status check are:
3636
- Upon your first non-trivial pull request (which includes documentation changes),
3737
feel free to add yourself to ``Misc/ACKS``
3838

39+
Cloning the Repository
40+
----------------------
41+
To clone the CPython repository, you can use the following command:
42+
43+
```sh
44+
gh repo clone python/cpython
45+
```
46+
47+
Setting Up the Development Environment
48+
--------------------------------------
49+
To set up your development environment, follow these steps:
50+
51+
1. Clone the repository using the command mentioned above.
52+
2. Create a virtual environment:
53+
```sh
54+
python -m venv venv
55+
```
56+
3. Activate the virtual environment:
57+
- On Windows:
58+
```sh
59+
venv\Scripts\activate
60+
```
61+
- On macOS and Linux:
62+
```sh
63+
source venv/bin/activate
64+
```
65+
4. Install the required dependencies:
66+
```sh
67+
pip install -r requirements.txt
68+
```
69+
5. Build the CPython source code:
70+
```sh
71+
./configure
72+
make
73+
make test
74+
```
75+
76+
You are now ready to start contributing to CPython!
3977

4078
Setting Expectations
4179
--------------------

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ body:
1414
- Emailing [python-list](https://mail.python.org/mailman/listinfo/python-list)
1515
1616
Make sure to also search the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc) to check that the bug has not already been reported.
17+
18+
**Note:** If you are working on a cloned repository, make sure to pull the latest changes from the main branch using `gh repo clone python/cpython`.
1719
- type: textarea
1820
attributes:
1921
label: "Bug description:"
@@ -54,3 +56,9 @@ body:
5456
- Other
5557
validations:
5658
required: false
59+
- type: input
60+
attributes:
61+
label: "Branch:"
62+
description: "Specify the branch you are working on (e.g., main, feature-branch)."
63+
validations:
64+
required: true

Doc/README.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,42 @@ Bugs in the toolset should be reported to the tools themselves.
135135

136136
To help with the documentation, or report any problems, please leave a message
137137
on `discuss.python.org <https://discuss.python.org/c/documentation>`_.
138+
139+
Cloning the Repository
140+
======================
141+
142+
To clone the CPython repository, you can use the following command:
143+
144+
```sh
145+
gh repo clone python/cpython
146+
```
147+
148+
Contributing to the Documentation
149+
=================================
150+
151+
If you are interested in contributing to the documentation, please follow these steps:
152+
153+
1. Clone the repository using the command mentioned above.
154+
2. Create a virtual environment:
155+
```sh
156+
python -m venv venv
157+
```
158+
3. Activate the virtual environment:
159+
- On Windows:
160+
```sh
161+
venv\Scripts\activate
162+
```
163+
- On macOS and Linux:
164+
```sh
165+
source venv/bin/activate
166+
```
167+
4. Install the required dependencies:
168+
```sh
169+
pip install -r requirements.txt
170+
```
171+
5. Make your changes to the documentation files.
172+
6. Build the documentation to ensure your changes are correct:
173+
```sh
174+
make html
175+
```
176+
7. Submit a pull request with your changes.

Doc/reference/executionmodel.rst

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. _execmodel:
32

43
***************
@@ -402,3 +401,46 @@ and :keyword:`raise` statement in section :ref:`raise`.
402401

403402
.. [#] This limitation occurs because the code that is executed by these operations
404403
is not available at the time the module is compiled.
404+
405+
.. _cloning-repo:
406+
407+
Cloning the Repository
408+
======================
409+
410+
To clone the CPython repository, you can use the following command:
411+
412+
```sh
413+
gh repo clone python/cpython
414+
```
415+
416+
.. _setup-dev-env:
417+
418+
Setting Up the Development Environment
419+
======================================
420+
421+
To set up your development environment for working on the execution model, follow these steps:
422+
423+
1. Clone the repository using the command mentioned above.
424+
2. Create a virtual environment:
425+
```sh
426+
python -m venv venv
427+
```
428+
3. Activate the virtual environment:
429+
- On Windows:
430+
```sh
431+
venv\Scripts\activate
432+
```
433+
- On macOS and Linux:
434+
```sh
435+
source venv/bin/activate
436+
```
437+
4. Install the required dependencies:
438+
```sh
439+
pip install -r requirements.txt
440+
```
441+
5. Make your changes to the execution model documentation.
442+
6. Build the documentation to ensure your changes are correct:
443+
```sh
444+
make html
445+
```
446+
7. Submit a pull request with your changes.

Doc/using/windows.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,3 +1355,42 @@ Check :pep:`11` for details on all unsupported platforms.
13551355

13561356
See `Python for Windows <https://www.python.org/downloads/windows/>`_
13571357
for detailed information about platforms with pre-compiled installers.
1358+
1359+
.. _cloning-repo:
1360+
1361+
Cloning the Repository
1362+
======================
1363+
1364+
To clone the CPython repository, you can use the following command:
1365+
1366+
```sh
1367+
gh repo clone python/cpython
1368+
```
1369+
1370+
.. _setup-dev-env-windows:
1371+
1372+
Setting Up the Development Environment on Windows
1373+
=================================================
1374+
1375+
To set up your development environment on Windows, follow these steps:
1376+
1377+
1. Clone the repository using the command mentioned above.
1378+
2. Create a virtual environment:
1379+
```sh
1380+
python -m venv venv
1381+
```
1382+
3. Activate the virtual environment:
1383+
- On Windows:
1384+
```sh
1385+
venv\Scripts\activate
1386+
```
1387+
4. Install the required dependencies:
1388+
```sh
1389+
pip install -r requirements.txt
1390+
```
1391+
5. Make your changes to the code.
1392+
6. Build the code to ensure your changes are correct:
1393+
```sh
1394+
make build
1395+
```
1396+
7. Submit a pull request with your changes.

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# CPython
2+
3+
CPython is the reference implementation of the Python programming language. It is written in C and provides the standard library for Python. This repository contains the source code for CPython, including the interpreter, standard library, and documentation.
4+
5+
## Cloning the Repository
6+
7+
To clone the CPython repository, you can use the following command:
8+
9+
```sh
10+
gh repo clone python/cpython
11+
```
12+
13+
## Documentation
14+
15+
For detailed information on how to build and contribute to the documentation, please refer to the [Doc/README.rst](Doc/README.rst) file.
16+
17+
## Contributing
18+
19+
If you are interested in contributing to CPython, please read the [CONTRIBUTING.rst](.github/CONTRIBUTING.rst) file for guidelines on how to get started.
20+
21+
## Bug Reports
22+
23+
To report bugs or issues, please use the [GitHub Issues](https://github.com/python/cpython/issues) page.
24+
25+
## Resources
26+
27+
- [Python Developer's Guide](https://devguide.python.org/)
28+
- [Python Documentation](https://docs.python.org/3/)
29+
- [Python Mailing Lists](https://mail.python.org/mailman/listinfo)

0 commit comments

Comments
 (0)