[Distutils] Question about easy-install.pth

Phillip J. Eby pje at telecommunity.com
Wed Oct 1 19:35:51 CEST 2008

At 01:12 AM 10/1/2008 -0500, Brian Cameron wrote:

>I am having troubles working with setuptools on Solaris.  The 
>Solaris operating system normally installs modules as packages which contain
>binaries.  This is unlike other Linux operating systems where, for
>exmaple, an RPM would download the source and build it on the user's
>machine when they install the RPM.
>So, to create packages on Solaris we normally install a module to
>a temporary directory such as /var/tmp/pkgbuild-foo/usr, package up
>the files that are built, and when the user installs the package
>these files are then installed to their system.

When you do that, use "setup.py install --root=/var/tmp/pkgbuild-foo" 
to install the package, and you'll be good to go.  That will 
automatically tell setuptools to install the package in a way that 
supports being installed like this; any .pth files generated will be 
named uniquely for that package, rather than using 
easy-install.pth.  In fact, most packages won't generate a .pth file 
at all when installed this way.

Note, too, that the same --root option is also safe for installing 
plain distutils packages; it's just that setuptools also uses it to 
enable a distutils-compatible (and packaging tool compatible) 
installation mode.

More information about the Distutils-SIG mailing list