[Distutils] setuptools "install" writes to build directory

Phillip J. Eby pje at telecommunity.com
Thu Apr 24 19:49:04 CEST 2008


At 12:42 PM 4/24/2008 -0400, Andreas Klöckner wrote:
>Hi there,
>
>when you install a setuptools-equipped package with
>
>python setup.py build
>sudo python setup.py install
>
>the "install" stage writes to the build directory, as root. This is not great
>behavior, and will fail on NFS-mounted build roots.
>
>Can something be done to avoid this?

With the normal distutils, you can use the --skip-build option to install.

For setuptools, this also works, but only if you're using 
--single-version-externally-managed and/or --root (i.e., the 
distutils-compatible mode).

If you're not using the distutils-compatible mode, then do this:

   python setup.py bdist_egg
   sudo python setup.py easy_install dist/projectname-version-whatever.egg

To separate the build and install steps.



More information about the Distutils-SIG mailing list