[Distutils] Are egg files needed when building/installing via --root?

David Cournapeau david at ar.media.kyoto-u.ac.jp
Wed Dec 3 04:01:46 CET 2008

Brian Cameron wrote:
> Now that we have clarified that installing the egg files are useful
> and a good practice, I have some additional questions.
> Currently, on Solaris, we build most Python modules without setuptools
> being present on our build machine, then we install setuptools, and
> lastly a handful of modules which require setuptools to build (such as
> CSSutils, Python-Twisted, and elisa).  Is this correct, or should we
> be making sure setuptools is installed before installing any Python
> modules?
> I wonder if some modules optionally might use setuptools if it is present
> and build metadata for themselves.

Yes, some setup.py files look like this:

    from  setuptools import ....
except ImportError:
    from distutils import ...

Most linux distributions do not use setuptools for the packages (if a
package requires setuptools, it is often built with
--single-version-externally-managed --record=somefile, meaning standard
distutils behavior - note that in both cases, the egg.info is produced,
and somewhat independent of setuptools). Setuptools brings nothing for
systems with a dependency system.

Unless there is a strong reason to do otherwise, I would say it is
better to follow linux distributions practice. I can't find it ATM, but
they are somewhat documented somewhere on the ML, by some Fedora and
Debian packagers.


More information about the Distutils-SIG mailing list