[Distutils] Setuptools with custom path configuration

Phillip J. Eby pje at telecommunity.com
Tue Oct 17 05:11:05 CEST 2006

At 09:19 PM 10/16/2006 -0400, Jean-Paul Calderone wrote:
>I revisited setuptools again tonight hoping to learn a bit more about 
>it.  Unfortunately I'm still stuck where I was last time I looked.
>I'm using Combinator to manage my Python libraries.  This means that I have
>a fair amount of software installed at 
>~/.local/lib/pythonX.Y/site-packages, a PYTHONPATH which includes only 
>~/Projects/Divmod/trunk/Combinator, at which location resides a 
>sitecustomize.py which sets up the rest of my path.
> From the documentation, and various experimentation, it seems like this 
> configuration is still not supported.

It is supported.  What problem are you having?  As long as you are having 
setuptools install packages to a directory on PYTHONPATH, you should be fine.

If you are installing to a directory that is not on PYTHONPATH, then it has 
to be a "site" directory, meaning that you add it to sys.path using 
site.addsitedir().  If you don't do this, then .pth files in the directory 
will not be processed, and setuptools will not allow installing packages 
there except in --multi-version mode (which needs an explicit require() 
operation to add the package to sys.path at runtime, rather than always 
including it on sys.path at startup).

More information about the Distutils-SIG mailing list