buildout/buildout — pull request #112 by reinout (2013-04-18 09:43:37+00:00)
Title: Support module docstrings and __future__ imports in distutils scripts. Fixes #102

Distutils scripts can contain quite a lot of code. Up till now,
only a encoding hint was detected and placed at the top above
our 'import sys' and 'sys.path=' stuff.

Now we look for the first non-__future__ import line and place our
sys.path statement above that line. This makes sure the encoding hint,
the module docstring and the future imports are all above our code,
as should be.

There might be corner cases, but at least this fixes a couple of
common problems.