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

Re: Deprecating /usr/lib/site-python in python policy



On Mon, 12 Jun 2006, Alexandre Fayolle wrote:
> > Since this directory is in sys.path of all python versions, if we
> > byte-compile those in-place for the current version, then the modules
> > won't work with other python versions.
> 
> This just not true. Python is smart enough not to use the .pyc if the
> version used to produce it is not the one which is used. The problem
> only exists for python extensions, but pure python modules have no
> problem with this. 

/usr/lib/site-python is on the sys.path of all python versions so we must
make sure to provide the best (ie .py with working .pyc) for all python
versions. We can't do that within /usr/lib/site-python so we must do it
outside.

python-support and python-central provides convenient support for that.
Any package using /usr/lib/site-python shoud be changed to use one of
those ... or if the modules shouldn't be public, then it should use a
private directory that the application manually adds to the sys.path.

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/



Reply to: