[Distutils] API for finding plugins
jim at zope.com
Sat Feb 11 23:27:46 CET 2006
Ian Bicking wrote:
> * At work we're using an environmental variable ("ACTIVE_SITE") which
> changes sys.path (in sitecustomize) and the distutils installation
> options. This is like basing it on $HOME, but a bit more flexible
> (since $HOME has a lot of meanings).
Note, fwiw: Zope 2 uses a similar approach. ZOPE_HOME points to
a Zope software installation. INSTANCE_HOME points to a Zope site.
Both are typically used to affect the Python path and to find other
information such as configuration and data files.
> Are there other ways we can identify the user's intended working set? I
> don't think environmental variables are easy to work with on Windows,
> and it's a little opaque from a GUI user's perspective. $HOME isn't
> granular enough. Multiple scripts can work, but I've found it
> challenging to manage when the binaries in $PATH work, but potentially
> with bad side-effects (the discipline of keeping working sets separated
> isn't enforced, or even suggested by making it easier to do the right
> thing). Multiple scripts seems the most workable and transparent from
> the point of view of a GUI user, and not particularly bad from the
> perspective of a Posix command-line user either.
I don't really follow what you mean by multiple scripts.
> [The more I think about it, the more I think site-packages in its
> entirety is pointless, distracting, and dangerous. But I don't think a
> PEP proposing its removal would be well received at this time ;) ]
+1 on both counts.
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Distutils-SIG