[Distutils] question about setuptools

Phillip J. Eby pje at telecommunity.com
Thu Sep 15 08:59:34 CEST 2005

At 09:39 PM 9/14/2005 -0700, Robert Kern wrote:
>Phillip J. Eby wrote:
> > This code will break on other people's installations, in that it will not
> > be able to tell you're installing to a non-"site" directory unless you
> > explicitly provide an --install-dir on the command line.  It will thus
> > create a non-working easy-install.pth, and will fail to warn the user that
> > 'require()' is needed.
>I know. I said it was not satisfactory and that the real tricky part
>wasn't calculating the path but determining whether --prefix was
>explicitly provided or not.
>Ooh! But if install_cmd.prefix != sys.prefix, then --prefix must have
>been explicitly set by the user! Eureka! Now I just have to figure out a
>way to find out if --install-dir wasn't set....

Maybe this is a dumb question, but if this is a Debian-specific issue, 
can't you just create a Debian package that combines the setuptools .egg 
and .pth files with a '/usr/lib/python2.4/distutils/distutils.cfg' file 
that contains the right options?  Then, --prefix and --site-dirs would both 
be unnecessary at the CLI level.

More information about the Distutils-SIG mailing list