PYTHONSITEDIR environment variable

Christian Heimes lists at cheimes.de
Tue Sep 9 19:56:18 CEST 2008


ago wrote:
> Wouldn't it be possible to support a PYTHONSITEDIR environment
> variable in site.py for this purpose? I have attached a possible
> patch. In what follows, if PYTHONSITEDIR is defined, that dir is used
> as the only source of site-packages, extra paths can easily be added
> by creating a .pth file in there. A different variable could be used
> to prepend a sitedir to the list of default sitedirs (similar code
> without "return None").

I had a similar idea, wrote a PEP and implemented it for 2.6 and 3.0:

http://www.python.org/dev/peps/pep-0370/

Christian





More information about the Python-list mailing list