I imagine creating a wheel file with your code, metadata and resources? Also recall that a lot of python packages have dependencies written in C, Fortran, Rust etc.
Also, many tools exist to create executable programs - basically bundling the python interpreter with some .py files, etc.