[Distutils] setuptools: site_dirs

Robert Kern rkern at ucsd.edu
Wed Sep 21 06:38:32 CEST 2005

Ian Bicking wrote:
> Robert Kern wrote:
>>Ian Bicking wrote:
>>>With easy_install I can specify --site-dirs to make it setup package
>>>with .pth files.  But with setuptools alone I can't, particularly
>>>"python setup.py develop".  I'm not sure if there's a setting in
>>>distutils.cfg I could use...?  There doesn't seem to be any appropriate
>>>command-line option.
>>>I'm also not sure how the site directories are identified...?  In this
>>>case, on Debian, /usr/local/lib/pythonX.Y/site-packages isn't recognized
>>>as such a directory, even after I added it with site.addsitedir in
>>On Debian that directory is added to the list of site directories in
>>site.addsitepackages(), which is automatically executed through
>>site.main(). If it's not working on your machine, then I think it's a
>>problem with your particular configuration.
> That's what I figured.  But it's working -- setuptools just doesn't know
> that it's working, and so it doesn't create .pth files.

Ah, okay. I thought you were saying that it wasn't working in general
(since site.addsitedir() doesn't affect whether or not easy_install will
install to it; it just affects whether or not .pth files will work in

You're right; there doesn't seem to be a way to tell the develop command
that the directory is a site-dir. Perhaps it could check for the
existence of easy-install.pth. Or perhaps the --site-dirs option should
be duplicated there, too.

Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter

More information about the Distutils-SIG mailing list