[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bytecompilation and default python version



Alexandre Fayolle writes:
> Hello,
> 
> I have two small questions regarding byte-compiling python modules in the
> maintainer scripts of python library packages. 
> 
> 1. If a package installs modules under /usr/lib/site-python, should the
> postins script produce .pyc files ? .pyo files ?

yes.

> 2. If the answer to 1. is 'yes', the current common practise is to use
> the compileall.py script which lives in /usr/lib/python2.X, which means
> that the packages have to be changed if the default python version
> changes. I think things would be nicer and cleaner if this script was
> provided in the python package (maybe as a symbolic link, or an
> executable such as /usr/bin/python-compileall) so that the packages can
> avoid depending on a versioned python version when they are version
> independent. 

the next python package will have such a script, and will recompile
these files on a python upgrade as well.

  Matthias



Reply to: