Working as in developing and building own version of Python with whatever the modifications

Setting up environment

First thing is to clone official https://github.com/python/cpython locally or in some remote machine

(even better if you clone your own fork)

if you feel cloning is taking too much time, you can skip downloading entire commit tree by giving depth argument as 1 for just latest commit or whatever the depth you need

for example git clone git@github.com:m4tu4g/cpython.git --depth 1

I recommend setting up through dev container as cpython already has devcontainer definition defined. Note that this will require installing docker but a very clean process than setting up natively w/ libraries

Building

Once the dev container setup is completed, you can run make

to utilize all cpu cores or some specific number, you can use j arg , like make -j $(nsproc)

this will output python.exe executable and you can verify details of that build by running it

image 29.png

.exe extension here is just to remove ambiguity across diff platforms


more info available at https://devguide.python.org/