site.py breaks the ability to load the main Python distribution's site.py as "__main__"
Python's main distribution has provided a site.py module for a long time. It has also been automatically imported for a long time. Since early on (at least 2.0) it has had code that allows it to be loaded as "main" for testing and user feedback on the sys.path, etc. Python on has had the ability to load a library module as "main" since 2.4 with the -m command-line option. This feature was updated with PEP 338 in 2.5 (to support PEP 302 import hooks).
Distribute's site.py module shadows or hides the main Python site.py module that comes with Python distributions. In order to ensure the main site.py's functionality is maintained distribute's site.py performs some trampoline tricks in its __boot().
Unfortunately, these trampoline tricks to not support loading Python's main site.py module as "main" and thus breaks that functionality (for users to understand their sys.path including, site-packages, user-site-packages and other site.py functionality as time goes on).
This should be fixed. Since it seems distribute's main reason for wanting to do this appears to be obtain auto-import loading and since Python's main site.py module has provided the ability to import a "sitecustomize" module since early on (at least 2.0), I recommend the fix be oriented around moving distribute's functionality that needs auto-import loading to use sitecustomize.
I am unsure if this affects setuptools before the fork or not.
Issue found in Debian squeeze package that contains distribute 0.6.14 but appears to still exist in latest code (based upon inspection).