[Distutils] Installing large applications

Tim Peters tim at zope.com
Tue Jun 15 22:25:55 EDT 2004


[Bob Ippolito]
> Nothing is stopping you from doing sys.path.insert(0, ...) in lieu of
> addsitedir, so long as you don't have to process additional pth files.

Not even good taste <0.5 wink>?  .pth files weren't intended to be a
generally-programmable alternative to site-customize.py, and relying on that
site.py happens to exec entire lines starting with "import" seems abusive to
me.  Stuffing arbitrary executable code on the same line after an import is
a trick, and one I wouldn't count on sticking around.  As Guido said here:

   http://mail.python.org/pipermail/zope3-dev/2002-December/004336.html

the Python developers have no idea why .pth files exec lines starting with
"import", and that doesn't bode well for the future of this trick.

Guido had a different solution in 1999.  Because it doesn't involve obscure
tricks, envars, or changing anything in the installed Python, nobody liked
it <wink>:

  http://mail.python.org/pipermail/python-dev/1999-September/000923.html

It's not really a solution "for ZODB", though.




More information about the Distutils-SIG mailing list