[Distutils] question about setuptools

Robert Kern rkern at ucsd.edu
Wed Sep 14 06:42:49 CEST 2005

Phillip J. Eby wrote:
> At 06:43 PM 9/13/2005 -0700, Robert Kern wrote:
>>My request is that if --prefix is provided, then the value of
>>--site-dirs be calculated from it.
> I'd suggest using PYTHONHOME instead, since that will actually make Python 
> run from that directory. 

That's not what these users need, however. Python is installed to /usr
and the standard library and all of the third-party packages that are
part of Debian's packaging system go under /usr/lib/python2.x/ .
Third-party packages that are compiled by the user go under
/usr/local/lib/python2.x/site-packages/ . The way everybody accomplishes
this is by setting --prefix=/usr/local for distutils.

> However, my main concern is not making these path 
> calculations any more screwy than they already have to be, as they are 
> already quite complex.  So, if you can suggest a patch to implement your 
> desired behavior that doesn't break anything else and doesn't make my head 
> explode upon reviewing it, I'll be happy to check it in.  :)

The path part isn't hard. If --prefix or --home is provided, the install
command will calculate the path for you and place it in
install.install_lib . The hard part seems to be figuring out whether the
user explicitly provided --prefix or --install-lib or neither.

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