interpreter script sets __file__ incorrectly
(copied from the discussion on zope-dev so it is archived here properly)
I want to keep my python install clean, so I do not have setuptools installed system-wide. Instead I have a small bin-directory managed by buildout which creates a python interpreter with setuptools, using this snippet:
recipe = zc.recipe.egg
interpreter = spython
eggs = setuptools
scripts = spython
That allows me to use "spython setup.py sdist register upload". setup.py is invoked with __file__ pointing to the spython wrapper script, so any attempt in setup.py to use __file__ to found files will fail.