'What happens during python package installation of a PyPi package?

What is happening during when you install a PiPy package (distribution)?

My understanding so far is that the setup.py file is sort of an organizer to setup the correct environment to run your distribution. I understand it goes through various requirements files to install pip packages, but that's it. What else is going on?

Can someone direct me to a resource to read about this more? All my searches so far have just found resources that explain how to setup a PyPi package.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source