[Distutils] generating pyc and pyo files
Sun, 28 Mar 1999 18:01:37 -0800
Andrew Dalke wrote:
> When should the .pyc and .pyo files be generated during the
> install process, in the "build" directory or the "install" one?
> I ask because I've been looking into GNU autoconf and automake.
> They compile emacs lisp code (.el->.elc) in the build dir before
> the actual installation, and it might be nice to follow their
> lead on that, and it would ensure that the downloaded python files
> are compileable before they are installed.
> OTOH, I know the normal Python install does a compileall after
> the .py files have been transfered to the install directory.
Compiling in the build area before installation means that you can
install them with arbitrary privileges, owner, and group. That gets
tricker using compileall.py.
For example, let's say that "root" is doing an installation and the
target should be owned by bin:bin. Can't do that with compileall.py,
Greg Stein, http://www.lyra.org/