Martin Skøtt wrote:
> On Thu, Nov 10, 2005 at 08:09:47AM -0800, Phillip J. Eby wrote:
> One strange thing is that my ~/.pydistutils.cfg has been looking like
> this all the time:
>
> [install]
> install_lib = /usr/local/lib/python$py_version_short/site-packages
>
> [easy_install]
> site_dirs=/usr/local/lib/python$py_version_short/site-packages
>
> I guess --site-dirs is the same as site_dirs being set in the file?

Yes.  You can set the default for any easy_install option that way.
For boolean options, set them to 1.

Note, however, that the [easy_install] section does *not* support $
variables, so the above configuration probably doesn't work correctly.
The $ variables only work in the [install] section, and no, you can't
put site_dirs there.  Just list the paths explicitly in site_dirs.


> > to the distutils.cfg file as described in the instructions, in addition
> > to the site_dirs setting.
>
> I just noticed that neither python2.3 or python2.4 in Debian include
> a distutils.cfg file. It sounds like a bug to me, so I will try to
> contact the package maintainer and get him to add it (since the
> /usr/local/lib/python*/site-packages dir is created by the package).

That would be good, as long as they also include the altinstall.pth so
that the .pth files in the /usr/local tree get handled.  By having a
distutils/distutils.cfg with the defaults set as well, they will make
it easy for people to actually use /usr/local, and people won't have as
many problems using EasyInstall.  They *do*, however, need to have the
/usr/local/ site-packages directory in sys.path come *before* the /usr
one, though, or locally installed packages won't be able to override
the system-installed ones.


> I will add some info about this to
> http://trac.turbogears.org/turbogears/wiki/SystemInstall so other
> Debian user won't run into the same trouble.

Good idea, and thanks.

Reply via email to