Code review comment for lp://staging/~gary/launchpad/buildout-py

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

On October 16, 2009, Gary Poster wrote:
> lib/site.py:
>
> This is the hack--forking the Python standard library site.py--that I am
> saddest about in this branch. I talked about it with Francis Lacoste and
> he blessed the approach, under the circumstances. I also have described
> it to Barry Warsaw and Björn Tillenius, so they are at least aware, if not
> necessarily accepting.
>
> The comment at the top describes the rationale, and highlights the
> change. If PEP 382 (namespace packages,
> http://www.python.org/dev/peps/pep-0382/) fixes the underlying problem
> then hopefully we can get rid of this fork, as well as some of the other
> more unpleasant bits in this branch. That won't be till Python 2.7 at the
> soonest, though.
>
> You should not have to review the file after this block, near the very top:
>
> +try:
> + __import__('pkg_resources') # Use __import__ to not pollute the
> namespace. +except ImportError:
> + pass
>
> Everything else is from the Python (2.5) standard library.
>

Instead of copying the file content couldn't we simply use execfile
"/usr/lib/python2.5/site.py". Bonus points if there is a way to find
"/usr/lib/python2.5" dynamicall :-)

--
Francis J. Lacoste
<email address hidden>

« Back to merge proposal