[Distutils] API for finding plugins
Ian Bicking
ianb at imagescape.com
Tue Feb 14 04:35:35 CET 2006
Jim Fulton wrote:
> 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.
Configuration is another interesting question; in the context of a Zope
instance it makes sense. In the context of a development environment
it... kind of makes sense. The issue comes up a lot -- how to configure
an environment so that the configuration is usable from an interactive
prompt, from application code, or whatever else -- and I don't have a
good idea of how it should work. I'm not even sure about specifics, not
to mention configuration in general -- except perhaps that some
convention about configuration could and should be complimentary with
these installation conventions.
>> 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.
That if you have, say, three distinct environments, you'll have three
distinct easy_install scripts, maybe three python programs, and every
library that you install in an environment that includes a script will
have a script local to the environment. And, I suppose, any library
installed outside of the environment cannot have any of its scripts used
in the environment.
I think with the PYTHONPATH work Phillip has done this duplication of
scripts will not be necessary.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Distutils-SIG
mailing list