Produce .pyc without execution

Michael Hudson mwh21 at cam.ac.uk
Mon Nov 1 16:29:34 EST 1999


=?ISO-8859-1?Q?Fran=E7ois_Pinard?= <pinard at iro.umontreal.ca> writes:

[biggo snippo]

> Above, $(pkgdatadir) is an installation directory, so things are already in
> their final place, no need to move them further once there.  The scheme I
> used is acceptable when one wants to provide all sources installed with the
> compiled forms, but some people prefer to keep sources non-installed, just
> to spare disk space, say.  

I think installing .pyc's but not .py's is mischevious, if only
because meaningful tracebacks are nice.

> What would be ideal is a way for `compile_dir'
> to produce `.pyc' in the build hierarchy directly from the source hierarchy
> at `make all' time, and that `make install' just move these ready `.pyc'
> files into the installation directories.

It shouldn't be all that hard to adapt Lib/py_compile.py &
Lib/compileall.py as appropriate to effect this.

Regards,
Michael




More information about the Python-list mailing list